MCP Server 配置指南
Rotifer MCP Server 让所有支持 MCP 的 Agent 能够直接访问整个 Gene 生态。支持 Claude Desktop、Cursor、VS Code、Windsurf、JetBrains、Zed、Trae、CodeBuddy、通义灵码等主流 IDE。
大多数 IDE 使用标准 mcpServers 格式。在你的 IDE 的 MCP 配置中添加:
{ "mcpServers": { "rotifer": { "command": "npx", "args": ["@rotifer/mcp-server"] } }}VS Code / GitHub Copilot 和 Zed 使用不同的配置格式,请参考下方各 IDE 的详细说明。
IDE 配置指南
Section titled “IDE 配置指南”Claude Desktop
Section titled “Claude Desktop”编辑配置文件:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{ "mcpServers": { "rotifer": { "command": "npx", "args": ["@rotifer/mcp-server"] } }}保存后重启 Claude Desktop。
Cursor
Section titled “Cursor”在项目根目录创建 .cursor/mcp.json,或编辑全局配置 ~/.cursor/mcp.json:
{ "mcpServers": { "rotifer": { "command": "npx", "args": ["@rotifer/mcp-server"] } }}VS Code / GitHub Copilot
Section titled “VS Code / GitHub Copilot”VS Code 使用 servers 字段(而非 mcpServers),并需要指定 type。在项目根目录创建 .vscode/mcp.json:
{ "servers": { "rotifer": { "type": "stdio", "command": "npx", "args": ["@rotifer/mcp-server"] } }}也可通过命令面板 MCP: Add Server 添加。GitHub Copilot 在 VS Code 中使用相同配置。
Windsurf
Section titled “Windsurf”编辑配置文件:
- macOS / Linux:
~/.codeium/windsurf/mcp_config.json - Windows:
%USERPROFILE%\.codeium\windsurf\mcp_config.json
{ "mcpServers": { "rotifer": { "command": "npx", "args": ["@rotifer/mcp-server"] } }}JetBrains (IntelliJ IDEA / WebStorm / PyCharm 等)
Section titled “JetBrains (IntelliJ IDEA / WebStorm / PyCharm 等)”打开 Settings → Tools → AI Assistant → Model Context Protocol (MCP),点击 Add (+),选择 STDIO:
{ "mcpServers": { "rotifer": { "command": "npx", "args": ["@rotifer/mcp-server"] } }}需要 IntelliJ 2025.1 或更高版本。支持 STDIO、HTTP、SSE 传输协议。
Zed 使用 context_servers 格式。编辑 Settings(Cmd+,)或通过命令面板 agent: open settings:
{ "context_servers": { "rotifer": { "command": "npx", "args": ["@rotifer/mcp-server"] } }}Cline 使用独立配置文件 cline_mcp_settings.json。在 VS Code 中打开 Cline 侧栏 → MCP Servers → 添加:
{ "mcpServers": { "rotifer": { "command": "npx", "args": ["@rotifer/mcp-server"] } }}Continue
Section titled “Continue”在 .continue/config.yaml 中添加 MCP Server 配置:
mcpServers: - name: rotifer command: npx args: - "@rotifer/mcp-server"也支持导入 Claude Desktop / Cursor 格式的 JSON 配置。MCP 功能仅在 Agent 模式下可用。
Trae(字节跳动)
Section titled “Trae(字节跳动)”在项目根目录创建 .trae/mcp.json,或编辑全局配置 ~/.trae/mcp.json:
{ "mcpServers": { "rotifer": { "command": "npx", "args": ["@rotifer/mcp-server"] } }}也可通过 Trae 内置的 MCP 市场搜索并一键安装。需要 Trae v1.3.0 或更高版本。
CodeBuddy(腾讯云代码助手)
Section titled “CodeBuddy(腾讯云代码助手)”编辑用户配置 ~/.codebuddy/.mcp.json,或项目根目录 .mcp.json:
{ "mcpServers": { "rotifer": { "type": "stdio", "command": "npx", "args": ["@rotifer/mcp-server"] } }}也可通过对话面板右上角的 MCP 市场搜索安装。
打开右上角头像 → 个人设置 → MCP 服务 → 手动添加(STDIO):
{ "mcpServers": { "rotifer": { "command": "npx", "args": ["@rotifer/mcp-server"] } }}也可在 ModelScope MCP 广场中搜索安装。需要通义灵码 v2.5 或更高版本。
MCP 功能仅在智能体模式下可用,最多同时连接 10 个 MCP 服务。
认证(可选)
Section titled “认证(可选)”MCP Server 默认以匿名模式运行,可直接搜索和浏览公开 Gene。如需使用 Cloud 功能(发布 Gene、管理个人资料等),需先登录:
npx @rotifer/mcp-server login支持 GitHub 和 GitLab OAuth 登录。指定提供商:
npx @rotifer/mcp-server login --provider github登出:
npx @rotifer/mcp-server logout凭证存储在 ~/.rotifer/credentials.json,与 @rotifer/playground CLI 共享。
云端查询工具
Section titled “云端查询工具”查询 Rotifer Cloud 注册表,无需认证。
| 工具 | 描述 | 关键参数 |
|---|---|---|
search_genes | 按名称、领域或保真度搜索 Gene 生态 | query, domain, fidelity, sort, page, per_page |
get_gene_detail | 获取 Gene 详细信息,包括表现型和适应度 | gene_id(Gene UUID、名称或 content hash),content_hash(可选替代) |
get_arena_rankings | 查看按 F(g) 排序的领域 Arena 排名 | domain, page, per_page |
compare_genes | 2-5 个 Gene 的适应度并排对比 | gene_ids(UUID 数组,必填) |
get_gene_stats | 查看 Gene 下载统计(总量、7 天、30 天、90 天) | gene_id(必填) |
get_leaderboard | 查看创作者声誉排行榜 | limit(默认 20,最大 100) |
get_developer_profile | 按用户名获取创作者资料和声誉数据 | username(必填) |
list_gene_versions | 查看 Gene 版本历史链 | owner, gene_name(均必填) |
get_gene_reputation | 获取 Gene 声誉详细分解(Arena、使用量、稳定性) | gene_id(必填) |
suggest_domain | 根据描述推荐匹配的 domain | description(必填) |
本地工作区工具
Section titled “本地工作区工具”操作本地 Agent 工作区目录中的 Gene 和 Agent。
| 工具 | 描述 | 关键参数 |
|---|---|---|
list_local_genes | 扫描本地 Agent 工作区中已安装的 Gene | project_root, domain, fidelity |
list_local_agents | 列出本地工作区中注册的 Agent | project_root, state |
init_gene | 初始化新 Gene 项目(生成 phenotype.json 模板) | gene_name(必填), fidelity, domain, no_genesis, project_root |
scan_genes | 扫描源文件中可封装为 Gene 的候选函数或 SKILL.md | path, skills, skills_path, project_root |
wrap_gene | 将函数或 SKILL.md 封装为 Rotifer Gene | gene_name(必填), domain, fidelity, from_skill, from_clawhub, project_root |
compile_gene | 将 Gene 编译为 WASM | gene_name(必填), check, wasm_path, lang, project_root |
run_gene | 执行本地 Gene | gene_name(必填), input, verbose, no_sandbox, trust_unsigned, project_root |
test_gene | 在沙箱中测试 Gene(Schema、I/O、编译) | gene_name(必填), verbose, compliance, project_root |
install_gene | 从 Cloud 注册表安装 Gene 到本地 Agent 工作区 | gene_id(必填), force, project_root |
vg_scan | V(g) 安全扫描——Gene/Skill 代码静态分析(等级 A/B/C/D/?) | path, gene_id, all, project_root |
云端写入工具
Section titled “云端写入工具”修改 Rotifer Cloud 中的数据,需先认证(运行 login)。
| 工具 | 描述 | 关键参数 |
|---|---|---|
publish_gene | 发布 Gene 到 Rotifer Cloud | gene_name, all, description, changelog, skip_arena, skip_security, project_root |
arena_submit | 提交 Gene 到 Arena(5 维适应度评分) | gene_id, fitness_value, safety_score, success_rate, latency_score, resource_efficiency(均必填) |
create_agent | 通过组合本地 Gene 创建 Agent | agent_name(必填), gene_ids(必填,≥1), composition(Seq/Par/Cond/Try/TryPool), domain(仅元数据), strategy, par_merge, project_root |
agent_run | 按名称运行本地 Agent | agent_name(必填), input, verbose, no_sandbox, project_root |
认证与元信息工具
Section titled “认证与元信息工具”| 工具 | 描述 | 关键参数 |
|---|---|---|
auth_status | 检查当前认证状态(用户名、提供商、过期时间) | — |
login | 通过 OAuth 登录 Rotifer Cloud(打开浏览器) | provider(github 或 gitlab,默认 github), endpoint |
logout | 登出并清除本地凭证 | — |
get_mcp_stats | MCP Server 调用分析(调用量、延迟、热门工具) | days(默认 7)。需认证。 |
get_my_reputation | 获取当前登录创作者的声誉和统计数据 | — 。需认证。 |
MCP Resources
Section titled “MCP Resources”MCP Server 还提供 Resource 模板,Agent 可通过 URI 直接读取数据:
| URI 模板 | 描述 |
|---|---|
rotifer://genes/{gene_id}/stats | Gene 下载统计 |
rotifer://genes/{gene_id} | Gene 完整元数据和表现型 |
rotifer://developers/{username} | 创作者资料和声誉 |
rotifer://leaderboard | 按声誉排序的顶级创作者 |
rotifer://local/genes | 当前 Agent 工作区中所有已安装的 Gene |
rotifer://local/agents | 当前 Agent 工作区中所有已注册的 Agent |
rotifer://version | MCP Server 版本及更新可用性 |
配置完成后,Agent 可以:
"搜索网页抓取相关的基因"→ search_genes({ query: "web scraping" })
"哪个搜索基因的适应度最高?"→ get_arena_rankings({ domain: "search.web" })
"对比这两个基因"→ compare_genes({ gene_ids: ["uuid1", "uuid2"] })
"谁的声誉分最高?"→ get_leaderboard({ limit: 10 })
"查看本地安装了哪些基因"→ list_local_genes({})
"创建一个文本摘要的 Gene"→ init_gene({ gene_name: "summarize.text.my-v1", fidelity: "Wrapped" })
"发布我的 Gene 到云端"→ publish_gene({ gene_name: "summarize.text.my-v1" })
"对我的 Gene 做安全扫描"→ vg_scan({ path: "genes/summarize.text.my-v1", gene_id: "summarize.text.my-v1" })
"检查我的认证状态"→ auth_status()
"查看某个 Gene 的版本历史"→ list_gene_versions({ owner: "alice", gene_name: "search.web.google-v2" })CLI ↔ MCP 映射表
Section titled “CLI ↔ MCP 映射表”每个 MCP 工具都对应一个或多个 CLI 命令(反之亦然)。在 CLI 和 MCP 工作流之间切换时参考此表。
| CLI 命令 | MCP 工具 | 备注 |
|---|---|---|
rotifer search | search_genes | |
rotifer info <gene-ref> | get_gene_detail | CLI 用 info,MCP 用 get_gene_detail |
rotifer arena list | get_arena_rankings | |
rotifer compare | compare_genes | |
rotifer stats | get_gene_stats | |
rotifer reputation --leaderboard | get_leaderboard | |
rotifer reputation [gene-ref] | get_gene_reputation | |
rotifer reputation --mine | get_my_reputation | 需认证 |
rotifer whoami | auth_status | CLI whoami = MCP auth_status |
rotifer versions | list_gene_versions | |
rotifer list | list_local_genes | |
rotifer agent list | list_local_agents | |
rotifer init | init_gene | |
rotifer scan | scan_genes | |
rotifer wrap | wrap_gene | |
rotifer compile | compile_gene | |
rotifer run | run_gene | |
rotifer test | test_gene | |
rotifer install | install_gene | |
rotifer publish | publish_gene | 需认证 |
rotifer arena submit | arena_submit | 需认证 |
rotifer agent create | create_agent | |
rotifer agent run | agent_run | |
rotifer login | login | |
rotifer logout | logout | |
rotifer arena watch | — | 交互式命令,无 MCP 对应 |
rotifer network * | — | P2P 桩实现,无 MCP 对应 |
rotifer vg | vg_scan | 返回 JSON 报告(等级 + 发现列表) |
| — | get_mcp_stats | MCP 专有:调用分析 |
| — | suggest_domain | MCP 专有:domain 推荐 |
| — | get_developer_profile | MCP 专有(CLI 用 reputation) |
OpenClaw 集成
Section titled “OpenClaw 集成”如果你使用 OpenClaw,Rotifer 可作为 MCP 类型的 Skill 使用。手动安装:
git clone https://github.com/rotifer-protocol/rotifer-self-evolving-agent.git \ ~/.openclaw/workspace/skills/rotifer-self-evolving-agent重启 OpenClaw 后,使用 /rotifer 即可访问所有 Gene 生态工具。
WebMCP
Section titled “WebMCP”WebMCP(Web Model Context Protocol)让浏览器端 AI Agent 能够直接从网页中发现和调用 Rotifer 工具——无需任何服务端配置。
Rotifer 主站和 rotifer.ai 页面中嵌入了声明式 <form> 标签,向 WebMCP 兼容的 Agent 暴露可调用的工具:
<form hidden toolname="search_docs" tooldescription="搜索 Rotifer 协议文档"> <input name="query" type="text" toolparamdescription="搜索关键词" /></form>当 Agent 访问 rotifer.dev 或 rotifer.ai 时,会自动发现这些工具并直接调用,无需手动配置。
可用 WebMCP 工具
Section titled “可用 WebMCP 工具”rotifer.ai(14 个工具:10 个只读 + 4 个写入):
| 工具 | 描述 | 可执行 |
|---|---|---|
search_genes | 搜索 Gene 生态 | 是 |
get_gene_detail | 按名称或 UUID 获取 Gene 详情 | 是(含 gene_name→UUID 解析) |
get_arena_rankings | 查看 Arena 排名 | 是 |
compare_genes | 并排对比 2-5 个 Gene | 是 |
get_gene_stats | 获取下载和使用统计 | 是 |
get_leaderboard | 按声誉排名的顶级创作者 | 是 |
get_developer_profile | 创作者资料及其 Gene | 是 |
list_gene_versions | Gene 版本历史 | 是 |
get_gene_reputation | Gene 声誉详情 | 是 |
get_rotifer_capabilities | 列出全部工具及可用性 | 是(元工具) |
set_gene_visibility | 设置 Gene 为已发布/可见(WebMCP 专有) | 是(需登录) |
request_arena_evaluation | 请求服务端 Arena 评估(WebMCP 专有) | 是(需登录) |
create_gene | 在注册表中创建 Gene 条目(WebMCP 专有) | 是(需登录) |
update_gene_metadata | 更新 Gene 元数据(WebMCP 专有) | 是(需登录) |
命名说明:
set_gene_visibility和request_arena_evaluation是 WebMCP 专有工具,与 MCP 工具publish_gene和arena_submit刻意使用不同名称。MCP 版本执行完整的本地→云端管道,WebMCP 版本仅执行简单的浏览器端操作。详见 ADR-198 语义等价约束。
rotifer.dev(3 个工具):
| 工具 | 描述 | 可执行 |
|---|---|---|
search_docs | 搜索协议文档 | 仅发现 |
get_mcp_config | 获取 MCP Server 配置代码片段 | 是 |
suggest_domain | 根据描述推荐 Gene domain | 是 |
注意:rotifer.ai 的 WebMCP 工具接受 Gene 名称(如
search.web.google-v2)和 UUID,会自动解析为 UUID 后查询 Cloud API。
WebMCP 是 W3C 社区组规范,Chrome 146(2026 年 2 月)已提供 Early Preview。支持实现了 Web MCP 规范 的 Agent,包括浏览器扩展和具有网页浏览能力的 Agent 框架。
| 变量 | 描述 | 默认值 |
|---|---|---|
ROTIFER_CLOUD_ENDPOINT | Cloud API 端点 | https://cloud.rotifer.dev |
ROTIFER_CLOUD_ANON_KEY | API 密钥 | (内置) |
- Node.js >= 20
- 互联网连接(需访问 Rotifer Cloud API)
“Tool not found” 错误:确保 npx 在 PATH 中且 Node.js >= 20 已安装。
连接超时:检查网络连接。MCP Server 需要连接 cloud.rotifer.dev。
无搜索结果:Gene 生态处于 alpha 阶段。尝试更宽泛的搜索词,或使用 get_arena_rankings({}) 查看可用领域。