loading…
Search for a command to run...
loading…
A demonstration server designed to showcase core Model Context Protocol (MCP) primitives including tools, resources, and prompts for presentations. It provides
A demonstration server designed to showcase core Model Context Protocol (MCP) primitives including tools, resources, and prompts for presentations. It provides functional examples like text analysis and financial calculations to illustrate how AI models interact with external functions and data.
A simple but complete MCP (Model Context Protocol) server built for presentations and demonstrations. This server showcases all three core MCP primitives: Tools, Resources, and Prompts in under 240 lines of Python code.
For Presenters: See DEMO_CHEATSHEET.md for a detailed 5-minute presentation script with timing guide.
This demo server showcases:
Tools (Model-controlled functions)
calculate_tip - Financial calculationsanalyze_text - Text analysis and statisticsconvert_temperature - Temperature conversionResources (Application-controlled data)
demo://server-info - Server metadata and capabilitiesdemo://example-data - Sample data for testingdemo://statistics - Usage statisticsPrompts (User-controlled templates)
demo_workflow - Guided walkthrough of all capabilitiesquick_demo - 2-minute quick demonstrationpip install fastmcp
For MCP Inspector (requires Node.js):
npm install -g @modelcontextprotocol/inspector
Linux/Mac:
cd mcp-demo
./demo.sh
# Choose option 1 for interactive demo
Windows/Direct:
npx @modelcontextprotocol/inspector python demo_server.py
This opens a web UI where you can:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json{
"mcpServers": {
"demo-server": {
"command": "python",
"args": ["D:\\Demo\\mcp-demo\\demo_server.py"]
}
}
}
python demo_server.py
The server will start and display:
Connect via any MCP-compatible client (Claude Desktop, Cursor, VS Code with MCP extension).
cd mcp-demo
npx @modelcontextprotocol/inspector python3 demo_server.py
Show the code:
demo_server.py@mcp.tool(), @mcp.resource(), @mcp.prompt()Say:
"This is a complete MCP server. Notice how simple it is - just Python functions with decorators. Type hints automatically generate schemas, docstrings become descriptions for the LLM."
In MCP Inspector:
Live Demo - calculate_tip:
{
"bill_amount": 100,
"tip_percentage": 20
}
Say:
"Tools are model-controlled - the LLM decides when to invoke them based on user requests. Here we calculate a 20% tip on $100. See the structured JSON response."
Live Demo - analyze_text:
{
"text": "The Model Context Protocol enables AI applications to seamlessly connect with external tools and data sources."
}
Say:
"Same pattern - clean input, structured output. The LLM can use this data to provide intelligent responses."
In MCP Inspector:
demo://server-infoSay:
"Resources are application-controlled data sources. Unlike tools where the LLM decides, here the client application determines when to fetch data. Think of them like REST GET endpoints - they provide context to the AI."
Show the JSON response with server capabilities
In MCP Inspector:
demo_workflow and quick_demoSay:
"Prompts are user-controlled templates. In a real application, these would appear as slash commands or menu items. They help users accomplish common tasks without remembering exact phrasing."
Trigger the quick_demo prompt and show how it structures the interaction
Say:
"From concept to working server: minutes, not hours. This same server works with Claude Desktop, Cursor, VS Code - any MCP-compatible client. Build once, use everywhere. That's the power of MCP."
# In MCP Inspector or programmatically
calculate_tip(85.50, 18)
# Expected output:
{
"bill_amount": 85.5,
"tip_percentage": 18,
"tip_amount": 15.39,
"total": 100.89,
"split_2_people": 50.45
}
analyze_text("Building MCP servers is straightforward with official SDKs.")
# Expected output:
{
"word_count": 8,
"character_count": 60,
"character_count_no_spaces": 52,
"estimated_reading_time_minutes": 0.0,
"analyzed_at": "2025-01-23T..."
}
convert_temperature(25, "C", "F")
# Expected output:
{
"original_value": 25,
"original_unit": "C",
"converted_value": 77.0,
"converted_unit": "F",
"formula_used": "C → C → F"
}
Supports conversion between Celsius (C), Fahrenheit (F), and Kelvin (K) in any direction.
Python Dependencies:
pip install fastmcp
For MCP Inspector (Optional):
npm install -g @modelcontextprotocol/inspectornpx @modelcontextprotocol/inspectorTested with:
After this demo, your audience will understand:
pip install fastmcp
Install Node.js from https://nodejs.org/
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsondemo_server.pypython or python3 depending on your systempython demo_server.py to see startup messagesmcp-demo/
├── demo_server.py # Main MCP server implementation
├── requirements.txt # Python dependencies
├── demo.sh # Interactive demo launcher (Linux/Mac)
├── claude_desktop_config.json # Example Claude Desktop config
├── README.md # This file
├── DEMO_CHEATSHEET.md # Presentation script with timing
└── .groupcode/ # Code organization metadata
MIT License - Feel free to use this as a template for your own MCP servers.
Demo Server Version: 1.0.0
Built with: FastMCP + Python 3.10+
Created for: MCP Presentations and Learning
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"demo-mcp-server": {
"command": "npx",
"args": []
}
}
}Web content fetching and conversion for efficient LLM usage.
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also