MCP Server Demo
A demonstration MCP server that provides calculator tools for arithmetic operations, personalized greeting resources, and code review prompt templates. Enables users to perform basic math calculations, generate dynamic greetings, and access reusable code review templates through the Model Context Protocol.
README
MCP Server Demo
A demonstration project for building MCP (Model Context Protocol) servers using the Python MCP SDK.
What is MCP?
The Model Context Protocol (MCP) allows applications to provide context for LLMs in a standardized way. This project demonstrates how to:
- Build MCP servers that expose resources, tools, and prompts
- Use the FastMCP framework for rapid development
- Run servers in development mode with hot reloading
Features
This demo server includes:
- Calculator Tools: Basic arithmetic operations
- Greeting Resources: Dynamic personalized greetings
- Code Review Prompts: Reusable templates for code review
- Development Mode: Hot reloading and debugging support
Installation
- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
Quick Start
Development Mode (Recommended)
Run the server in development mode with hot reloading:
mcp dev server.py
This will start the MCP Inspector where you can test your server interactively.
Direct Execution
Run the server directly:
python server.py
Claude Desktop Integration
Install the server in Claude Desktop:
mcp install server.py
Project Structure
mcp-server/
├── server.py # Main MCP server implementation
├── requirements.txt # Python dependencies
├── pyproject.toml # Project configuration
├── run_dev.py # Development runner script
└── README.md # This file
API Reference
Tools
add(a: int, b: int) -> int: Add two numbersmultiply(a: int, b: int) -> int: Multiply two numberscalculate_bmi(weight_kg: float, height_m: float) -> float: Calculate BMI
Resources
greeting://{name}: Get a personalized greeting for a given nameconfig://app: Get application configuration
Prompts
review_code: Template for code review requestsdebug_error: Template for debugging error messages
Development
The server uses FastMCP which provides:
- Automatic type validation
- Built-in error handling
- Development mode with hot reloading
- Easy integration with Claude Desktop
Learn More
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.