Website | Source | Specification | Docs
SDKs:
Concepts
MCP servers can provide three main types of capabilities:
- Resources: File-like data that can be read by clients (like API responses or file contents)
- Tools: Functions that can be called by the LLM (with user approval)
- Prompts: Pre-written templates that help users accomplish specific tasks
Connection lifecycle:
- Initialization
- Client sends initialize request with protocol version and capabilities
- Server responds with its protocol version and capabilities
- Client sends initialized notification as acknowledgment
- Normal message exchange begins
- 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
- Termination: Either party can terminate the connection:
- Clean shutdown via close()
- Transport disconnection
- Error conditions
Reading
- Anthropic intro
- Quickstart: Server: "we’ll build a simple MCP weather server and connect it to a host, Claude for Desktop. We’ll start with a basic setup, and then progress to more complex use cases. We’ll build a server that exposes two tools:
get-alerts
and get-forecast
. Then we’ll connect the server to an MCP host (in this case, Claude for Desktop):"
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
- Filesystem - Secure file operations with configurable access controls
- Fetch - Web content fetching and conversion optimized for LLM usage
- Memory - Knowledge graph-based persistent memory system
- Sequential Thinking - Dynamic problem-solving through thought sequences
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
- PostgreSQL - Read-only database access with schema inspection capabilities
- SQLite - Database interaction and business intelligence features
- Google Drive - File access and search capabilities for Google Drive
Development tools
- Git - Tools to read, search, and manipulate Git repositories
- GitHub - Repository management, file operations, and GitHub API integration
- GitLab - GitLab API integration enabling project management
- Sentry - Retrieving and analyzing issues from Sentry.io
Web and browser automation
- Brave Search - Web and local search using Brave's Search API
- Puppeteer - Browser automation and web scraping capabilities
Productivity and communication
- Slack - Channel management and messaging capabilities
- Google Maps - Location services, directions, and place details
AI and specialized tools
- EverArt - AI image generation using various models
- AWS KB Retrieval - Retrieval from AWS Knowledge Base using Bedrock Agent Runtime
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