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
- MCP for Beginners
- The Model Context Protocol (MCP): A Complete Guide Series (Requires Medium account)
- 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):"
- An LLM does not need to understand MCP
- Stop Converting REST APIs to MCP: "I’ve come to realize that it can paper over a fundamental problem: an API built for a human will poison your AI agent. In practice, LLMs achieve significantly better performance with well-designed, tailored MCP servers than with auto-converted ones. The reason goes right to the core of how agents and humans interact with software, and how we design technical products for each consumer. A good REST API is generous. It is a model of discoverability and atomicity. It offers hundreds of single-serving endpoints, flexible parameters, and endless options because programmatic iteration is cheap. Human developers are brilliant at doing discovery once and subseqeuently ignoring what’s irrelevant, and their code can chain together atomic calls — get_user(), then get_orders(user_id), then get_order_details(order_id) — with quick network hops to achieve complex outcomes. For them, more choice is good. We use properties like idempotency, pagination, and caching to make our APIs more efficient in the face of relatively deterministic access patterns. But when you hand this interface to an agent, you’re not empowering it; you’re drowning it. "
Example Agents
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 23 August 2025