Server Example

v1.0.0Developer Toolsstable

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.

mcp-server-examplemcpai-integration
Share:
157
Stars
0
Downloads
0
Weekly
0/5

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

A reference implementation of a Model Context Protocol server that demonstrates
alejandro-ao

Maintainer

LicenseMIT License
Languagepython
Versionv1.0.0
UpdatedMay 20, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-server-example

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

Clone the example repository

Download the reference implementation source code.

git clone https://github.com/alejandro-ao/mcp-server-example.git
cd mcp-server-example
2

Create 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]" httpx
3

Run the server directly to test it

Start the server with uv run to verify it launches cleanly before connecting a client.

uv run main.py
4

Configure Claude Desktop to use this server

Edit your Claude Desktop config file to add the server. Use the absolute path to your clone directory.

5

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.

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.

Quick Config Preview

{ "mcpServers": { "mcp-server-example": { "command": "npx", "args": ["-y", "mcp-server-example"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides