frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: PolyMCP – Expose Python functions as MCP tools

2•justvugg•1h ago
Hi HN,

I built PolyMCP, an open-source framework around the Model Context Protocol (MCP) that lets you expose existing Python functions as AI-callable tools — without rewriting them or adopting a custom SDK.

The goal is simple: If you already have working Python code, you should be able to make it accessible to LLM agents in minutes.

What it does

PolyMCP introspects regular Python functions and exposes them as MCP tools automatically. No decorators required. No framework lock-in.

It grew into a small ecosystem: • PolyMCP (core) – Turn Python functions into MCP tools • PolyMCP Inspector – A visual UI to browse, test, and debug MCP servers • MCP SDK Apps – A lightweight way to build AI-powered apps with tools + UI resources

Why I built this

While experimenting with MCP and AI agents, I found that integrating existing codebases was often the painful part. Most solutions require rewriting logic around a specific SDK or heavily annotating functions.

PolyMCP focuses on: • Minimal intrusion into existing code • Clean separation between business logic and AI tooling • Easy debugging via a visual inspector

Example use cases • Expose internal APIs or legacy scripts to LLM agents • Automate operational workflows • Build internal copilots over real systems • Prototype AI agents that interact with production services

Works with OpenAI, Anthropic, and Ollama (including local models).

It’s still evolving and I’m actively iterating. I’d really appreciate feedback — especially from people building agents or experimenting with MCP in production environments.

GitHub: • Core: https://github.com/poly-mcp/PolyMCP • Inspector: https://github.com/poly-mcp/PolyMCP-Inspector • SDK Apps: https://github.com/poly-mcp/PolyMCP-MCP-SDK-Apps

Happy to answer technical questions.