frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Polymcp – Turn Any Python Function into an MCP Tool for AI Agents

13•justvugg•5h ago
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.

Examples

Simple function:

from polymcp.polymcp_toolkit import expose_tools_http

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

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

Run with:

uvicorn server_mcp:app --reload

Now add is exposed via MCP and can be called directly by AI agents.

API function:

import requests from polymcp.polymcp_toolkit 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")

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

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

Comments

rahimnathwani•15m ago
If you want people to adopt your tool, you may need to explain any advantage this has over fastmcp.

It's already easy to expose a python function as an MCP server. From the fastmcp docs:

  from fastmcp import FastMCP
  
  mcp = FastMCP("Demo ")
  
  @mcp.tool
  def add(a: int, b: int) -> int:
      """Add two numbers"""
      return a + b
  
  if __name__ == "__main__":
      mcp.run()

Show HN: AI agent that searches the Cursor forum

https://cursor.trynia.ai/
2•jellyotsiro•50m ago•0 comments

Show HN: StormWatch – Weather emergency dashboard with prep checklists

https://jeisey.github.io/stormwatch/
23•lotusxblack•5h ago•3 comments

Show HN: C From Scratch – Learn safety-critical C with prove-first methodology

https://github.com/SpeyTech/c-from-scratch
4•william1872•1h ago•0 comments

Show HN: Open-source Figma design to code

https://github.com/vibeflowing-inc/vibe_figma
27•alepeak•19h ago•8 comments

Show HN: Ask CLI – A simple tool to get help with commands from the terminal

https://github.com/david-minaya/ask
3•david-minaya•1h ago•0 comments

Show HN: I built a Mac OS App to upload your screenshots to S3

https://gofwd.to/screenfwd
2•RCM7•1h ago•0 comments

Show HN: Coi – A language that compiles to WASM, beats React/Vue

195•io_eric•4d ago•63 comments

Show HN: Polymcp – Turn Any Python Function into an MCP Tool for AI Agents

13•justvugg•5h ago•1 comments

Show HN: JSciPy – SciPy-inspired signal processing library for Java and Android

https://github.com/hissain/jscipy
7•hissain•4h ago•1 comments

Show HN: Whosthere: A LAN discovery tool with a modern TUI, written in Go

https://github.com/ramonvermeulen/whosthere
270•rvermeulen98•1d ago•87 comments

Show HN: Pingaroo – a tiny native macOS menu bar app for network stats

https://github.com/mallochio/pingaroo
4•mallochio•4h ago•0 comments

Show HN: Kontra - data quality validator that avoids unnecessary full scans

https://github.com/Saevarl/Kontra
2•saevarl•4h ago•0 comments

Show HN: isometric.nyc – giant isometric pixel art map of NYC

https://cannoneyed.com/isometric-nyc/
1297•cannoneyed•2d ago•239 comments

Show HN: Text-to-video model from scratch (2 brothers, 2 years, 2B params)

https://huggingface.co/collections/Linum-AI/linum-v2-2b-text-to-video
154•schopra909•2d ago•24 comments

Show HN: Remote workers find your crew

2•fcpguru•6h ago•5 comments

Show HN: BrowserOS – "Claude Cowork" in the browser

https://github.com/browseros-ai/BrowserOS
86•felarof•2d ago•35 comments

Show HN: S2-lite, an open source Stream Store

https://github.com/s2-streamstore/s2
76•shikhar•3d ago•19 comments

Show HN: I've been using AI to analyze every supplement on the market

https://pillser.com/
88•lilouartz•2d ago•47 comments

Show HN: New 3D Mapping website - Create heli orbits and "playable" map tours.

https://www.easy3dmaps.com/gallery
29•dobodob•1d ago•15 comments

Show HN: Giving Claude Code "hands" to deliver local files (P2P, No Cloud)

https://github.com/nuwainfo/ffl-mcp
3•bear330•13h ago•2 comments

Show HN: Sweep, Open-weights 1.5B model for next-edit autocomplete

https://huggingface.co/sweepai/sweep-next-edit-1.5B
528•williamzeng0•3d ago•151 comments

Show HN: Mastra 1.0, open-source JavaScript agent framework from the Gatsby devs

https://github.com/mastra-ai/mastra
213•calcsam•4d ago•70 comments

Show HN: Rails UI

https://railsui.com/
204•justalever•3d ago•110 comments

Show HN: ChartGPU – WebGPU-powered charting library (1M points at 60fps)

https://github.com/ChartGPU/ChartGPU
664•huntergemmer•3d ago•212 comments

Show HN: Synesthesia, make noise music with a colorpicker

https://visualnoise.ca
37•tevans3•2d ago•13 comments

Show HN: yolo-cage – AI coding agents that can't exfiltrate secrets

https://github.com/borenstein/yolo-cage
59•borenstein•3d ago•74 comments

Show HN: First Claude Code client for Ollama local models

https://github.com/21st-dev/1code
44•SerafimKorablev•2d ago•24 comments

Show HN: Teemux – Zero-config log multiplexer with built-in MCP server

https://teemux.com/
11•gajus•1d ago•9 comments

Show HN: Bible translated using LLMs from source Greek and Hebrew

https://biblexica.com
52•epsteingpt•2d ago•69 comments

Show HN: Heterogeneous Agent Protocol (Derived from Nursing and Construction)

https://github.com/eric2675-coder/Heterogeneous-Agent-Protocol/blob/main/README.md
2•eric2675•14h ago•1 comments