Rotifer Protocol

io.github.rotifer-protocol由 GitHub 账号 rotifer-protocol 发布v0.19.7更新于 Nov 3, 2026

Search, compare, and install self-evolving AI Agent Genes ranked by Arena fitness

概览

AI 生成的概览

Rotifer Protocol MCP 服务器:在 IDE 中搜索、比较、安装、构建并运行 AI Agent「Gene」与组合智能体,并按 Arena 适应度排名。

可以做什么
  • 搜索、查看、比较与排名 Gene 和创作者:基因搜索、详情、适应度对比、Arena 排名、下载统计、排行榜、声誉与版本历史
  • 查看本地工作区:列出已安装的 Gene 与已注册的 Agent
  • 管理 Gene 生命周期:初始化、扫描、封装、测试、编译为 WASM、运行、发布、安装与回滚
  • 用本地 Gene 组合并运行 Agent,支持顺序、并行、条件与回退组合
  • 检查与管理 Rotifer Cloud 登录状态,并读取 MCP 调用分析
  • 对 Gene 或技能代码执行 V(g) 静态安全扫描,并检查本地 TypeScript 转 WASM 工具链
适用场景
适合希望让助手从 Rotifer 注册表查找并安装可复用的智能体能力、把它们组装成 Agent 并在项目上运行,或在不离开 IDE 的情况下发布和评测自己 Gene 的场景。
运行要求
通过 npx 启动的本地进程,需要 Node.js 20 或更高版本。默认零配置连接公共 Rotifer Cloud API;可通过 ROTIFER_CLOUD_ENDPOINT 与 ROTIFER_CLOUD_ANON_KEY 或本地云配置文件指定自定义端点。发布、Arena 提交与统计需要先在浏览器中通过 GitHub 或 GitLab 完成 OAuth 登录。建议同时安装 Rotifer CLI 以获得本地 WASM 沙箱、编译器与 Arena 引擎。
安装前请注意
发布、Arena 提交与分析功能需要登录,凭据保存在本地,登出会清除。发布会把 Gene 代码上传到 Rotifer Cloud,调用该工具即视为明确同意。安装 Gene 会下载并运行第三方代码;no_sandbox 与 trust_unsigned 选项会以普通 Node.js 运行 Gene 代码,除非在启动时声明否则会被拒绝。登录状态下每次工具调用都会向 Rotifer Cloud 上报使用元数据(工具名、基因 id、是否成功、耗时、用户 id);ROTIFER_TELEMETRY=0 可关闭该上报及安装计数。可选的 HTTP 模式没有身份验证。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Rotifer Protocol,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

@rotifer/mcp-server

[npm] [License: Apache-2.0] [Node.js] [MCP]

Build, compose, and run AI agents — directly from your IDE.

Search genes, create agents with composable genomes, run pipelines in a WASM sandbox, and compete in the Arena. Zero config. Works with Cursor, Claude Desktop, Windsurf, and any MCP-compatible client.


Quick Start

Cursor

Add to .cursor/mcp.json:

json
{  "mcpServers": {    "rotifer": {      "command": "npx",      "args": ["@rotifer/mcp-server"]    }  }}

Claude Desktop

Add to claude_desktop_config.json:

json
{  "mcpServers": {    "rotifer": {      "command": "npx",      "args": ["@rotifer/mcp-server"]    }  }}

Windsurf / Other MCP Clients

Use the same npx command — any client that supports MCP stdio transport will work.

What Can It Do?

Create and run an agent in one conversation

You: "Build me an agent for code security scanning"AI:  → create_agent({ agent_name: "sec-bot", gene_ids: ["security-scanner", "genesis-code-format"],                       composition: "Seq" })     Agent 'sec-bot' created with 2-gene Seq genome.
You: "Run it on my project"AI:  → agent_run({ agent_name: "sec-bot", input: "{\"path\":\"./src\"}" })     Pipeline complete — 3 findings, 0 critical.

Search, compare, and compose genes

