This is a autopost bolg frinds we are trying to all latest sports,news,all new update provide for you
Saturday, January 24, 2026
Show HN: Polymcp – Turn Any Python Function into an MCP Tool for AI Agents https://ift.tt/6ghNF93
Show HN: Polymcp – Turn Any Python Function into an MCP Tool for AI Agents 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://ift.tt/PqVOWDT ") 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://ift.tt/1HobY6U January 25, 2026 at 12:57AM
Subscribe to:
Post Comments (Atom)
Show HN: PHP-fts – Full-text search engine in pure PHP, no extensions https://ift.tt/wgSBiJP
Show HN: PHP-fts – Full-text search engine in pure PHP, no extensions https://ift.tt/WpBoNzV May 7, 2026 at 01:58AM
-
Show HN: A directory of 800 free APIs, no auth required Explore reliable free APIs for developers — ideal for web and software development, ...
-
Show HN: I built Dirac, Hash Anchored AST native coding agent, costs -64.8 pct Fully open source, a hard fork of cline. Full evals on the gi...
-
Show HN: I built a FOSS tool to run your Steam games in the Cloud I wanted to play my Steam games but my aging PC couldn’t keep up, so I bui...
No comments:
Post a Comment