OpenViSTAI · Agents · Blockchain · Crypto
Menu
MCP & Tooling

MCP Python SDK

MCP Python SDK is a Python software development kit for implementing Model Context Protocol servers and clients. Servers can expose tools, resources and prompts to MCP hosts; clients can connect to MCP servers using stdio, Streamable HTTP or SSE.

Independent OpenViST project profile, based on linked sources.

MCP Python SDK — OpenViST project profile in MCP & Tooling.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when a Python application needs to provide or consume capabilities through MCP, including local development with stdio or server connections over Streamable HTTP and SSE.

Who it is for

  • Python developers building MCP servers for LLM hosts.
  • Developers implementing clients that connect to MCP servers.
  • Teams exposing application functions, data or prompt templates through MCP.

Documented uses

  • Expose Python functions as tools that an MCP host can call.
  • Make application data available as MCP resources.
  • Offer reusable prompt templates through a server.
  • Connect a Python application to an MCP server and call its tools.
Before you choose

Requirements & limits

The SDK is open source under the MIT license. Python 3.10 or newer is required.

  • The SDK supports both MCP server and client implementations.
  • Supported standard transports are stdio, Streamable HTTP and SSE.
  • The cli extra supplies the mcp command-line tool; the base package can be installed without it.
  • The documented example uses Python type hints to describe tool arguments and derives the schema from them.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Install the SDK with its development CLI

Add the MCP Python SDK and CLI commands to a Python project.

Before you start

  • Python 3.10 or newer
  • A project using uv or pip

Steps

  1. Install mcp[cli] with the command below or the command below.

    Documented command
    uv add "mcp[cli]"
    Documented command
    pip install "mcp[cli]"
  2. Use the included mcp command-line tool for the documented development, run and install stages.

Expected outcome

The project has the MCP SDK and the CLI extra, including the `mcp` command.

Guide limitations

  • The documented installation command adds the CLI extra; installing plain mcp omits that tool.
Source-based practical guide

Create and inspect a basic MCP server

Define a server with a tool and templated resource, then open it in MCP Inspector.

Before you start

  • Python 3.10 or newer
  • The SDK installed with its CLI extra
  • A server.py file containing the documented MCPServer tool and resource definitions

Steps

  1. Define an MCPServer instance in server.py.

  2. Add a tool function with @mcp.tool() and a resource function with @mcp.resource().

  3. Run the command below to open the server in MCP Inspector.

    Documented command
    uv run mcp dev server.py

Expected outcome

The example server exposes a callable tool and a templated resource for inspection.

Guide limitations

  • The example documents a basic tool and resource; it does not cover deployment or production configuration.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
1 October 2026
Original website title
modelcontextprotocol/python-sdk · Official homepage title · retained in its source language