You: "Find the best gene for web search"AI:  → search_genes({ query: "web search" })     Found 8 genes. Top match: genesis-web-search (F(g) = 0.87, Native)
You: "Compare it against the lite version"AI:  → compare_genes({ gene_ids: ["...", "..."] })     Side-by-side: success rate, latency, fitness breakdown

Full gene lifecycle from your IDE

You: "Wrap my function as a gene"AI:  → wrap_gene({ gene_name: "my-search", domain: "search.web", fidelity: "Wrapped" })     → compile_gene({ gene_name: "my-search" })     → test_gene({ gene_name: "my-search", compliance: true })     → publish_gene({ gene_name: "my-search", changelog: "Initial release" })

Tools (31)

Discovery & Analytics

ToolDescriptionKey Parameters
search_genesSearch the Gene ecosystem by name, domain, or descriptionquery, domain, fidelity, sort (relevance/newest/popular/fitness), page, per_page
get_gene_detailGet detailed info about a Gene (phenotype, fitness, metadata)gene_id, content_hash (either identifies the gene)
get_arena_rankingsArena rankings for a domain, sorted by F(g) fitnessdomain, page, per_page
compare_genesSide-by-side fitness comparison of 2–5 Genesgene_ids (array)
get_gene_statsDownload statistics (total, 7d, 30d, 90d)gene_id
get_leaderboardCreator reputation leaderboardlimit
get_developer_profileCreator public profile and reputationusername
get_gene_reputationDetailed reputation breakdown (Arena, Usage, Stability)gene_id
list_gene_versionsVersion history chain with changelogsowner, gene_name
suggest_domainSuggest matching domains from the registrydescription

Local Workspace

ToolDescriptionKey Parameters
list_local_genesScan local workspace for installed Genesproject_root, domain, fidelity
list_local_agentsList Agents in the local workspaceproject_root, state

Gene Lifecycle

ToolDescriptionKey Parameters
init_geneInitialize a new Gene project with starter filesgene_name, fidelity, domain, no_genesis
scan_genesScan for candidate functions or SKILL.md filespath, skills, skills_path
wrap_geneWrap a function/skill as a Genegene_name, domain, fidelity, from_skill, from_clawhub
test_geneTest a Gene (schema validation + sandbox)gene_name, verbose, compliance
compile_geneCompile a Gene to WASM IRgene_name, check, wasm_path, lang
doctorCheck the local TypeScript→WASM toolchain (esbuild / javy) and report what is missing — read-only; use when compile_gene failsproject_root
run_geneExecute a local Genegene_name, input, verbose, no_sandbox, trust_unsigned
publish_genePublish to Rotifer Cloudgene_name, all, description, changelog, skip_arena, skip_security
install_geneInstall a Gene from Cloud Registry. force snapshots the copy it replacesgene_id, project_root, force
rollback_geneUndo the last overwrite of a local Gene; call with no name to list what can be undonegene_name, project_root
vg_scanV(g) security scan — static analysis for Gene/Skill code safetypath, gene_id, all, project_root
arena_submitMeasure a local Gene in the sandbox and submit the measurement to the Arena. Scores are produced by running the Gene, never supplied by the callergene_name, project_root

Agent Composition

ToolDescriptionKey Parameters
create_agentCreate an Agent composing multiple Genesagent_name, gene_ids, composition (Seq/Par/Cond/Try/TryPool), domain, top, strategy, par_merge
agent_runRun a local Agent by nameagent_name, input, verbose, no_sandbox

Authentication & Analytics

ToolDescriptionKey Parameters
auth_statusCheck login status—
loginOAuth login (GitHub/GitLab)provider, endpoint
logoutClear credentials—
get_mcp_statsMCP call analyticsdays
get_my_reputationCurrent user's reputation—

Resources (7)

MCP Resources let AI clients reference Rotifer data as context:

URI TemplateDescription
rotifer://genes/{gene_id}/statsGene download statistics
rotifer://genes/{gene_id}Gene detail + phenotype
rotifer://developers/{username}Creator profile + reputation
rotifer://leaderboardTop creators by reputation score
rotifer://local/genesLocal Gene inventory
rotifer://local/agentsLocal Agent registry
rotifer://versionMCP Server version and update availability

