A collection of demo files for MCP servers and clients, illustrating various transport protocols and server capabilities using Python.
This folder contains practical examples for the "Beyond the Basics: Unlocking the Power of MCP" presentation at the 10x Developers Meetup.
macOS/Linux:
cd /Users/davidhague/source/mcp-talk
chmod +x setup.sh
./setup.sh
Windows:
cd \Users\davidhague\source\mcp-talk
setup.bat
cd /Users/davidhague/source/mcp-talk
# Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install --upgrade pip
pip install -r requirements.txt
# Test setup
python test_setup.py
01_python_client_demo.py
Simple MCP Python Client
To run:
source venv/bin/activate # Activate venv first!
# Terminal 1 - Start MCP server
npx -y @modelcontextprotocol/server-filesystem /tmp
# Terminal 2 - Run client
python 01_python_client_demo.py
02_system_monitor_server.py
Complete MCP Server from Scratch
To run:
source venv/bin/activate
python 02_system_monitor_server.py
To connect with Claude Desktop:
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json
):
{
"mcpServers": {
"system-monitor": {
"command": "python",
"args": ["/Users/davidhague/source/mcp-talk/02_system_monitor_server.py"],
"env": {
"PATH": "/Users/davidhague/source/mcp-talk/venv/bin:/usr/bin:/bin"
}
}
}
}
03_sse_server_complete.py
MCP with Server-Sent Events (SSE) - Pseudocode Reference
Note: This is pseudocode for understanding SSE concepts.
For working implementations, use 04_https_streamable.py
04_https_streamable.py
Next-Generation Streamable HTTP MCP
To run:
source venv/bin/activate
python 04_https_streamable.py
05_http_client_demo.py
HTTP MCP Client Demo
To run:
source venv/bin/activate
# Terminal 1 - Start HTTP MCP server
python 04_https_streamable.py
# Terminal 2 - Run HTTP client
python 05_http_client_demo.py
āāāāāāāāāāāāāāā MCP Protocol āāāāāāāāāāāāāāā
ā Client ā āāāāāāāāāāāāāāāāāāāŗ ā Server ā
ā (Claude, ā ā (Your App) ā
ā Cursor, ā ⢠Tools ā ā
ā Custom) ā ⢠Resources ā ā
āāāāāāāāāāāāāāā ⢠Prompts āāāāāāāāāāāāāāā
Why use a virtual environment?
Managing the venv:
# Activate (do this before running demos)
source venv/bin/activate
# Check it's working
which python # Should show venv/bin/python
# Install additional packages if needed
pip install some-package
# Deactivate when done
deactivate
If you see import errors:
source venv/bin/activate
)python test_setup.py
to verify setuppip install -r requirements.txt
Common Issues:
source venv/bin/activate
)chmod +x setup.sh
These demos show practical, working examples of MCP's power beyond basic tutorials.
Generate images using Baidu's iRAG API through a standardized MCP interface.
Interact with Odoo instances using the XML-RPC API. Requires configuration via environment variables or config files.
Advanced evaluation tools for AI safety, alignment, and performance using the Trustwise API.
Connects to the React Native application debugger to retrieve console logs from Metro.
A collection of MCP servers for Claude Desktop, providing access to network tools, code linters, and Proxmox virtualization management.
integration that connects BloodHound with AI through MCP, allowing security professionals to analyze Active Directory attack paths using natural language queries instead of Cypher.
Enable AI agents to secure code with Semgrep.
Provides multi-cluster Kubernetes management and operations using MCP, It can be integrated as an SDK into your own project and includes nearly 50 built-in tools covering common DevOps and development scenarios. Supports both standard and CRD resources.
An MCP server for generating images using the Pollinations AI API.
Generates timestamp-based unique identifiers using UUID v7.