Website | Source | Specification | Docs

SDKs:

Concepts

MCP servers can provide three main types of capabilities:

Connection lifecycle:

  1. Initialization
    1. Client sends initialize request with protocol version and capabilities
    2. Server responds with its protocol version and capabilities
    3. Client sends initialized notification as acknowledgment
    4. Normal message exchange begins
  2. Message exchange: After initialization, the following patterns are supported:
    • Request-Response: Client or server sends requests, the other responds
    • Notifications: Either party sends one-way messages
  3. Termination: Either party can terminate the connection:
    • Clean shutdown via close()
    • Transport disconnection
    • Error conditions

Reading

Example Servers

MCP Server implementation example

import asyncio
import mcp.types as types
from mcp.server import Server
from mcp.server.stdio import stdio_server

app = Server("example-server")

@app.list_resources()
async def list_resources() -> list[types.Resource]:
    return [
        types.Resource(
            uri="example://resource",
            name="Example Resource"
        )
    ]

async def main():
    async with stdio_server() as streams:
        await app.run(
            streams[0],
            streams[1],
            app.create_initialization_options()
        )

if __name__ == "__main__":
    asyncio.run(main())

Reference implementations

These official reference servers demonstrate core MCP features and SDK usage:

Current reference servers

Archived servers (historical reference)

⚠️ Note: The following servers have been moved to the servers-archived repository and are no longer actively maintained. They are provided for historical reference only.

Data and file systems
Development tools
Web and browser automation
Productivity and communication
AI and specialized tools

Getting started

Using reference servers

TypeScript-based servers can be used directly with npx:

npx -y @modelcontextprotocol/server-memory

Python-based servers can be used with uvx (recommended) or pip:

# Using uvx
uvx mcp-server-git

# Using pip
pip install mcp-server-git
python -m mcp_server_git

Configuring with Claude

To use an MCP server with Claude, add it to your configuration:

{
  "mcpServers": {
    "memory": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-memory"]
    },
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/path/to/allowed/files"
      ]
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>"
      }
    }
  }
}


Tags: ai   distribution   standard  

Last modified 30 July 2025