Each resource returns what the tool of the same job returns, so a declared tool set covers both: with --tools=evolve, rotifer://genes/{gene_id}/stats, rotifer://developers/{username} and rotifer://leaderboard disappear from the listing and are refused if read directly, because get_gene_stats, get_developer_profile and get_leaderboard were not asked for. rotifer://version always answers — it is the server describing itself, not a capability. Before 0.16.0 these were reachable whatever the tool set said.

Prompts (4)

MCP Prompts give AI clients guided workflows for common tasks:

PromptDescriptionKey Arguments
rotifer-helloInteractive agent creation — pick a template and run immediatelytemplate, input
rotifer-guideUnderstand Rotifer Protocol — genes, agents, Arena, fidelity model—
rotifer-architectDesign an Agent — task-driven gene search + composition planningtask
rotifer-challengeArena evaluation — submit a gene, compare with competitorsgene

Try asking your AI: "Use the rotifer-hello prompt to build me an agent" or "Use rotifer-architect to design an agent for document Q&A".


Architecture

┌─────────────────────────────────────────────────┐│  AI IDE (Cursor / Claude / Windsurf)            ││                                                 ││  "Find genes for code formatting"               ││       │                                         ││       ▼                                         ││  ┌─────────────────────┐                        ││  │  MCP Client         │                        ││  │  (stdio transport)  │                        ││  └────────┬────────────┘                        │└───────────┼─────────────────────────────────────┘            │ MCP Protocol            ▼┌─────────────────────────────────────────────────┐│  @rotifer/mcp-server                            ││                                                 ││  31 Tools  7 Resources  4 Prompts  Local Scanner││  ┌──────────┐  ┌───────────┐   ┌────────────┐  ││  │ discover │  │rotifer:// │   │ ./genes/    │  ││  │ lifecycle│  │genes/stats│   │ phenotype   │  ││  │ agents   │  │developers │   │ agents      │  ││  │ auth     │  │leaderboard│   └────────────┘  ││  └────┬─────┘  └─────┬─────┘         │         │└───────┼──────────────┼────────────────┼─────────┘        │              │                │        ▼              ▼                ▼┌─────────────────────────────────────────────────┐│  Rotifer Cloud API          Local File System   ││  (Supabase)                 (genes/, .rotifer/) │└─────────────────────────────────────────────────┘

Configuration

Zero-config by default — connects to the public Rotifer Cloud API.

To use a custom endpoint, create ~/.rotifer/cloud.json:

json
{  "endpoint": "https://your-supabase-instance.supabase.co",  "anonKey": "your-anon-key"}

Or set environment variables:

bash
ROTIFER_CLOUD_ENDPOINT=https://your-instance.supabase.coROTIFER_CLOUD_ANON_KEY=your-anon-key

Choosing which tools to expose

All thirty-one tools are available by default. ROTIFER_MCP_TOOLS narrows that to what a given integration actually needs — useful when the server is attached to an assistant that should not be able to publish or log in on your behalf:

bash
npx @rotifer/mcp-server --tools=evolve          # the rank-and-swap preset (10 tools)npx @rotifer/mcp-server --tools=readonly        # nothing that writes (14 tools)ROTIFER_MCP_TOOLS=search_genes,get_gene_detail  # an exact listROTIFER_MCP_TOOLS=evolve,vg_scan                # a preset plus one

A name that is neither a preset nor a tool here is ignored, with a note on stderr. If none of the names are, the server does not start: it lists the presets and exits with code 2, rather than running with no tools at all.

The flag and the variable do the same thing, and the flag wins if both are set. Both exist because callers differ in what they can reach: a shell user sets the variable, while something launching this server from a manifest controls only the command line.

