# ruv-swarm

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.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 387
- Author: ruvnet
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/ruvnet/ruv-FANN/tree/HEAD/ruv-swarm
- Updated: 2026-08-09
- HTML: https://affpapa.org/en/nevibecode/mcp/ruv-swarm

## What it 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.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `RUV_SWARM_LOG_LEVEL`, `RUV_SWARM_DB_PATH`, `RUV_SWARM_ENABLE_SIMD` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
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
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
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-swarm
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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

### Gemini CLI

**Platform CLI**
```bash
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-swarm
```
Replace <…> with your own values

## When to use it
- 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
- 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

## Similar
- [swarm](https://affpapa.org/en/nevibecode/skills/swarm.md) — skill · 8800 installs
- [flow-nexus-neural](https://affpapa.org/en/nevibecode/skills/flow-nexus-neural.md) — skill · 1100 installs
- [deep-learning](https://affpapa.org/en/nevibecode/skills/deep-learning.md) — skill · 946 installs
- [vector-search](https://affpapa.org/en/nevibecode/skills/vector-search.md) — skill · 751 installs
- [Neural Network Design](https://affpapa.org/en/nevibecode/skills/neural-network-design.md) — skill · 514 installs
- [deep-learning-book](https://affpapa.org/en/nevibecode/skills/deep-learning-book.md) — skill · 12 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
