Server Example
A reference implementation of a Model Context Protocol server that demonstrates core primitives including tools, resources, and prompts. It enables users to perform basic arithmetic operations and manage notes through a simple storage system.
What is Server Example?
Server Example is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to reference implementation of a model context protocol server that demonstrates core primitives including tools, resources, and prompts. it enables users to perform basic arithmetic operations and manag...
A reference implementation of a Model Context Protocol server that demonstrates core primitives including tools, resources, and prompts. It enables users to perform basic arithmetic operations and manage notes through a simple storage system.
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- A reference implementation of a Model Context Protocol serve
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx mcp-server-exampleConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Server Example
MCP Server Example is a hands-on reference implementation of the Model Context Protocol that demonstrates all three core MCP primitives: tools (callable functions), resources (file-like data), and prompts (pre-built templates). It includes a working arithmetic tool, a note-taking system with persistent local storage, and is accompanied by a YouTube tutorial series — making it the ideal starting point for developers who want to understand MCP by reading and modifying a complete, functional server rather than starting from scratch.
Prerequisites
- Python 3.10 or newer
- uv package manager installed (curl -LsSf https://astral.sh/uv/install.sh | sh)
- MCP SDK 1.2.0+ (installed automatically via uv add)
- Claude Desktop or another MCP-compatible client for testing
Clone the example repository
Download the reference implementation source code.
git clone https://github.com/alejandro-ao/mcp-server-example.git
cd mcp-server-exampleCreate a virtual environment and install dependencies
Use uv to create an isolated environment and install the MCP SDK along with the httpx HTTP client.
uv venv
source .venv/bin/activate
uv add "mcp[cli]" httpxRun the server directly to test it
Start the server with uv run to verify it launches cleanly before connecting a client.
uv run main.pyConfigure Claude Desktop to use this server
Edit your Claude Desktop config file to add the server. Use the absolute path to your clone directory.
Restart Claude Desktop and explore the primitives
After restarting, Claude Desktop will connect to the server. You can now call its tools (arithmetic operations), access its resources (stored notes), and invoke its prompts from the chat interface.
Server Example Examples
Client configuration
Claude Desktop configuration for the MCP Server Example. Replace /ABSOLUTE/PATH/TO/mcp-server-example with the actual directory path on your machine.
{
"mcpServers": {
"mcp-server-example": {
"command": "uv",
"args": ["--directory", "/ABSOLUTE/PATH/TO/mcp-server-example", "run", "main.py"]
}
}
}Prompts to try
Example prompts to exercise the arithmetic tool, note resource, and prompt template in the reference server.
- "Add 42 and 58 using the calculator tool"
- "Store a note with the key 'project-ideas' and content 'Build an MCP server for my team'"
- "Retrieve the note stored under 'project-ideas'"
- "List all notes currently saved in the server"
- "Use the summarize prompt template to summarize this paragraph: [paste text]"Troubleshooting Server Example
uv command not found
Install uv with: curl -LsSf https://astral.sh/uv/install.sh | sh. Then reload your shell or open a new terminal window before retrying.
Claude Desktop shows 'server disconnected' immediately
Ensure the --directory path in your config is the absolute path (not relative) to the mcp-server-example directory, and that main.py exists there. Test by running 'uv --directory /your/path run main.py' manually in a terminal.
Tools do not appear in Claude Desktop's tool panel
Restart Claude Desktop completely after editing the config file. The config is only read at startup. Also verify JSON syntax is valid — trailing commas or missing brackets will silently prevent loading.
Frequently Asked Questions about Server Example
What is Server Example?
Server Example is a Model Context Protocol (MCP) server that reference implementation of a model context protocol server that demonstrates core primitives including tools, resources, and prompts. it enables users to perform basic arithmetic operations and manage notes through a simple storage system. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Server Example?
Follow the installation instructions on the Server Example GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Server Example?
Server Example works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Server Example free to use?
Yes, Server Example is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
Server Example Alternatives — Similar Developer Tools Servers
Looking for alternatives to Server Example? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Server Example in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Server Example?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.