A declared set covers the whole surface, not just tools/list. Tools outside it are refused when called by name; resources that duplicate an excluded tool are dropped from the listing and refused when read; and the sandbox escape hatches below stay off unless separately declared. A restriction with an unlisted way around it is not a restriction.

Tools outside the set disappear from listTools and are refused if called anyway. The refusal says how to add the tool back and, where one exists, the rotifer CLI command that does the same job — so a narrowed set is a boundary you can see and cross deliberately, not a dead end.

Leave it unset and nothing changes.

Switching off the sandbox

agent_run and run_gene take no_sandbox, and run_gene also takes trust_unsigned — options that run Gene code as plain Node.js instead of inside the WASM sandbox. Narrowing the tool set would mean little if a tool inside the narrowed set could still do that, so these are refused unless declared at launch:

bash
npx @rotifer/mcp-server --allow=no-sandboxnpx @rotifer/mcp-server --allow=no-sandbox,trust-unsignedROTIFER_MCP_ALLOW=no-sandbox                    # same thing

Nothing is removed. The option moves from "any caller can set it" to "someone declared it at launch", and you can always do it yourself:

bash
rotifer agent run <name> --no-sandboxrotifer run <gene> --trust-unsigned

What changes is that an assistant can no longer decide to unsandbox on its own. Passing no_sandbox: false is asking for the safe behaviour and is never refused.

Undoing an install

install_gene with force used to overwrite a Gene with no way back. It now moves the old copy into <genes>/.snapshots/ first, and rollback_gene puts it back:

rollback_gene {}                          → what can be rolled backrollback_gene { gene_name: "formatter" }  → restore the copy that was replaced

One snapshot per Gene: the next overwrite of that Gene supersedes it, and a rollback consumes it. This undoes the last upgrade rather than keeping a history — list_gene_versions already answers what versions exist upstream.

Keeping the server up to date

The server has always told you when it was behind — a line on stderr at startup, once a day. self-update is the other half:

bash
rotifer-mcp-server self-update              # check, verify, installrotifer-mcp-server self-update --rollback   # back to the version it replaced

It refuses any version npm has no provenance attestation for — this package publishes from CI with --provenance, so an unattested build is not one this project released.

Two things worth knowing:

  • A running server keeps serving the old code. Installing replaces files on disk; it does not replace the process your editor is already talking to. Restart your MCP host afterwards.
  • If you launch through npx, there is nothing to update. An unpinned npx @rotifer/mcp-server re-resolves the latest published version on every run, so self-update says so and stops rather than installing a global copy that would shadow it.

This is a command you run, not a tool the model can call. Updating means a global install, and a tool could not even report the result honestly — the model would say "updated" while still being served by the old process.

Serving over HTTP

The server normally talks over stdio to the MCP host that launched it. To expose it over Streamable HTTP instead:

bash
rotifer-mcp-server serve                      # http://127.0.0.1:3000/mcprotifer-mcp-server serve --port 8080rotifer-mcp-server serve --host 0.0.0.0       # reachable from other machines
  • It listens on 127.0.0.1 unless you pass --host. The HTTP endpoint has no authentication, and its tools act with your signed-in Rotifer account, so it is not reachable from other machines by default. If you pass a non-loopback --host, the server says so on stderr when it starts. Earlier versions listened on every interface.
  • Request bodies are capped at 256 KiB. A larger request is answered 413 with a JSON-RPC error before it is parsed. MCP messages are far smaller than this; the cap exists because the SDK's default (4 MiB) is the bound GHSA-46jr-4wx8-v453 describes, where a single request can exhaust the server's memory.
  • GET /health answers {"status":"ok","transport":"streamable-http"} for liveness checks.

Usage reporting

When you are signed in, each tool call reports a usage record to Rotifer Cloud: the tool's name, the Gene id it acted on, whether it succeeded, how long it took, and your user id. That is what get_mcp_stats reads back. Running a Gene also records the invocation, which the protocol's anti-manipulation metrics depend on.

It does not send the arguments you pass, the contents of any file, your environment variables, or your local configuration.

