LibreAI / AI Agents / python-sdk
// agents · modelcontextprotocol/python-sdk

python-sdk

The official Python SDK for Model Context Protocol servers and clients.

★ 24.5k stars⑂ 4.0k forksMITupdated 2026-10
▦ visual — this project's README ships no embeddable screenshot,
so here's a placeholder. The guide below is complete regardless.
// project facts

Project facts

python-sdk is an open-source ai agents project by modelcontextprotocol (modelcontextprotocol/python-sdk on GitHub). It has 24,508 GitHub stars and 4,018 forks, is released under the MIT license, and was last updated on GitHub on 5 October 2026.

GitHub stars
24,508
Forks
4,018
License
MIT
Last updated on GitHub
5 October 2026
Category
AI Agents
Listing
Full install guide
Official site
Official site
// how it works

How it works

  1. Pick a use case

    Start with one concrete task rather than a grand architecture.

  2. Fetch the source

    Clone the repo and check the examples folder for a quickstart.

  3. Configure it

    Install packages, set environment variables, and point it at your model.

  4. Run and iterate

    Execute the demo workflow, then adapt it to your own data.

// features

Why people love it

Official implementation

From the team behind the MCP spec.

Spec fidelity

The reference for correct behavior.

Servers and clients

Both sides of the protocol.

Python-native

Async-first Python design.

MIT licensed

Permissive and commercial-friendly.

Well documented

Dedicated docs site with guides.

Advertisement
// run it

Run it yourself

  1. Step 1 - Clone the repo

    Download the source and move into the project folder.

    git clone https://github.com/modelcontextprotocol/python-sdk.git
    cd python-sdk
  2. Step 2 - Install dependencies

    Create a virtual environment and install the requirements.

    python -m venv .venv && source .venv/bin/activate
    pip install -r requirements.txt
  3. Step 3 - Run an example

    Treat these as starting points - the README documents the exact commands.

    python examples/quickstart.py
// use cases

What you can build

Advertisement
// faq

Questions, answered

Who maintains this project?

modelcontextprotocol/python-sdk is its home on GitHub, with 4018 forks so far. The contributors tab and recent commits show how actively it is maintained.

Is python-sdk free to use?

Yes - it is MIT licensed, so you can use, modify, and distribute it freely, including in commercial projects.

Do I need a paid API to use it?

The SDK is free; the underlying platform's API may be billed separately - check that service's pricing.

Official SDK vs FastMCP?

The official SDK is the spec-faithful reference; FastMCP is the productivity layer on similar ideas. Learn the SDK to understand the protocol, use FastMCP to ship faster.

How do I get started?

Follow the README quickstart, then browse the examples directory for patterns that match what you want to build.

// keep exploring

Similar tools

AI Agents

typescript-sdk

The official TypeScript SDK for Model Context Protocol servers and clients.

★ 13.5k starsNOASSERTION
View guide →
AI Agents

servers

The official collection of reference Model Context Protocol servers.

★ 91.1k starsNOASSERTION
View guide →
AI Agents

server-sdk-python

The official Python SDK for building on Vapi's voice AI platform.

★ 53 starsNOASSERTION
View guide →
AI Agents

langsmith-sdk

Official SDKs for tracing with LangSmith.

★ 1.1k starsMIT
View guide →
AI Agents

fastmcp

The fast, Pythonic way to build MCP servers and clients.

★ 28.0k starsApache-2.0
View guide →
AI Agents

harness-sdk

An open-source SDK for production agents on any model, any cloud.

★ 8.7k starsApache-2.0
View guide →
// alternatives

Alternatives in AI Agents

The most-starred other AI Agents projects in the LibreAI catalogue — the realistic shortlist if python-sdk is not the right fit.

Get python-sdk

Free and open — grab the source, star the repo, and start creating.