This is an early release preview. You may encounter bugs.
MCP Python SDK logo
Unclaimed

Framework interface

MCP Python SDK

The official Python SDK for Model Context Protocol servers and clients

Built by Model Context Protocol

A 86/100 GitHub score ? This grade is derived from GitHub signals, not user votes. Open for the full breakdown.
Discussion

01 / Summary

About MCP Python SDK.

Python SDK is the official Python implementation of the Model Context Protocol (MCP), the protocol for exposing data and functionality to LLM applications in a standard way, comparable to a web API designed for LLM interactions. One package covers both sides: you build MCP servers that expose tools, resources, and prompts to any MCP host, and MCP clients that connect to any MCP server.

On the server side, tools and resources are ordinary type-hinted Python functions registered with decorators. The type hints become the JSON Schema, and the SDK handles request parsing, validation, and protocol handling, so a working server with one tool and one templated resource takes about 15 lines.

On the client side, a client connects to a server by URL over Streamable HTTP, launches a local server as a stdio subprocess, or uses a custom transport, then calls tools and reads structured results. The SDK speaks all standard transports (stdio, Streamable HTTP, and SSE). An optional command-line tool runs servers, opens them in the MCP Inspector for testing, and installs them into hosts. Version 2 is the current stable line, with a migration guide for code written against version 1.

  • MCP servers: expose tools, resources, and prompts to any MCP host
  • MCP clients: connect to any MCP server and call its tools
  • Decorator API: type-hinted Python functions become tools and resources, with schemas derived from the type hints
  • Templated resources: URI templates map parameters to resource handlers
  • Transports: stdio, Streamable HTTP, and SSE, plus custom transports
  • Development CLI: run servers, test them in the MCP Inspector, and install them into hosts

02 / Discussion CREDIBILITY-GATED

Discussion

Reading is open to everyone. Posting and voting need a verified identity or a GitHub grade of B or higher.

  • No discussions yet.

04 / Build

Build with MCP Python SDK.

Browse the catalog for frameworks, tools, and harnesses, each scored on real GitHub credibility.

Get MCP Python SDK →

Browse the catalog