Signed out, no usage record is sent. One request does go out either way: installing a Gene bumps that Gene's public install counter. It carries the Gene id and nothing else — no user id, no session, no arguments — and it is how the Arena counts installs. Until 0.15.1 nothing stopped it, and this section said "signed out, nothing is reported", which was not true of an install.

ROTIFER_TELEMETRY=0 now stops all three:

bash
ROTIFER_TELEMETRY=0    # also accepts false / off

The three are logMcpCall, logGeneInvocation and the track_download call inside installGene, all in src/cloud.ts — short enough to read in full. Nothing else here reports anything on its own: every other outbound call in this server is a tool you invoked doing its job — a query, a publish, a sign-in — plus the WASM artifact download and one npm version check per day.

Requirements

  • Node.js >= 20

Pair with the CLI

This MCP server works best alongside the Rotifer CLI. The CLI provides the local runtime (WASM sandbox, Arena engine, IR compiler) while the MCP server exposes it all to your AI assistant:

bash
npm install -g @rotifer/playgroundrotifer init my-agent && cd my-agentrotifer hello --template quality-advisor   # your first Agent workspace in seconds

Links

License

Apache-2.0

来源:README.md,提交 b2c7064

工具

31

search_genes

Search the Rotifer Gene ecosystem. Returns a list of Genes matching the query, filterable by domain and fidelity.

输入参数pagesortquerydomainfidelityper_page

get_gene_detail

Get detailed information about a specific Gene by its ID or content_hash, including phenotype, fitness, and metadata. At least one of gene_id or content_hash must be provided.

输入参数gene_idcontent_hash

get_arena_rankings

Get Arena rankings for a domain. Each row carries a tier — `verified` (measured in a sandbox, with enough independent callers to stand), `under_evaluation` (measured, not yet corroborated), `not_evaluated` (disqualified, or a number that was estimated rather than measured) — and `rank` is null wherever the tier grants no rank. Prefer `verified` when picking a Gene for a capability; an estimated or disqualified number is not a measurement of anything. Also returns F(g) before and after the fidelity discount, safety, success_rate, latency, resource_efficiency, sample size and unique callers.

输入参数pagedomainper_page

compare_genes

Compare two or more Genes by their F(g) fitness metrics. Returns side-by-side fitness breakdown.

输入参数gene_ids必填

get_gene_stats

Get download statistics for a Gene, broken down by time period (total, last 7 days, 30 days, 90 days).

输入参数gene_id必填

get_leaderboard

Get the creator reputation leaderboard. Shows top creators ranked by reputation score, including their published gene count, total downloads, and arena wins.

输入参数limit

get_developer_profile

Get a creator's public profile and reputation data by username.

输入参数username必填

list_local_genes

List Genes installed in the local project workspace. Scans the genes/ directory for phenotype.json files and returns metadata, compile status, and cloud origin for each Gene.

输入参数domainfidelityproject_root

list_local_agents

List Agents registered in the local project workspace. Returns each Agent's name, state, genome composition, strategy, and reputation. Agents are local constructs that compose multiple Genes into pipelines.

输入参数stateproject_root

install_gene

Install a Gene from the Rotifer Cloud Registry into the local project. Downloads phenotype, metadata, and the compiled WASM artifact (verified against declared size and sha256) when the gene has one. Requires a valid gene_id from search_genes or get_gene_detail.

输入参数forcegene_id必填project_root

rollback_gene

Undo the last overwrite of a locally installed Gene, restoring the copy that install_gene replaced. Call without gene_name to list what can currently be rolled back. A rollback consumes its snapshot: it undoes one step, not a history.

输入参数gene_nameproject_root

arena_submit

Measure a local Gene in the sandbox and submit the measured result to the Arena. Requires authentication (rotifer login) and a Gene that exists locally — use list_local_genes to see them, install_gene to fetch one. The fitness scores are produced by running the Gene, not supplied by the caller: passing fitness_value, safety_score, success_rate, latency_score or resource_efficiency is refused. Runs `rotifer arena submit <gene> --cloud`.

