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.
- Model Tools Protocol (MTP) · hn · 2026-02-10 · 9 upvotes · similarity 0.47
- PipMCP · ph · 2026-09-30 · 2 upvotes · similarity 0.45
- mcp-audit-tool · github · 2026-09-26 · 120 upvotes · similarity 0.45
- CLI-use · hn · 2026-04-21 · 7 upvotes · similarity 0.45
- Calling tools w/ Python improves LLM perf. vs MCP (77.1% on BrowseComp) · hn · 2025-12-16 · 10 upvotes · similarity 0.41
- Buddy AI Access (MCP) · ph · 2026-09-15 · 99 upvotes · similarity 0.41
- API to MCP · ph · 2026-06-19 · 195 upvotes · similarity 0.41
- MCPlexor · hn · 2026-02-09 · 6 upvotes · similarity 0.39
Other launches for this product
- No other launches for this product.
Same idea, different domain
Nobody's really built a agent / copilot tool for Agriculture yet.