Agent技能MCP:将Anthropic的代理技能带给任何兼容MCP的代理
简体中文 | English
📖 项目概述
代理技能 是Anthropic最近推出的一项新功能。通过将专业技能打包成模块化资源,它使Claude能够按需转变为适合任何场景的“量身定制的专家”。 Agent技能MCP,建立在 FlowLLM 框架,为任何兼容MCP的代理解锁克劳德的专有代理技能。 它实现了 渐进式披露 Anthropic官方提出的建筑 Agent Skills工程博客,使代理能够根据需要加载必要的技能,从而有效地利用有限的上下文窗口。
💡 为什么选择Agent技能MCP?
- ✅ 零代码配置:一个命令安装(
pip install mcp-agentskills) - ✅ 开箱即用:使用官方Skill格式,与完全兼容 Anthropic的代理技能
- ✅ MCP支持:多种传输(stdio/SSE/HTTP),可与任何兼容MCP的代理配合使用
- ✅ 灵活的技能路径:具有自动检测、解析和加载功能的自定义技能目录
🔥 最新动态
- \[2025-12\] 🎉 发布mcp代理技能v0.1.1
🚀 快速开始
安装
使用pip安装AgentSkills MCP:
pip install mcp-agentskills或者使用紫外线:
uv pip install mcp-agentskillsFor Development (if you want to modify the code):
git clone https://github.com/zouyingcao/agentskills-mcp.git
cd agentskills-mcp
conda create -n agentskills-mcp python==3.10
conda activate agentskills-mcp
pip install -e .______________________________________________________________________
负载技能
- 创建一个目录来存储技能,例如:
mkdir skills- 从开源GitHub存储库克隆,例如。,
https://github.com/anthropics/skills
https://github.com/ComposioHQ/awesome-claude-skills- 将收集到的技能添加到步骤1中创建的目录中。每个技能都是一个包含Skill.md文件的文件夹。
______________________________________________________________________
跑
Local process communication (stdio)
This mode runs AgentSkills MCP via uvx and communicates through stdin/stdout, suitable for local MCP clients.
{
"mcpServers": {
"agentskills-mcp": {
"command": "uvx",
"args": [
"agentskills-mcp",
"config=default",
"mcp.transport=stdio",
"metadata.skill_dir=\"./skills\""
],
"env": {
"FLOW_LLM_API_KEY": "xxx",
"FLOW_LLM_BASE_URL": "https://dashscope.aliyuncs.com/compatible-mode/v1"
}
}
}
}Remote communication (SSE/HTTP Server)
This mode runs AgentSkills MCP as a standalone SSE/HTTP server that can be accessed remotely.
-第一步: 配置环境变量
复制 example.env 到 .env 并填写您的API密钥:
cp example.env .env
# Edit the .env file and fill in your API key-第二步: 启动服务器
使用SSE传输启动AgentSkills MCP服务器:
agentskills-mcp \
config=default \
mcp.transport=sse \
mcp.host=0.0.0.0 \
mcp.port=8001 \
metadata.skill_dir="./skills"该服务将在以下地点提供: http://0.0.0.0:8001/sse
-步骤3: 从MCP客户端连接
- 将此配置添加到您的MCP客户端(Cursor、Gemini Code、Cline等)以连接到远程SSE服务器:
{
"mcpServers": {
"agentskills-mcp": {
"type": "sse",
"url": "http://0.0.0.0:8001/sse"
}
}
}- 你也可以使用 FastMCP Python客户端直接访问服务器:
import asyncio
from fastmcp import Client
async def main():
async with Client("http://0.0.0.0:8001/sse") as client:
tools = await client.list_tools()
for tool in tools:
print(tool)
result = await client.call_tool(
name="load_skill",
arguments={
"skill_name"="pdf"
}
)
print(result)
asyncio.run(main())一个命令测试
This command will start the server, connect via FastMCP client, and test all available tools automatically.
python tests/run_project_sse.py
or
python tests/run_project_http.py
演示
使用SSE传输启动AgentSkills MCP服务器后,您可以运行演示:
# Enable Agent Skills for the Qwen model.
# Since Qwen supports function calling, you can implement Agent Skills by passing the MCP tools registered by the AgentSkills MCP service to the tools parameter.
cd tests
python run_skill_agent.py______________________________________________________________________
🔧 MCP工具
此服务提供四种工具来支持代理技能:
- load_skill_metadata_op --在启动时将所有技能的名称和描述加载到代理上下文中(始终调用)
- load_skill_op --当需要特定技能时,按技能名称加载skill.md内容(在触发技能时调用)
- read_reference_file_op --从技能中读取特定文件,如脚本或参考文档(按需)
- run_shell_command_op --执行shell命令以运行技能中包含的可执行脚本(按需)
有关详细的参数和使用示例,请参阅 文档.
⚙️ 服务器配置参数
| 参数 | 说明 | 示例 |
|---|---|---|
config | 要加载的配置文件(逗号分隔)。违约: default (核心工作流程) | config=default |
mcp.transport | 运输方式: stdio (stdin/stdout,适用于本地), sse (服务器发送事件,适用于在线应用程序), http (RESTful,适合轻量级远程调用) | mcp.transport=stdio |
mcp.host | 主机地址(仅用于sse/http传输) | mcp.host=0.0.0.0 |
mcp.port | 端口号(仅适用于sse/http传输) | mcp.port=8001 |
metadata.skill_dir | 技能目录(必填) | metadata.skill_dir=./skills |
有关全套可用选项和默认值,请参阅 default.yaml.
环境变量
| 变量名称 | 必填 | 描述 |
|---|---|---|
FLOW_LLM_API_KEY | ✅ 是 | OpenAI兼容LLM服务的API密钥 |
FLOW_LLM_BASE_URL | ✅ 是 | OpenAI兼容LLM服务的基本URL |
______________________________________________________________________
🤝 贡献
我们欢迎社区捐款!开始:
- 在开发模式下安装软件包:
pip install -e .- 安装预提交挂钩:
pip install pre-commit
pre-commit run --all-files- 提交一个包含您的更改的拉取请求。
______________________________________________________________________
📚 了解更多
⚖️ 许可证
此项目在Apache License 2.0下获得许可——请参阅 许可证 了解详情。
______________________________________________________________________
📈 明星历史

