Polymcp
Turn Any Python Function into an MCP Tool for AI Agents
Get picks like this daily. Today's launch numbers, the top launches, AI and tech news, and a daily opportunity pick, straight to your inbox.
Want to reach these readers? Sponsor an issue.
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
HN · launched Jan 24, 2026 · 23 upvotes (top 33%) · 0 views
Niche: model context protocol tools · 465 launches, 9 in the last 7 days ▼ -55% · Explore this niche →
Category and tags
- Horizontal
- Dev tools
- Developer
- AI-native
- Hobby / open-source project
More like this: all 465 launches in model context protocol tools →
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 : 169 launches clear the similarity bar, closest 8 shown.
Attention rank: #61 of 170 (itself plus its competitors, highest first, normalized so YC and Product Hunt are compared fairly).
Launched 66 days after the earliest competitor.
- Model Tools Protocol (MTP) · hn · 2026-02-10 · 9 upvotes · similarity 0.48
- Callables · ph · 2026-11-13 · 2 upvotes · similarity 0.48
- PipMCP · ph · 2026-09-30 · 2 upvotes · similarity 0.46
- CLI-use · hn · 2026-04-21 · 7 upvotes · similarity 0.46
- MCPify · ph · 2026-10-03 · 1 upvotes · similarity 0.46
- Calling tools w/ Python improves LLM perf. vs MCP (77.1% on BrowseComp) · hn · 2025-12-16 · 10 upvotes · similarity 0.43
- API to MCP · ph · 2026-06-19 · 195 upvotes · similarity 0.42
- Buddy AI Access (MCP) · ph · 2026-09-15 · 99 upvotes · similarity 0.42
The niche, labels, vibe code rating and competitor comparison on this page are analysis by Nicheloom. If you use them, please credit nicheloom.com. How you may use our data.