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
EasyMCP is a Python rewrite of the Model Context Protocol (MCP).
uv add easymcp
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").
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.
Namespaced tools enable faster tool calls, routing across multiple MCP hosts, and eliminate the need for globally unique tool names.
Namespaced resources simplify resource URI resolution, allowing easy identification of MCP-related URLs and their associated servers.
easyMCP | modelcontextprotocol/python-sdk |
---|---|
ClientManager | |
ClientSession | ClientSession |
StdioTransport | stdio_client |
This project is licensed under the MIT License.
SecretiveShell/easymcp
March 12, 2025
March 23, 2025
Python