PolyMCP
Polymcp provides a simple and efficient way to interact with MCP servers using custom agents
claude mcp add --transport stdio poly-mcp-polymcp uvx polymcp
How to use
PolyMCP is a universal MCP toolkit and agent framework for Python and TypeScript. It enables you to expose Python or TypeScript tools as MCP servers, connect them via HTTP, stdio, or in-process transports, and orchestrate them with agents. You can create MCP HTTP servers from plain Python functions, run tools over HTTP using the provided expose_tools_http helper, and compose autonomous workflows with the PolyClaw system. The Inspector app provides a fast way to test servers, prompts, and UI resources, while the Agents ecosystem lets you orchestrate multiple servers and even combine Python and TypeScript components in a single workflow. Typical usage includes defining tools in Python, exposing them over HTTP, and then building higher-level agents that call those tools as needed.
To use PolyMCP, install the Python package, start a server (for example via uvicorn for an HTTP server), and connect clients or inspectors to the server endpoint. You can also leverage the CLI to initialize projects, add MCP servers, and run agents. The TypeScript side (polymcp-ts) offers a parallel implementation and runnable use cases, allowing you to build TypeScript MCP services or integrate with the Inspector and MCP Apps SDK. Tools can be exposed with HTTP transports or other MCP transports, and agents can orchestrate tool calls, data processing, and prompts across multiple servers.
How to install
Prerequisites:
- Python 3.8+ (recommended 3.8 or newer)
- pip (version compatible with your Python)
-
Create a virtual environment (optional but recommended): python -m venv .venv source .venv/bin/activate # on Unix or macOS ..venv\Scripts\activate # on Windows
-
Install PolyMCP from PyPI: pip install polymcp
-
(Optional) Install typing and dev tools for development: pip install -e .[dev] # if you are working from a checkout
-
If you plan to use TypeScript tooling as well, install Node.js 18+ and the polymcp-ts package:
in a separate workspace
cd polymcp-ts npm install npm run build
-
Run a sample HTTP server (Python):
Example using a simple HTTP server exposed from functions
uvicorn server:app --host 0.0.0.0 --port 8000
-
Verify the server is running by hitting the endpoint (e.g., http://localhost:8000/mcp) and using the Inspector or CLI tooling to interact with it.
Additional notes
Notes and tips:
- PolyMCP supports multiple transports (HTTP, stdio, in-process). Choose the transport that fits your deployment scenario.
- The Inspector provides a quick playground to test servers, tools, prompts, and UI resources without building a full UI. Use it to validate tool calls and responses.
- Skills and agents: PolyMCP includes an agent framework for orchestrating multiple servers. You can integrate OpenAI or other providers as LLM backends for planning and tool selection.
- Environment variables: you may want to configure API keys (e.g., OPENAI_API_KEY), host/port bindings, and Docker-related settings if you experiment with PolyClaw.
- For TypeScript users, polymcp-ts offers a parallel runtime in TypeScript; you can build cross-language workflows by combining Python and TS servers.
- If you encounter issues with server startup, ensure dependencies are installed, your Python path is correct, and the port you choose is not in use. Check the Inspector logs and the CLI help messages for troubleshooting guidance.
Related MCP Servers
mcp-for-beginners
This open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable, and secure AI workflows from session setup to service orchestration.
mcp
🤖 Taskade MCP · Official MCP server and OpenAPI to MCP codegen. Build AI agent tools from any OpenAPI API and connect to Claude, Cursor, and more.
pluggedin-app
The Crossroads for AI Data Exchanges. A unified, self-hostable web interface for discovering, configuring, and managing Model Context Protocol (MCP) servers—bringing together AI tools, workspaces, prompts, and logs from multiple MCP sources (Claude, Cursor, etc.) under one roof.
dynamic-shell
Dynamic Shell Command MCP Server
mirroir
MCP server for controlling a real iPhone via macOS iPhone Mirroring...and any MacOs app. Screenshot, tap, swipe, type — from any MCP client.
mcp-jest
Automated testing for Model Context Protocol servers. Ship MCP Servers with confidence.