Skip to content

πŸ“Œ A step-by-step tutorial exploring the Model Context Protocol (MCP). This repository serves as a structured learning guide for AI/ML practitioners, consultants, and developers interested in practical MCP implementation. Includes code, explanations, and exercises.

License

Notifications You must be signed in to change notification settings

itprodirect/Model-Context-Protocol-101

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

54 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Model-Context-Protocol-101

Python License Build Status Dependencies

A step-by-step tutorial exploring the Model Context Protocol (MCP). This repository serves as a structured learning guide for AI/ML practitioners, consultants, and developers interested in practical MCP implementation.

Notebook demo


πŸ“Œ Overview

This repository covers: βœ”οΈ Setting up a Python virtual environment for isolated development.
βœ”οΈ Installing required dependencies using pip install -r requirements.txt.
βœ”οΈ Understanding MCP concepts with practical code examples.
βœ”οΈ Running Jupyter Notebooks for interactive experimentation.


πŸ› οΈ Getting Started

1️⃣ Clone the Repository

git clone https://github.com/itprodirect/Model-Context-Protocol-101.git
cd Model-Context-Protocol-101
Time Saver: Having the repo locally lets independent insurance agents run examples without repeated downloads.

2️⃣ Create a Virtual Environment

python -m venv venv
# On Mac/Linux
source venv/bin/activate
# On Windows
venv\Scripts\activate
Time Saver: Isolating dependencies avoids conflicts so independent agents spend less time troubleshooting setups.

3️⃣ Install Dependencies

pip install -r requirements.txt

This installs both third-party libraries and the local mcp101 package, so the CLI and utilities can be imported from anywhere in the project.

Time Saver: A single command installs everything needed so independent agents can start experimenting right away.

4️⃣ Run Jupyter Notebook

jupyter notebook notebooks/Model-Context-Protocol-101.ipynb
Time Saver: Interactive notebooks showcase MCP features without extra scripting, letting independent agents focus on results.

5️⃣ Run Tests

pytest
Time Saver: Quick tests confirm everything works so independent agents can iterate confidently.

πŸ”‘ Key Features

  • πŸš€ MCP Server Setup: Learn how to initialize and expand an MCP tool.
  • πŸ”§ Function Expansion: Add custom tools and test them interactively.
  • πŸ“‚ CSV File Handling: Automate CSV file reading and data extraction.
  • 🎯 Practical Exercises: Hands-on coding exercises for better understanding.

🌟 Real-world Use Cases

Here are quick examples of how an independent insurance agent might apply MCP:

  • Automated Quotes – load policy data from a CSV and generate quotes in seconds.
  • Lead Tracking – triage new leads automatically using simple prompts.
  • Commission Insights – compute profits and commissions with a single command.

To explore these datasets yourself, open the notebook notebooks/Model-Context-Protocol-101.ipynb. It demonstrates how to load data/insurance_sales.csv and calculate totals. Commission screenshot You can also inspect the CSV quickly from the command line:

python - <<'EOF'
import pandas as pd
df = pd.read_csv('data/insurance_sales.csv')
print(df.head())
EOF

Architecture overview


πŸ“– Usage Guide

This tutorial walks through how to: βœ… Initialize the MCP Server
βœ… Test MCP tools locally
βœ… Expand MCP with custom functions
βœ… Read and process CSV files
βœ… Deploy and use MCP tools efficiently

πŸ”„ Workflow

Use the command-line interface to run common tasks directly from the terminal.

# Calculate profit from revenue and cost
mcp101-cli profit 1000 600

# Total commission from the sample dataset
mcp101-cli commission data/insurance_sales.csv

πŸ“‚ Project Structure

Model-Context-Protocol-101/
β”œβ”€β”€ src/                # Python utilities
β”œβ”€β”€ notebooks/          # Jupyter notebooks
β”œβ”€β”€ data/               # Sample datasets
β”œβ”€β”€ docs/img/           # Diagrams and screenshots
β”œβ”€β”€ tests/              # Unit tests
β”œβ”€β”€ README.md           # Documentation
β”œβ”€β”€ requirements.txt    # Dependencies
β”œβ”€β”€ LICENSE             # Project License
└── AGENTS.md           # Contribution guide

πŸ“š Glossary

Term Meaning
MCP Model Context Protocol, our tooling API
Lead Potential client for an insurance policy
Premium Amount a customer pays for coverage

πŸ“ License

This project is licensed under the MIT License.


🀝 Contributing

Contributions are welcome! Feel free to fork the repo, submit pull requests, or suggest improvements.


πŸ“¬ Contact

For questions or collaborations, connect with me on LinkedIn or open an Issue in this repository.


❓ Common Issues

Virtual environment won't activate Make sure you run python -m venv venv and then activate it with source venv/bin/activate on Mac/Linux or venv\Scripts\activate on Windows. Verify PythonΒ 3.10+ is installed.

Missing packages Run pip install -r requirements.txt from the project root while your virtual environment is active. This installs all dependencies, including Jupyter.

Notebook won't launch Activate your virtual environment and run jupyter notebook notebooks/Model-Context-Protocol-101.ipynb. If the command is not found, install Jupyter using pip install jupyter.


πŸ”₯ This README is designed for clarity, readability, and ease of navigation! πŸš€

About

πŸ“Œ A step-by-step tutorial exploring the Model Context Protocol (MCP). This repository serves as a structured learning guide for AI/ML practitioners, consultants, and developers interested in practical MCP implementation. Includes code, explanations, and exercises.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published