1. Conduid
  2. Developer Tools
  3. Python Sdk.git
MCP server · Developer Tools

Python Sdk.git

The official Python SDK for Model Context Protocol servers and clients

Unclaimed MIT devtools
87Strong

Scored 5 hours ago · breakdown

About Python Sdk.git

Python Sdk.git is an MCP server published by modelcontextprotocol in the Developer Tools category: the official Python SDK for Model Context Protocol servers and clients.

The repository has 25K stars and 4.1K forks, with the last commit 3 days ago. Recent commit activity is the strongest signal that reported issues will get attention.

Install

uvx
uvx mcp
pip
pip install mcp
From source
git clone https://github.com/modelcontextprotocol/python-sdk.git

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Tools (6)

add_bookAdd a book to the catalog.

Parameters not published.

async_toolDecorator to register a completion handler.

Parameters not published.

get_timeCurrent time

Parameters not published.

my_toolNo description in manifest

Parameters not published.

search_booksSearch the catalog by title or author.

Parameters not published.

tool_with_contextDecorator to register a completion handler.

Parameters not published.

Ask AI

✦

Ask AI about Python Sdk.git

Powered by Claude

Ask about Python Sdk.git — answers draw on its README.

Security checks

Static checks derived from the repository yesterday. Heuristics on the source, not an audit.

  • ✓README presentThe repository ships documentation.
  • ✓License declaredUsable under a stated license.
  • ✓Tests presentA test suite exists in the repository.
  • ✓Dependencies pinnedA lockfile pins dependency versions.
  • !No dynamic code executionSource scan found eval or shell execution. Review how tool inputs reach it before granting credentials.

1 check has not been run yet.

Releases

v2.3.0v2.3.0 · 2 Oct 2026`pip install -U mcp`. Docs: https://py.sdk.modelcontextprotocol.io/ Mostly fixes, plus three new options. A few things behave differently, so skim these first: Behaviour changes `httpx2>=2.10.0` is now required (#3600) It was `>=2.5.0`.…
v2.2.0v2.2.0 · 7 Sep 2026`pip install -U mcp`. Docs: https://py.sdk.modelcontextprotocol.io/ A few defaults changed in this release. If you run a server or client on 2.x, skim these first: Behaviour changes HTTP client redirects are only followed within the…
v1.30.0v1.30.0 · 7 Sep 2026Maintenance release of the 1.x line. 2.x is the current line; 1.x docs are at https://py.sdk.modelcontextprotocol.io/v1/. A few defaults changed in this release. If you run a server or client on 1.x, skim these first: Behaviour changes…
v2.0.1v2.0.1 · 26 Aug 2026One off backport of the FastMCP import warning for `2.0.x`, this is due to a lot of people running into this error and making issues on other repos about it. Ideally either pin `mcp<2` or upgrade to 2. What's Changed [v2.0.x] Point imports…
v2.1.1v2.1.1 · 25 Aug 2026What's Changed Point imports of mcp.server.fastmcp at the migration guide by @maxisbey in https://github.com/modelcontextprotocol/python-sdk/pull/3388 Full Changelog:…

README

MCP Python SDK

Python implementation of the Model Context Protocol (MCP)

PyPI MIT licensed Python Version Documentation Protocol Specification

Documentation

The documentation lives at https://py.sdk.modelcontextprotocol.io/.

It has a Get started guide, What's new in v2, the API reference, and the migration guide.

What is MCP?

The Model Context Protocol lets you build servers that expose data and functionality to LLM applications in a secure, standardized way. Think of it like a web API, but designed for LLM interactions. With this SDK you can:

  • Build MCP servers that expose tools, resources, and prompts to any MCP host
  • Build MCP clients that connect to any MCP server
  • Speak every standard transport: stdio, Streamable HTTP, and SSE

Requirements

Python 3.11+.

Installation

uv add "mcp[cli]"      # or: pip install "mcp[cli]"

The cli extra adds the mcp command-line tool (mcp dev, mcp run, mcp install) on top of the SDK; install plain mcp if you don't need it. For one-off commands, uv run --with "mcp[cli]" mcp ... works without a project.

A server in 15 lines

Create a server.py:

from mcp.server import MCPServer

mcp = MCPServer("Demo")


@mcp.tool()
def add(a: int, b: int) -> int:
    """Add two numbers."""
    return a + b


@mcp.resource("greeting://{name}")
def greeting(name: str) -> str:
    """Greet someone by name."""
    return f"Hello, {name}!"

Full example: docs_src/index/tutorial001.py

That's a complete MCP server: one tool, one templated resource. Open it in the MCP Inspector:

uv run mcp dev server.py

Call add with a=1, b=2 and you get 3 back.

Notice what you did not write: no JSON Schema (a: int, b: int is the schema), no request parsing, no validation code, no protocol handling. Two type-hinted Python functions and a docstring.

Get started takes it from here.

A client in 10 lines

The same package is a full MCP client. Serve server.py over HTTP:

uv run mcp run server.py --transport streamable-http

then point a Client at it:

import asyncio

from mcp import Client


async def main() -> None:
    async with Client("http://localhost:8000/mcp") as client:
        result = await client.call_tool("add", {"a": 1, "b": 2})
        print(result.structured_content)  # {'result': 3}


asyncio.run(main())

A URL means Streamable HTTP, the transport you deploy. Client can also launch a local server as a stdio subprocess or take any custom transport; Clients has the rest.

Contributing

We are passionate about supporting contributors of all levels of experience and would love to see you get involved in the project. See the contributing guide to get started.

License

This project is licensed under the MIT License. See the LICENSE file for details.

README fetched from the repository yesterday. The original is authoritative.

Questions

About Python Sdk.git

How do I install Python Sdk.git?

Run uvx mcp, then add the server to your MCP client's configuration.

Is Python Sdk.git safe to use with an AI agent?

Its trust score is 87 out of 100 (strong). It passes 4 of the 5 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Python Sdk.git still maintained?

Yes — the latest release is v2.3.0 (2 Oct 2026), and the last commit was 3 days ago. The repository has 25K stars and 396 open issues.