Show HN: PolyMCP – AI-Callable Python and TS Tools with Inspector and Apps
by justvugg | 2026-02-10 20:03:43+00:00
I built PolyMCP, an open-source framework around the Model Context Protocol (MCP) that lets you turn any existing Python function into an MCP tool usable by AI agents — with no rewrites, no glue code, no custom wrappers.

Over the last weeks, PolyMCP has grown into a small ecosystem:
• PolyMCP (core) – expose Python functions as MCP tools
• PolyMCP Inspector – visual UI to explore, test, and debug MCP servers
• PolyMCP MCP SDK Apps – build MCP-powered apps with tools + UI resources

⸻

1) Turn any Python function into an MCP tool

Basic example:

from polymcp import expose_tools_http

def add(a: int, b: int) -> int:
"""Add two numbers"""
return a + b

app = expose_tools_http(
tools=[add],
title="Math Tools"
)

Run it:

uvicorn server_mcp:app --reload

Now add is an MCP-compliant tool that any AI agent can discover and call.

No decorators, no schema files, no agent-specific SDKs.

⸻

2) Real APIs, not toy examples

Existing API code works as-is:

import requests
from polymcp import expose_tools_http

def 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")

Agents can now call:

get_weather("London")

and receive real-time data.

⸻

3) Business & internal workflows

Example: internal reporting logic reused directly by agents.

import pandas as pd
from polymcp import expose_tools_http

def 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")

No rewriting legacy logic.

4) PolyMCP Inspector (visual debugging)

To make MCP development usable in practice, I added PolyMCP Inspector:
• Visual UI to browse tools, prompts, and resources
• Call MCP tools interactively
• Inspect schemas, inputs, outputs, and errors
• Multi-server support (HTTP + stdio)
• Built-in chat playground (OpenAI / Anthropic / Ollama)

Think “Postman + DevTools” for MCP servers.

Repo: https://github.com/poly-mcp/PolyMCP-Inspector

⸻

5) MCP SDK Apps (tools + UI)

The latest addition is PolyMCP MCP SDK Apps:
• Build MCP apps, not just tools
• Expose:
• tools
• UI resources (HTML/JS dashboards)
• app-level workflows
• Let agents interact with both tools and UIs

This is useful for:
• internal copilots
• ops dashboards
• support tools
• enterprise AI frontends

Repo: https://github.com/poly-mcp/PolyMCP-MCP-SDK-Apps

⸻

Why this matters (especially for companies)
• Reuse existing code immediately (scripts, APIs, internal libs)
• Standard MCP interface instead of vendor-specific agent SDKs
• Multiple tools, one server
• Agent-driven orchestration, not hardcoded flows
• Faster AI adoption without refactoring everything

PolyMCP treats AI agents as clients of your software, not magic wrappers around it.

⸻

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

Happy to hear feedback from people building MCP servers, agents, or internal AI tools.