ruv-swarm — Claude Code MCP server: neural swarm orchestration
Spins up a swarm of lightweight Rust and WebAssembly neural networks so agents can split a coding task between them. Useful when one agent is not enough.
claude mcp add --env RUV_SWARM_LOG_LEVEL=<RUV_SWARM_LOG_LEVEL> --env RUV_SWARM_DB_PATH=<RUV_SWARM_DB_PATH> --env RUV_SWARM_ENABLE_SIMD=<RUV_SWARM_ENABLE_SIMD> --transport stdio ruv-swarm -- npx -y ruv-swarmWhat ruv-swarm does
ruv-swarm runs several agents with distinct roles — researcher, coder, analyst, optimizer, coordinator — and wires them into a topology: mesh, ring, hierarchical or star. Each agent gets its own cognitive model, such as an LSTM optimizer for bug fixing or an N-BEATS decomposer for planning. They talk over WebSocket, shared memory or in-process channels, and state lands in SQLite.
The core is Rust compiled to WASM, so no CUDA and no Python stack. SIMD acceleration is switched on with RUV_SWARM_ENABLE_SIMD. The MCP layer exposes the swarm as a set of tools over Model Context Protocol, which is why Claude, Codex, Cursor and the rest can treat it as an ordinary MCP server.
Node.js is all you need to start: the server runs through npx. Database path and log level come from RUV_SWARM_DB_PATH and RUV_SWARM_LOG_LEVEL — leave them blank and the server still boots, but has nowhere to persist state, so check the config before the first run.
What it helps with
- split a large task into subtasks and hand them to agents
- run a bug fix through several cognitive models
- assemble a swarm with different roles for one project
- speed up neural inference with SIMD in WASM
- persist swarm state in SQLite between runs
Example prompts for the agent
- spin up a five-agent swarm and split this refactor across them
- run the LSTM optimizer on this bug and show me what it suggests
- build a hierarchical topology with a coder and an analyst for this feature
How to install ruv-swarm
Platform CLI
claude mcp add --env RUV_SWARM_LOG_LEVEL=<RUV_SWARM_LOG_LEVEL> --env RUV_SWARM_DB_PATH=<RUV_SWARM_DB_PATH> --env RUV_SWARM_ENABLE_SIMD=<RUV_SWARM_ENABLE_SIMD> --transport stdio ruv-swarm -- npx -y ruv-swarmReplace <…> with your own values
Platform CLI
codex mcp add ruv-swarm --env RUV_SWARM_LOG_LEVEL=<RUV_SWARM_LOG_LEVEL> --env RUV_SWARM_DB_PATH=<RUV_SWARM_DB_PATH> --env RUV_SWARM_ENABLE_SIMD=<RUV_SWARM_ENABLE_SIMD> -- npx -y ruv-swarmReplace <…> with your own values
Config file
{
"mcpServers": {
"ruv-swarm": {
"command": "npx",
"args": [
"-y",
"ruv-swarm"
],
"env": {
"RUV_SWARM_LOG_LEVEL": "<RUV_SWARM_LOG_LEVEL>",
"RUV_SWARM_DB_PATH": "<RUV_SWARM_DB_PATH>",
"RUV_SWARM_ENABLE_SIMD": "<RUV_SWARM_ENABLE_SIMD>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"ruv-swarm": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"ruv-swarm"
],
"env": {
"RUV_SWARM_LOG_LEVEL": "<RUV_SWARM_LOG_LEVEL>",
"RUV_SWARM_DB_PATH": "<RUV_SWARM_DB_PATH>",
"RUV_SWARM_ENABLE_SIMD": "<RUV_SWARM_ENABLE_SIMD>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e RUV_SWARM_LOG_LEVEL=<RUV_SWARM_LOG_LEVEL> -e RUV_SWARM_DB_PATH=<RUV_SWARM_DB_PATH> -e RUV_SWARM_ENABLE_SIMD=<RUV_SWARM_ENABLE_SIMD> ruv-swarm npx -y ruv-swarmReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about ruv-swarm
How do I install ruv-swarm in Claude?
Run claude mcp add ruv-swarm -- npx -y ruv-swarm. For environment variables use the flagged form: `claude mcp add --env RUV_SWARM_LOG_LEVEL=<RUV_SWARM_LOG_LEVEL> --env RUV_SWARM_DB_PATH=<RUV_SWARM_DB_PATH> --env RUV_SWARM_ENABLE_SIMD=<RUV_SWARM_ENABLE_SIMD> --transport stdio ruv-swarm -- npx -y ruv-swarm`.
What does ruv-swarm do?
It orchestrates a swarm of agents with different specializations and neural models to work on coding tasks. Those capabilities are exposed over the MCP protocol.
Does ruv-swarm need a GPU?
No. The Rust core compiles to WASM and runs on CPU, with GPU optional. SIMD acceleration is enabled through RUV_SWARM_ENABLE_SIMD.