{"id":27876251,"url":"https://github.com/promptmesh/easymcp","last_synced_at":"2025-05-05T02:45:28.255Z","repository":{"id":282499176,"uuid":"947233501","full_name":"promptmesh/easymcp","owner":"promptmesh","description":"A high performance MCP client sdk for python","archived":false,"fork":false,"pushed_at":"2025-04-08T23:59:48.000Z","size":909,"stargazers_count":15,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-04T23:40:29.285Z","etag":null,"topics":["ai","client","mcp","mcp-client","modelcontextprotocol","python"],"latest_commit_sha":null,"homepage":"https://easymcp.promptmesh.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/promptmesh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"SecretiveShell","ko_fi":"secretiveshell"}},"created_at":"2025-03-12T11:12:31.000Z","updated_at":"2025-04-24T16:18:21.000Z","dependencies_parsed_at":"2025-03-30T16:40:35.072Z","dependency_job_id":null,"html_url":"https://github.com/promptmesh/easymcp","commit_stats":null,"previous_names":["secretiveshell/easymcp","promptmesh/easymcp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/promptmesh%2Feasymcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/promptmesh%2Feasymcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/promptmesh%2Feasymcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/promptmesh%2Feasymcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/promptmesh","download_url":"https://codeload.github.com/promptmesh/easymcp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252429935,"owners_count":21746570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","client","mcp","mcp-client","modelcontextprotocol","python"],"created_at":"2025-05-05T02:45:26.139Z","updated_at":"2025-05-05T02:45:28.251Z","avatar_url":"https://github.com/promptmesh.png","language":"Python","funding_links":["https://github.com/sponsors/SecretiveShell","https://ko-fi.com/secretiveshell"],"categories":["Frameworks \u0026 Libraries","📚 Projects (2474 total)","SDKs"],"sub_categories":["Knowledge Management","MCP Servers","Python"],"readme":"# EasyMCP\r\n\r\nEasyMCP is a complete rewrite of the model context protocol (MCP) in Python.\r\n\r\n## Installation\r\n\r\n```bash\r\nuv add easymcp\r\n```\r\n\r\n## Usage\r\n\r\nThe high level API exposes a ClientManager class that can be used to manage multiple MCP servers.\r\n\r\n```python\r\nimport asyncio\r\nfrom easymcp.client.ClientManager import ClientManager\r\nfrom easymcp.client.transports.stdio import StdioServerParameters\r\n\r\nmgr = ClientManager()\r\n\r\nsearxng = StdioServerParameters(\r\n    command=\"uvx\",\r\n    args=[\"mcp-searxng\"],\r\n)\r\n\r\ntimeserver = StdioServerParameters(\r\n    command=\"uvx\",\r\n    args=[\"mcp-timeserver\"],\r\n)\r\n\r\nservers = {\r\n    \"searxng\": searxng,\r\n    \"timeserver\": timeserver,\r\n}\r\n\r\nasync def main():\r\n    # initialize the client manager\r\n    await mgr.init(servers=servers)\r\n\r\n    # list servers\r\n    print(mgr.list_servers())\r\n\r\n    # remove a server\r\n    await mgr.remove_server(\"searxng\")\r\n\r\n    # add a server\r\n    await mgr.add_server(\"searxng\", searxng)\r\n\r\n    # list tools - these are namespaced by server name automatically\r\n    # {server name}.{tool name}\r\n    print(await mgr.list_tools())\r\n\r\n    # call tool\r\n    print(await mgr.call_tool(\"timeserver.get-current-time\", {}))\r\n\r\n    # list resources - these are namespaced by server name automatically\r\n    # mcp-{server name}+{resource uri}\r\n    print(await mgr.list_resources())\r\n\r\n    # read resource\r\n    print(await mgr.read_resource(\"mcp-timeserver+datetime://Africa/Algiers/now\"))\r\n\r\n    await asyncio.Future()\r\n\r\nasyncio.run(main())\r\n```\r\n\r\n## Core Features\r\n\r\n- list tools/resources/prompts caching out of the box\r\n- automatic cache invalidation on tool/resource/prompt change notifications\r\n- out of the box support for parallel requests to servers\r\n- full lifecycle management of servers\r\n- dynamic server addition/removal\r\n- namespaced tools/resources/prompts\r\n- lightweight asyncio native implementation\r\n\r\n## Why namespace tools?\r\n\r\nNamespaced tools remove need to perform a lookup to find the correct tool. This means:\r\n\r\n- faster tool calls\r\n- tool calls can be routed across many MCP hosts at scale\r\n- mcp servers do not need globally unique tool names\r\n\r\n## Why namespace resources?\r\n\r\nResources are namespaced in a way that makes it easy to make a resource URI to a specific server. You can:\r\n\r\n- check if a URL needs to be resolved via mcp by checking if it starts with `mcp`\r\n- check what server to resolve the URI with\r\n- ingest resources into a search system like elastic search without having to store metadata about the server\r\n- completely eliminate the need to map URIs to servers via a database or lookup table\r\n\r\n## Comparison of classes to other MCP libraries\r\n\r\n| **easyMCP**    | **modelcontextprotocol/python-sdk** |                              |\r\n| -------------- | ----------------------------------- | ---------------------------- |\r\n| ClientManager  |                                     | manages multiple MCP servers |\r\n| ClientSession  | ClientSession                       | manages a single MCP server  |\r\n| StdioTransport | stdio_client                        | raw subprocess transport     |\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpromptmesh%2Feasymcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpromptmesh%2Feasymcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpromptmesh%2Feasymcp/lists"}