{"id":28234731,"url":"https://github.com/itprodirect/model-context-protocol-101","last_synced_at":"2025-06-12T21:31:12.713Z","repository":{"id":279881069,"uuid":"940307504","full_name":"itprodirect/Model-Context-Protocol-101","owner":"itprodirect","description":"📌 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.","archived":false,"fork":false,"pushed_at":"2025-06-06T00:31:33.000Z","size":102711,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-06T00:32:22.173Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itprodirect.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-28T00:30:50.000Z","updated_at":"2025-06-06T00:27:24.000Z","dependencies_parsed_at":"2025-06-06T00:27:55.806Z","dependency_job_id":"2ad12d8b-ffab-4f5e-afcb-b8b626708a0c","html_url":"https://github.com/itprodirect/Model-Context-Protocol-101","commit_stats":null,"previous_names":["itprodirect/model-context-protocol-101"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/itprodirect/Model-Context-Protocol-101","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itprodirect%2FModel-Context-Protocol-101","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itprodirect%2FModel-Context-Protocol-101/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itprodirect%2FModel-Context-Protocol-101/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itprodirect%2FModel-Context-Protocol-101/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itprodirect","download_url":"https://codeload.github.com/itprodirect/Model-Context-Protocol-101/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itprodirect%2FModel-Context-Protocol-101/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259533643,"owners_count":22872427,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-18T22:14:18.042Z","updated_at":"2025-06-12T21:31:12.703Z","avatar_url":"https://github.com/itprodirect.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 Model-Context-Protocol-101\n\n[![Python](https://img.shields.io/badge/Python-3.8%2B-blue.svg)](https://www.python.org/)\n[![License](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n[![Build Status](https://img.shields.io/github/actions/workflow/status/itprodirect/Model-Context-Protocol-101/ci.yml)](https://github.com/itprodirect/Model-Context-Protocol-101/actions)\n[![Dependencies](https://img.shields.io/badge/Dependencies-Updated-brightgreen.svg)](https://github.com/itprodirect/Model-Context-Protocol-101/blob/main/requirements.txt)\n\nA 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**.\n\n![Notebook demo](docs/img/notebook_screenshot.svg \"Screenshot of notebook running a sales example\")\n\n---\n\n## 📌 **Overview**\nThis repository covers:\n✔️ Setting up a Python virtual environment for isolated development.  \n✔️ Installing required dependencies using `pip install -r requirements.txt`.  \n✔️ Understanding MCP concepts with practical code examples.  \n✔️ Running Jupyter Notebooks for interactive experimentation.\n\n---\n\n## 🛠️ **Getting Started**\n\n### 1️⃣ **Clone the Repository**\n```bash\ngit clone https://github.com/itprodirect/Model-Context-Protocol-101.git\ncd Model-Context-Protocol-101\n```\n\u003cdiv style=\"background-color:#e6f7ff;border-left:4px solid #1e90ff;padding:10px;margin:10px 0;\"\u003e\n\u003cstrong\u003eTime Saver:\u003c/strong\u003e Having the repo locally lets independent insurance agents run examples without repeated downloads.\n\u003c/div\u003e\n\n### 2️⃣ **Create a Virtual Environment**\n```bash\npython -m venv venv\n# On Mac/Linux\nsource venv/bin/activate\n# On Windows\nvenv\\Scripts\\activate\n```\n\u003cdiv style=\"background-color:#e6ffe6;border-left:4px solid #28a745;padding:10px;margin:10px 0;\"\u003e\n\u003cstrong\u003eTime Saver:\u003c/strong\u003e Isolating dependencies avoids conflicts so independent agents spend less time troubleshooting setups.\n\u003c/div\u003e\n\n### 3️⃣ **Install Dependencies**\n```bash\npip install -r requirements.txt\n```\n\u003cdiv style=\"background-color:#fff7e6;border-left:4px solid #ff8c00;padding:10px;margin:10px 0;\"\u003e\n\u003cstrong\u003eTime Saver:\u003c/strong\u003e A single command installs everything needed so independent agents can start experimenting right away.\n\u003c/div\u003e\n\n### 4️⃣ **Run Jupyter Notebook**\n```bash\njupyter notebook notebooks/Model-Context-Protocol-101.ipynb\n```\n\u003cdiv style=\"background-color:#f0e6ff;border-left:4px solid #8a2be2;padding:10px;margin:10px 0;\"\u003e\n\u003cstrong\u003eTime Saver:\u003c/strong\u003e Interactive notebooks showcase MCP features without extra scripting, letting independent agents focus on results.\n\u003c/div\u003e\n\n### 5️⃣ **Run Tests**\n```bash\npytest\n```\n\u003cdiv style=\"background-color:#ffe6e6;border-left:4px solid #dc143c;padding:10px;margin:10px 0;\"\u003e\n\u003cstrong\u003eTime Saver:\u003c/strong\u003e Quick tests confirm everything works so independent agents can iterate confidently.\n\u003c/div\u003e\n\n---\n## 🔑 Key Features\n\n- 🚀 **MCP Server Setup**: Learn how to initialize and expand an MCP tool.\n- 🔧 **Function Expansion**: Add custom tools and test them interactively.\n- 📂 **CSV File Handling**: Automate CSV file reading and data extraction.\n- 🎯 **Practical Exercises**: Hands-on coding exercises for better understanding.\n\n---\n## 🌟 Real-world Use Cases\nHere are quick examples of how an independent insurance agent might apply MCP:\n- **Automated Quotes** – load policy data from a CSV and generate quotes in seconds.\n- **Lead Tracking** – triage new leads automatically using simple prompts.\n- **Commission Insights** – compute profits and commissions with a single command.\n\nTo explore these datasets yourself, open the notebook\n[`notebooks/Model-Context-Protocol-101.ipynb`](notebooks/Model-Context-Protocol-101.ipynb).\nIt demonstrates how to load `data/insurance_sales.csv` and calculate totals.\n![Commission screenshot](docs/img/commission_screenshot.svg \"Screenshot showing total commission computed from the dataset\")\nYou can also inspect the CSV quickly from the command line:\n\n```bash\npython - \u003c\u003c'EOF'\nimport pandas as pd\ndf = pd.read_csv('data/insurance_sales.csv')\nprint(df.head())\nEOF\n```\n\n![Architecture overview](docs/img/architecture.svg \"Insurance CSV through MCP server to quote and commission outputs\")\n\n---\n## 📖 Usage Guide\nThis tutorial walks through how to:\n✅ **Initialize the MCP Server**  \n✅ **Test MCP tools locally**  \n✅ **Expand MCP with custom functions**  \n✅ **Read and process CSV files**  \n✅ **Deploy and use MCP tools efficiently**\n\n## 🔄 Workflow\nUse the command-line interface to run common tasks directly from the terminal.\n\n```bash\n# Calculate profit from revenue and cost\npython src/cli.py profit 1000 600\n\n# Total commission from the sample dataset\npython src/cli.py commission data/insurance_sales.csv\n```\n\n---\n## 📂 Project Structure\n```\nModel-Context-Protocol-101/\n├── src/                # Python utilities\n├── notebooks/          # Jupyter notebooks\n├── data/               # Sample datasets\n├── docs/img/           # Diagrams and screenshots\n├── tests/              # Unit tests\n├── README.md           # Documentation\n├── requirements.txt    # Dependencies\n├── LICENSE             # Project License\n└── AGENTS.md           # Contribution guide\n```\n\n---\n## 📚 Glossary\n| Term    | Meaning                                |\n| ------- | -------------------------------------- |\n| **MCP** | Model Context Protocol, our tooling API |\n| **Lead**| Potential client for an insurance policy|\n| **Premium** | Amount a customer pays for coverage |\n\n---\n## 📝 License\nThis project is licensed under the **MIT License**.\n\n---\n## 🤝 Contributing\nContributions are welcome! Feel free to fork the repo, submit pull requests, or suggest improvements.\n\n---\n## 📬 Contact\nFor questions or collaborations, connect with me on **LinkedIn** or open an **Issue** in this repository.\n\n---\n## ❓ Common Issues\n\n**Virtual environment won't activate**\nMake sure you run `python -m venv venv` and then activate it with\n`source venv/bin/activate` on Mac/Linux or `venv\\Scripts\\activate` on Windows.\nVerify Python 3.8+ is installed.\n\n**Missing packages**\nRun `pip install -r requirements.txt` from the project root while your virtual\nenvironment is active. This installs all dependencies, including Jupyter.\n\n**Notebook won't launch**\nActivate your virtual environment and run\n`jupyter notebook notebooks/Model-Context-Protocol-101.ipynb`. If the command is\nnot found, install Jupyter using `pip install jupyter`.\n\n---\n🔥 *This README is designed for clarity, readability, and ease of navigation!* 🚀\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitprodirect%2Fmodel-context-protocol-101","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitprodirect%2Fmodel-context-protocol-101","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitprodirect%2Fmodel-context-protocol-101/lists"}