easymcp

EasyMCP is a Python rewrite of the Model Context Protocol, offering features like server management, dynamic addition/removal, namespaced tools/resources, and automatic cache invalidation for efficient server interactions. EasyMCP is a

15
1

EasyMCP

EasyMCP is a Python rewrite of the Model Context Protocol (MCP).

Installation

uv add easymcp

Usage

The high-level API uses a ClientManager class to manage multiple MCP servers. The example code demonstrates initializing the manager with StdioServerParameters for "searxng" and "timeserver," listing servers and tools, removing and adding servers dynamically, calling a tool ("timeserver.get-current-time"), listing resources, and reading a resource ("mcp-timeserver+datetime://Africa/Algiers/now").

Core Features

EasyMCP offers list tools/resources/prompts caching, automatic cache invalidation, parallel request support, full server lifecycle management, dynamic server addition/removal, namespaced tools/resources/prompts, and a lightweight asyncio native implementation.

Why namespace tools?

Namespaced tools enable faster tool calls, routing across multiple MCP hosts, and eliminate the need for globally unique tool names.

Why namespace resources?

Namespaced resources simplify resource URI resolution, allowing easy identification of MCP-related URLs and their associated servers.

Comparison of classes to other MCP libraries

easyMCPmodelcontextprotocol/python-sdk
ClientManager
ClientSessionClientSession
StdioTransportstdio_client

License

This project is licensed under the MIT License.

Repository

SE
SecretiveShell

SecretiveShell/easymcp

Created

March 12, 2025

Updated

March 23, 2025

Language

Python

Category

Developer Tools