Nicheloom

Market intelligence for builders — see what's gaining traction before it's crowded.

Polymcp

Turn Any Python Function into an MCP Tool for AI Agents

Details

External ID
46746700
Source
HN
Company
—
Product
—
Website domain
—
Launched
Jan. 24, 2026
Cohort
—
Upvotes
23
Upvotes percentile
0.6732542819499341
Tags
—
Fetched at
Sept. 7, 2026, 9:25 p.m.
Updated at
Sept. 7, 2026, 9:25 p.m.

Description

I built Polymcp, a framework that allows you to transform any Python function into an MCP (Model Context Protocol) tool ready to be used by AI agents. No rewriting, no complex integrations.ExamplesSimple function:from polymcp.polymcp_toolkit import expose_tools_httpdef add(a: int, b: int) -> int: """Add two numbers""" return a + bapp = expose_tools_http([add], title="Math Tools")Run with:uvicorn server_mcp:app --reloadNow add is exposed via MCP and can be called directly by AI agents.API function:import requests from polymcp.polymcp_toolkit import expose_tools_httpdef get_weather(city: str): """Return current weather data for a city""" response = requests.get(f"https://api.weatherapi.com/v1/current.json?q={city}") return response.json()app = expose_tools_http([get_weather], title="Weather Tools")AI agents can call get_weather("London") to get real-time weather data instantly.Business workflow function:import pandas as pd from polymcp.polymcp_toolkit import expose_tools_httpdef calculate_commissions(sales_data: list[dict]): """Calculate sales commissions from sales data""" df = pd.DataFrame(sales_data) df["commission"] = df["sales_amount"] * 0.05 return df.to_dict(orient="records")app = expose_tools_http([calculate_commissions], title="Business Tools")AI agents can now generate commission reports automatically.Why it matters for companies • Reuse existing code immediately: legacy scripts, internal libraries, APIs. • Automate complex workflows: AI can orchestrate multiple tools reliably. • Plug-and-play: multiple Python functions exposed on the same MCP server. • Reduce development time: no custom wrappers or middleware needed. • Built-in reliability: input/output validation and error handling included.Polymcp makes Python functions immediately usable by AI agents, standardizing integration across enterprise software.Repo: https://github.com/poly-mcp/Polymcp

Enrichment

Theme
Model Context Protocol developer tools
Vertical
Horizontal
Function
Agent / copilot
Audience
Developer
AI stance
AI feature
Project type
Hobby / open-source project
Normalized one-liner
python to mcp tool converter for ai agents
Manually corrected
False

Could you build this?

Yes It is a Python wrapper that uses type hints and Python's `inspect` module to generate JSON schemas matching Anthropic's Model Context Protocol (MCP) specification and expose them over HTTP/stdio.

Discussion

7 comments analyzed.

Competitors mentioned: FastMCP, Pyodide

Concerns raised: Unclear differentiation from FastMCP for basic MCP server use cases, How to handle secrets and scoped credentials when arbitrary Python functions become tools, Auditing and least-privilege enforcement across side-effectful tools, Original Show HN post didn't clearly communicate key capabilities

Feature requests: Audit logs and correlation IDs for tool execution, Short-lived credentials per tool call, Expose tool capabilities to planner without exposing credentials

Competitors

Other products that read as similar to this one — 72 launches clear the similarity bar, closest 8 shown.

Attention rank: #25 of 73 (itself plus its competitors, highest first — normalized so YC and Product Hunt are compared fairly).

Launched 51 days after the earliest competitor.

Other launches for this product

Same idea, different domain

Nobody's really built a agent / copilot tool for Agriculture yet.