Show HN: PolyMCP Skills – 基于 MCP 的 AI 智能体可扩展工具组织方案

1作者: justvugg19 天前
大家好, 我为 PolyMCP 添加了一个技能系统,以解决大规模 MCP 服务器的常见问题。 当工具数量增加时: * 代理会消耗大量 token 来加载原始模式 * 工具发现变得嘈杂 * 不同的代理需要不同的工具子集 * 编排逻辑会泄漏到提示中 技能是经过整理、结构化的 MCP 工具集,并附带文档。 代理仅加载他们需要的技能,而不是完整的工具模式。 技能通过从 MCP 服务器发现工具并自动分类来生成。 示例:从 Playwright MCP 服务器生成技能: ``` polymcp skills generate --servers "npx @playwright/mcp@latest" ``` HTTP MCP 服务器: ``` polymcp skills generate \ --servers "http://localhost:8000/mcp" \ --output ./mcp_skills ``` Stdio MCP 服务器: ``` polymcp skills generate \ --stdio \ --servers "npx -y @playwright/mcp@latest" \ --output ./mcp_skills ``` 在代理中启用技能: ```python agent = UnifiedPolyAgent( llm_provider=llm, skills_enabled=True, skills_dir="./mcp_skills", ) ``` 优点: * 更小的代理上下文 * 可扩展到大型工具集 * 跨代理的可重用功能 * 无需更改提示即可进行工具访问控制 * 适用于 HTTP 和 stdio MCP 服务器 仓库:[https://github.com/poly-mcp/Polymcp](https://github.com/poly-mcp/Polymcp)
查看原文
Hi everyone, I added a skills system to PolyMCP to solve a common issue with MCP servers at scale.<p>When the number of tools grows: • Agents burn tokens loading raw schemas • Tool discovery becomes noisy • Different agents need different subsets of tools • Orchestration logic leaks into prompts<p>Skills are curated, structured sets of MCP tools with documentation. Agents load only the skills they need instead of full tool schemas.<p>Skills are generated by discovering tools from MCP servers and auto-categorizing them.<p>Example: generate skills from a Playwright MCP server:<p>polymcp skills generate --servers &quot;npx @playwright&#x2F;mcp@latest&quot;<p>HTTP MCP servers:<p>polymcp skills generate \ --servers &quot;http:&#x2F;&#x2F;localhost:8000&#x2F;mcp&quot; \ --output .&#x2F;mcp_skills<p>Stdio MCP servers:<p>polymcp skills generate \ --stdio \ --servers &quot;npx -y @playwright&#x2F;mcp@latest&quot; \ --output .&#x2F;mcp_skills<p>Enable skills in an agent:<p>agent = UnifiedPolyAgent( llm_provider=llm, skills_enabled=True, skills_dir=&quot;.&#x2F;mcp_skills&quot;, )<p>Benefits: • Smaller agent context • Scales to large tool sets • Reusable capabilities across agents • Tool access control without prompt changes • Works with HTTP and stdio MCP servers<p>Repo: <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>