Po

PolyMCP – Expose Python/TS functions as MCP tools easily

Hacker News

PolyMCP – Expose Python/TS functions as MCP tools easily

I made PolyMCP so I could quickly turn normal functions (Python or TypeScript) into MCP tools without much extra work. Python example: from polymcp.polymcp_toolkit import expose_tools def greet(name: str) -> str: """Say hello.""" return f"Hello, {name}!" def add(a: int, b: int) -> int: """Add two numbers.""" return a + b app = expose_tools([greet, add], title="My MCP Tools") Run with: uvicorn server:app --reload MCP endpoints appear at /mcp/list_tools and /mcp/invoke/. TypeScript example: import { z } from 'zod'; import { tool, exposeTools } from 'polymcp'; const uppercaseTool = tool({ name: 'uppercase', description: 'Convert text to uppercase', inputSchema: z.object({ text: z.string() }), function: async ({ text }) => text.toUpperCase(), }); const app = exposeTools([uppercaseTool], { title: "Text Tools" }); app.listen(3000); Business example (Python): import pandas as pd from polymcp.polymcp_toolkit import expose_tools def calculate_commissions(sales_data: list[dict]): df = pd.DataFrame(sales_data) df["commission"] = df["sales_amount"] * 0.05 return df.to_dict(orient="records") app = expose_tools([calculate_commissions], title="Business Tools") What you get: • Reuse existing code with minimal changes • Compatible with MCP clients (Claude Desktop, agents, Ollama, etc.) • HTTP and stdio and Wasm support • Automatic validation • Basic production features (budgets, retries, redaction, logs) • Inspector: polymcp inspector for testing/monitoring Install: • Python: pip install polymcp • TypeScript: clone repo → cd polymcp-ts → npm install → npm run build Repo: https://github.com/poly-mcp/Polymcp Curious what kind of function people would expose first if it was this simple. Feedback welcome.

Share card

Actual performance

1points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Product HuntOn track for Day 1 leaderboard · Strong signals: agents, agent, claude · Missing: mac, macos, cursor
81%81% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Indie HackersFits the IH revenue-focused audience · Strong signals: compatible · Missing: supports, reddit linkedin, podcasting
69%69% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Missing: mobile apps, ios, personal
50%50% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Hacker NewsMay not resonate with HN audience · Strong signals: exist, existing, llama · Missing: https docs, excited, just released
30%30% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
30%30% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
24%24% predicted probability of success on AppSumo, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
3%3% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

Ea
Easily build microservices in Python64%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Easily build microservices in Python

Hacker News2
Ep
Epipy – Python tools for epidemiology51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Epipy – Python tools for epidemiology

Hacker News28
Po
PolyMCP – Expose Python and TypeScript Functions as MCP Tools35%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

PolyMCP – Expose Python and TypeScript Functions as MCP Tools

Hacker News1
Te
Test refactored code in python easily45%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Test refactored code in python easily

Hacker News2
Ea
Easily test your refactored Python code50%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Easily test your refactored Python code

Hacker News12
Cr
Create MCP Servers and Agents Easily with PolyMCP (Python and TS)30%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Create MCP Servers and Agents Easily with PolyMCP (Python and TS)

Hacker News2
Ea
Easily serialize and deserialize Python objects42%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Easily serialize and deserialize Python objects

Hacker News6
Cu
CustomStringParser ( Python)54%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

CustomStringParser ( Python)

Hacker News1
Lu
Lusernews is an implementation of lamernews in python48%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Lusernews is an implementation of lamernews in python

Hacker News1
Do
Do/While in Python55%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Do/While in Python

Hacker News4