MCP-AGENTIC

MODEL CONTEXT PROTOCOL FOR AI AGENT

GitHub Stars

1

User Rating

Not Rated

Favorites

0

Views

72

Forks

0

Issues

0

README
Screenshot 2025-07-15 133009
๐Ÿ”Œ Complete MCP (Model Context Protocol) Demo Project

By Yassine FARAH

This project demonstrates a full-stack implementation of the Model Context Protocol (MCP), a standardized way to connect LLMs to external data, tools, and services โ€” think of it like USB-C for AI apps.


๐Ÿ“ฆ Project Overview

Youโ€™ll build and compare:

โœ… A Python MCP Server
โœ… A TypeScript MCP Server
โœ… Integration with the Claude Desktop app
โœ… Real-time access to:

  • Notes
  • Todos
  • Weather
  • GitHub search
  • File system
  • System info

โš™๏ธ Prerequisites
  • โœ… Python 3.8+
  • โœ… Node.js 18+
  • โœ… Git
  • โœ… Claude Desktop (https://claude.ai/download)
  • โœ… Basic knowledge of Python & TypeScript

๐Ÿงฑ Project Structure
mcp-demo-project/
โ”œโ”€โ”€ python-server/         # Python MCP server
โ”œโ”€โ”€ typescript-server/     # TypeScript MCP server
โ”œโ”€โ”€ config/                # MCP config files
โ”œโ”€โ”€ examples/              # Optional examples/demos
โ””โ”€โ”€ README.md              # ๐Ÿ“„ You are here

text

๐Ÿ Python MCP Server Setup
Step 1: Environment Setup
cd python-server
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt
Step 2: Run the Server
bash
python server.py

Or use the launch helper:

python run_server.py

๐Ÿงฉ TypeScript MCP Server Setup
Step 1: Initialize Project

cd typescript-server
npm install
npm run build
Step 2: Run Server
bash
npm start
For hot reload (dev mode):

```bash
npm run dev

๐Ÿค– Claude Desktop Integration
Add this config in:

Windows: %APPDATA%\Claude\claude_desktop_config.json

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

json
{
  "mcpServers": {
    "python-demo": {
      "command": "python",
      "args": ["absolute/path/to/python-server/server.py"]
    },
    "typescript-demo": {
      "command": "node",
      "args": ["absolute/path/to/typescript-server/dist/server.js"]
    }
  }
}
Restart Claude Desktop

MCP servers should now be auto-connected. You can start asking:

"Add a note with title 'Test'"

"List all notes"

"What's the weather in Casablanca?"

"Search GitHub for 'LLM server'"

"Add a todo: Finish MCP project"

"List todos"

๐Ÿš€ Deployment
Dockerfile (Python server)
dockerfile
FROM python:3.11-slim
WORKDIR /app
COPY python-server/requirements.txt .
RUN pip install -r requirements.txt
COPY python-server/ .
CMD ["python", "server.py"]
Docker Compose (Optional)
yaml
services:
  python-mcp:
    build: .
    volumes:
      - ./data:/app/data
    stdin_open: true
    tty: true
๐Ÿงช Testing & Debugging
Test direct:

bash
echo '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {}}' | python server.py
bash
echo '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {}}' | npm start

๐Ÿ” Advanced Features
โœ… SQLite support (pip install sqlite3)

โœ… File system browsing

โœ… GitHub search via API

โœ… Weather info (mocked)

โœ… Modular Tool and Resource structure

๐Ÿง  Next Steps
Add real authentication (e.g. for GitHub API)

Build more tools (PDF parser, calendar, translator, etc.)

Streamline for production using Docker/Kubernetes

Implement real-time streaming + WebSocket support

Connect to your business or LLM product

๐Ÿ“š Resources
๐ŸŒ MCP Spec

๐Ÿ Python SDK

๐Ÿง‘โ€๐Ÿ’ป TypeScript SDK

๐Ÿงช Example Servers

Screenshot 2025-06-19 192117 Screenshot 2025-06-19 192001 Screenshot 2025-06-19 191913 Screenshot 2025-06-19 190415 Screenshot 2025-06-19 185951 Screenshot 2025-06-19 185026 Screenshot 2025-06-19 184948 Screenshot 2025-06-19 183151 Screenshot 2025-06-19 182919 Screenshot 2025-06-19 182906 Screenshot 2025-06-18 190236 Screenshot 2025-06-18 101839 Screenshot 2025-06-16 154734 Screenshot 2025-06-19 192134