This repository provides a Python implementation of the Model Context Protocol (MCP), offering tools and resources for building servers, managing context, and integrating with applications like Claude. It simplifies interaction
Python implementation of the Model Context Protocol (MCP)
This Python SDK implements the Model Context Protocol (MCP), enabling standardized context provision for LLMs. It facilitates building MCP clients and servers, supporting standard transports like stdio and SSE, and handling MCP protocol messages.
The SDK allows exposing data via Resources (like GET endpoints), providing functionality through Tools (like POST endpoints), and defining interaction patterns using Prompts. Key components include the FastMCP
server, which manages connections and message routing.
Installation is streamlined with uv add "mcp[cli]"
or pip install mcp
. The SDK supports development mode via mcp dev server.py
and Claude Desktop integration with mcp install server.py
. Advanced features include a low-level server implementation for customization and a client interface for connecting to MCP servers. The SDK defines primitives like Prompts, Resources, and Tools, and server capabilities such as prompt and resource management.
modelcontextprotocol/python-sdk
September 24, 2024
March 28, 2025
Python