输入参数gene_name必填project_root

create_agent

Create a new Agent by composing one or more local Genes. The Agent is saved to .rotifer/agents/ in the project. Genes must exist locally (wrap them first with wrap_gene).

输入参数domaingene_ids必填strategypar_mergeagent_name必填compositionproject_root

agent_run

Run a local Agent by name. Executes via the Rotifer CLI (rotifer agent run <agent-name>). The Agent must exist in .rotifer/agents/. Returns stdout/stderr from the execution.

输入参数inputverboseagent_name必填no_sandboxproject_root

compile_gene

Compile a local Gene to WASM via the Rotifer CLI (rotifer compile). The Gene must exist in the local genes/ directory. Returns compilation output.

输入参数langcheckgene_name必填wasm_pathproject_root

doctor

Check the local TypeScript→WASM toolchain (esbuild / javy) and report what is missing or misconfigured. Read-only: inspects the environment and changes nothing. Use this when compile_gene fails — a missing or broken toolchain is the most common cause.

输入参数project_root

run_gene

Execute a local Gene via the Rotifer CLI (rotifer run). The Gene must exist in the local genes/ directory. Returns execution output.

输入参数inputverbosegene_name必填no_sandboxproject_roottrust_unsigned

init_gene

Initialize a new Rotifer Gene project. Creates a directory with phenotype.json template and starter files. Supports Wrapped, Hybrid, and Native fidelity types.

输入参数domainfidelitygene_name必填no_genesisproject_root

scan_genes

Scan source files for candidate gene functions or local SKILL.md files that can be wrapped as Genes. Returns discovered candidates with metadata.

输入参数pathskillsskills_pathproject_root

wrap_gene

Wrap a function or SKILL.md as a Rotifer Gene. Generates phenotype.json from the source. The target must exist in the project.

输入参数domainfidelitygene_name必填from_skillfrom_clawhubproject_root

test_gene

Test a Gene in the sandbox. Validates phenotype schema, runs input/output tests, and checks compilation.

输入参数verbosegene_name必填complianceproject_root

publish_gene

Publish a Gene to Rotifer Cloud Registry (default destination since v0.8.8). Calling this tool = explicit publish consent. Requires authentication (use login tool first). Validates with V(g) security scan (Grade >= B required), uploads, and optionally submits to Arena. Either gene_name or all=true must be provided.

输入参数allchangeloggene_nameskip_arenadescriptionproject_rootskip_security

list_gene_versions

List the version history chain of a Gene by creator and name. Returns all published versions in chronological order with changelog entries and previous_version_id links.

输入参数owner必填gene_name必填

get_mcp_stats

Get MCP Server call analytics for a given time period. Returns total calls, success rate, average latency, top tools, and top genes. Requires authentication.

输入参数days

auth_status

Check current authentication status. Returns whether the user is logged in, their username, provider, and how many minutes until the token expires.

无需输入参数。

login

Log in to Rotifer Cloud. Opens the browser for OAuth authorization (GitHub or GitLab). After the user authorizes in the browser, credentials are saved locally. This must be done before using arena_submit or publish_gene.

输入参数endpointprovider

logout

Log out from Rotifer Cloud. Clears locally saved credentials.

无需输入参数。

get_gene_reputation

Get detailed reputation breakdown for a Gene (Arena, Usage, Stability scores).

输入参数gene_id必填

get_my_reputation

Get the current logged-in creator's reputation and stats. Requires authentication.

无需输入参数。

suggest_domain

Suggest top matching domains from the domain registry based on a description.

输入参数description必填

vg_scan

V(g) security scan — static analysis for Gene/Skill code safety. Returns a grade (A/B/C/D/?) and per-finding details with severity, file, line, and snippet.

输入参数allpathgene_idproject_root

版本历史

5
  1. v0.19.7最新Nov 1, 2026
  2. v0.19.6Oct 26, 2026
  3. v0.19.4Oct 24, 2026
  4. v0.19.2Oct 15, 2026
  5. v0.19.1Sep 16, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分