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 分