python-sdk

python-sdk

Official Python SDK for Model Context Protocol, used to build MCP servers and clients.

MCPDevOpen source
Type
MCP
Open source
Yes
GitHub Stars
★ 23.4k
Source
mcp-github

Overview

The MCP Python SDK is the official Python implementation of the Model Context Protocol (MCP). It enables developers to easily build MCP clients and servers, supporting standard transport protocols such as stdio, SSE, and Streamable HTTP. With this SDK, standardized context can be provided to LLMs while separating the responsibilities of context delivery and LLM interaction. Suitable for scenarios requiring context provision to AI models, such as building custom tools or resources.

Capabilities

  • Build MCP clients
  • Create MCP servers
  • Support multiple transport protocols
  • Handle MCP protocol messages
  • Manage lifecycle events

Use cases

Build custom LLM toolsProvide standardized context to AI modelsIntegrate into existing ASGI serversDevelop MCP client applications

Setup

Requires: Python 环境uv 或 pip
Using uv: `uv add "mcp[cli]"`; using pip: `pip install "mcp[cli]"`

This information was compiled by AI from public sources and may contain inaccuracies — please refer to the source.

FAQ

How to install the MCP Python SDK?

Recommended: `uv add "mcp[cli]"`; or use pip: `pip install "mcp[cli]"`.

Which transport protocols does MCP support?

Supports stdio, SSE, and Streamable HTTP.

Related skills