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.
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.
git clone https://github.com/itprodirect/Model-Context-Protocol-101.git
cd Model-Context-Protocol-101python -m venv venv
# On Mac/Linux
source venv/bin/activate
# On Windows
venv\Scripts\activatepip install -r requirements.txtThis installs both third-party libraries and the local mcp101 package, so the
CLI and utilities can be imported from anywhere in the project.
jupyter notebook notebooks/Model-Context-Protocol-101.ipynbpytest- π 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.
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.
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())
EOFThis 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
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.csvModel-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
| Term | Meaning |
|---|---|
| MCP | Model Context Protocol, our tooling API |
| Lead | Potential client for an insurance policy |
| Premium | Amount a customer pays for coverage |
This project is licensed under the MIT License.
Contributions are welcome! Feel free to fork the repo, submit pull requests, or suggest improvements.
For questions or collaborations, connect with me on LinkedIn or open an Issue in this repository.
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! π