✨ From vibe coding to vibe deployment. UBOS MCP turns ideas into infra with one message.

Learn more
Andrii Bidochko
  • Updated: January 31, 2026
  • 5 min read

Polymcp: Turn Any Python Function into an MCP Tool for AI Agents – New Open‑Source Framework

Polymcp is an open‑source framework that instantly converts any Python function into a Model Context Protocol (MCP) tool, making it callable by AI agents without rewriting or complex integration.

Why Polymcp is the Talk of the AI Community

When a Show HN post on Hacker News announced Polymcp, developers and AI product managers immediately saw a new shortcut for turning legacy Python code into modular AI agents. In a landscape crowded with “fast‑MCP” wrappers and custom micro‑services, Polymcp stands out by offering a single‑pane, production‑ready toolkit that bundles exposure, governance, and orchestration.

For tech‑savvy teams looking to accelerate AI automation—whether you’re a startup building a chatbot or an enterprise scaling AI‑driven workflows—Polymcp promises to cut weeks of engineering effort down to minutes.

What Is Polymcp?

Polymcp (short for “Poly‑Model Context Protocol”) is a Python library that:

  • Wraps any existing Python function with an HTTP‑based MCP endpoint.
  • Generates a standardized JSON schema for inputs, outputs, and error handling.
  • Provides a built‑in Inspector UI for debugging tool calls in real time.
  • Offers production guardrails such as request budgets, logging, redaction, and allow‑lists.
  • Supports execution in the browser via WebAssembly (Pyodide) for edge‑level AI agents.

The result is a plug‑and‑play MCP server that AI agents—like those built on AI marketing agents—can discover and invoke without any additional glue code.

Key Features and Benefits

Zero‑Code Exposure

Simply import expose_tools_http and pass your function list. Polymcp auto‑generates the MCP contract, eliminating boilerplate.

Unified Orchestration

Multiple tools can be served from a single MCP server, enabling AI planners to chain operations (e.g., fetch data → transform → store) with a single HTTP call.

Built‑In Governance

Set per‑tool budgets, enable request logging, and configure redaction policies—all from a declarative YAML file.

Browser & Edge Execution

Polymcp can compile to WebAssembly, letting AI agents run tools directly in the browser or at the edge without a backend server.

Inspector UI

A visual dashboard shows live request/response payloads, making debugging as easy as watching a network tab.

Production‑Ready Security

Side‑effects are isolated behind explicit execution boundaries, and secret handling follows least‑privilege principles.

Polymcp architecture diagram

Real‑World Use‑Cases

1. Rapid Prototyping of Math Helpers

Data‑science teams often need simple arithmetic utilities for prompt‑based calculations. With Polymcp, a one‑line function like def add(a: int, b: int) -> int: return a + b becomes an MCP endpoint instantly. AI agents can call add(5, 7) and receive 12 without any extra wrapper.

2. Real‑Time Weather Queries

Customer‑support bots built on the AI Chatbot template can now fetch live weather data by exposing a get_weather(city) function. The MCP server handles API keys securely, and the bot returns a human‑readable forecast in seconds.

3. Sales Commission Calculations for SMBs

Small‑to‑medium businesses often rely on spreadsheets for commission logic. By wrapping a Pandas‑based calculator with Polymcp, the same logic becomes an AI‑driven service that can be invoked from a CRM, an internal Slack bot, or a Workflow automation studio flow.

4. Edge‑Level Content Moderation

Using the WebAssembly build, developers can ship a profanity‑filter function to the browser. AI agents embedded in a web app can call the filter locally, reducing latency and preserving user privacy.

5. AI‑Powered SEO Audits

Combine Polymcp with the AI SEO Analyzer template. Expose the analyzer as an MCP tool, then let an AI marketing agent automatically audit new pages as they are published on your site.

Community Reaction on Hacker News

The Hacker News thread quickly gathered over 20 comments, with developers praising Polymcp’s “single‑pane” approach. One user highlighted the built‑in Inspector UI as a “game‑changer for debugging AI‑driven tool calls.” Another pointed out the importance of the production guardrails, noting that “security‑first design is rare in open‑source MCP projects.”

Critics asked how Polymcp compares to existing solutions like fastmcp. The author responded that Polymcp is not a replacement but an extension: it adds WASM support, a visual inspector, and policy‑driven governance on top of the basic MCP server.

Overall, the sentiment was overwhelmingly positive, with many commenters planning to integrate Polymcp into their own AI agents and share their experiences on GitHub.

How to Get Started with Polymcp

  1. Clone the repository: git clone https://github.com/poly-mcp/Polymcp.git
  2. Install dependencies: pip install -r requirements.txt
  3. Expose a function using the expose_tools_http helper (see examples above).
  4. Run the server: uvicorn server_mcp:app --reload
  5. Visit the Inspector UI at http://localhost:8000/inspector to see live calls.

For a step‑by‑step tutorial, check the Web app editor on UBOS, which now includes a Polymcp starter template. The editor lets you spin up a fully configured MCP server with a single click, then connect it to any of UBOS’s AI marketing agents or Enterprise AI platform by UBOS.

Take the Next Step

If you’re ready to turn your Python codebase into a fleet of modular AI tools, start with Polymcp today and integrate it into the broader UBOS ecosystem. Whether you’re a startup (UBOS for startups), an SMB (UBOS solutions for SMBs), or an enterprise, the platform’s UBOS platform overview provides the scalability and security you need.

Explore ready‑made templates like the AI Article Copywriter or the AI Video Generator to see how MCP tools can be combined with other AI services. When you’re ready to discuss partnership or need custom consulting, visit the UBOS partner program.

Don’t forget to review the UBOS pricing plans to choose a tier that matches your usage patterns. With transparent pricing and a generous free tier, you can experiment without breaking the bank.

Start building smarter AI agents now—Polymcp makes the bridge from code to context effortless.

© 2026 UBOS. All rights reserved.


Andrii Bidochko

CTO UBOS

Andrii Bidochko is an AI entrepreneur and researcher focused on AI agents, reinforcement learning, and autonomous systems. He writes about the technologies shaping the future of machine intelligence, from frontier models and agent architectures to real-world AI applications.

Sign up for our newsletter

Stay up to date with the roadmap progress, announcements and exclusive discounts feel free to sign up with your email.

Sign In

Register

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.