展示HN:PolyMCP – 一个用于MCP服务器和代理集成的工具包

1作者: justvugg23 天前原帖
PolyMCP是一个用于构建和与MCP(模型上下文协议)服务器交互的框架,同时也用于创建能够将这些服务器作为动态工具使用的代理。<p>开发和管理MCP服务器通常面临几个挑战:<p>将Python函数暴露为可发现的工具需要重复的样板代码。<p>同时协调多个MCP服务器是复杂的。<p>在开发过程中,由于对调用和输出的可见性有限,调试工具变得困难。<p>将代理与大型语言模型(LLM)集成以自动发现和调用工具通常是临时的。<p>PolyMCP通过以下方式解决这些挑战:<p>灵活的工具暴露:Python函数可以通过HTTP、进程内或标准输入输出以最小的设置进行服务。<p>检查仪表板:实时互动监控工具调用、指标和测试调用。<p>代理集成:支持多个LLM提供商以及自动工具发现和调用。<p>命令行界面和工作流工具:简化项目设置、测试和执行。<p>PolyMCP减少了MCP服务器开发和多工具代理编排中的摩擦,为构建智能、工具驱动的系统提供了一个可靠的框架。<p>GitHub: <a href="https:&#x2F;&#x2F;github.com&#x2F;poly-mcp&#x2F;Polymcp" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;poly-mcp&#x2F;Polymcp</a>
查看原文
PolyMCP is a framework for building and interacting with MCP (Model Context Protocol) servers and for creating agents that can use those servers as dynamic tools.<p>Developing and managing MCP servers often involves several challenges:<p>Exposing Python functions as discoverable tools requires repetitive boilerplate.<p>Coordinating multiple MCP servers simultaneously is complex.<p>Debugging tools during development is hard due to limited visibility into calls and outputs.<p>Integrating agents with LLMs to automatically discover and invoke tools is usually ad-hoc.<p>PolyMCP addresses these challenges by providing:<p>Flexible tool exposure: Python functions can be served over HTTP, in-process, or stdio with minimal setup.<p>Inspector dashboard: Monitor tool invocations, metrics, and test calls interactively in real-time.<p>Agent integration: Support for multiple LLM providers and automatic tool discovery and invocation.<p>CLI and workflow utilities: Streamline project setup, testing, and execution.<p>PolyMCP reduces friction in MCP server development and multi-tool agent orchestration, offering a reliable framework for building intelligent, tool-driven systems.<p>Github: <a href="https:&#x2F;&#x2F;github.com&#x2F;poly-mcp&#x2F;Polymcp" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;poly-mcp&#x2F;Polymcp</a>