# @neruva/mcp

**Reliability for AI agents — and for multi-agent operations.** One install. Your agents stop repeating mistakes, stop spinning in circles, remember across every session, and get more reliable the longer they run. Every run is replayable bit-for-bit for audit. Bring your own LLM. **Free tier, no card.**

> [neruva.io](https://neruva.io) · get a key at [app.neruva.io](https://app.neruva.io)

## It just works — that's the point

Neruva is **push, not pull**. You install it once and it runs silently in the background — no tools to learn, no glue code, no prompting. Before each action it surfaces the past mistake (and the fix that worked) so the agent does it right; it breaks loops before they burn your budget; it records everything for replay. The agent never spends a token deciding to "use memory." **The automatic operation is the moat** — pull-based memory tools can't match it because they require the agent to stop and ask.

## What you get

- **Stops repeating mistakes.** Before a risky step, the past mistake + the working fix are surfaced automatically — and a known-destructive repeat is blocked so the agent self-corrects.
- **Stops spinning.** Detects an agent looping or stalling on a failing approach and breaks it, instead of letting it burn turns.
- **Remembers across sessions and projects.** Persistent memory that builds itself from what your agents do. No re-briefing every morning.
- **Provable + replayable.** Deterministic from a seed — reproduce any run bit-for-bit, days later, for audit and post-incident review. Export the whole memory as one portable `.neruva` file. Your data is yours.
- **Gets more reliable over time.** Learns from your agents' own operational history — without retraining or touching model weights.
- **Built for multi-agent operations.** Coordinates a fleet of agents, keeps shared memory consistent, and catches an agent that's wrong or lying before it poisons the others. In a swarm, one unreliable agent compounds at every handoff — Neruva is the reliability layer underneath.

## Install

```bash
# One line — wires the lean auto-pilot into your agent (Claude Code, Claude Agent SDK):
npx -p @neruva/mcp neruva-mcp-install
```

That installs a tiny native hook (bundled for all 6 platforms — Win/Mac/Linux × x64/arm64) that runs in the background. Set your key and you're done:

```json
{
  "mcpServers": {
    "neruva": {
      "command": "npx",
      "args": ["-y", "-p", "@neruva/mcp@latest", "neruva-mcp"],
      "env": { "NERUVA_API_KEY": "nv_..." }
    }
  }
}
```

Get a free API key at [app.neruva.io](https://app.neruva.io) (no card). Python users: `pip install neruva-mcp`.

## Optional: the MCP tool surface

The product is the silent auto-pilot — you don't need to call tools. But the MCP server also exposes a small, focused set for clients that want direct access: typed **Records** (ingest/query/timeline/get/update/delete, GDPR `forget`, compact, export/import), federated **recall** (`agent_recall`), the **memory knowledge graph** (`hd_kg_*`), **snapshot/restore** for replay, multi-agent **consensus**, and op stats. Bring your own LLM — the substrate stays deterministic and `$0`/call server-side.

## Proof (cited honestly on [neruva.io/benchmarks](https://neruva.io/benchmarks))

| Test | Result | Plain meaning |
|---|---|---|
| Learns from mistakes | **+34 pts** | Same model, no retraining: with Neruva the agent climbs 84%→93% over 2000 tasks; without it stays flat at 59%. Three runs. |
| Long-history memory (LongMemEval) | **93.3%** | Top-tier on the standard agent-memory benchmark. |
| Replay determinism + accuracy (DFAH) | **100% / 88%** | First to hit both at once. |
| Recall latency (p95, cache hit) | **~80ms** | Answers from memory in well under a tenth of a second. |

## Config

Set `NERUVA_API_KEY`. `NERUVA_URL` defaults to `https://api.neruva.io`.

The installer writes lean defaults that just work. Useful overrides:

- `NERUVA_AUTO_RECORD=namespace[:ttl_days]` — auto-record this agent's activity (fire-and-forget; never blocks).
- `NERUVA_PRE_ACTION_THRESHOLD` — how confident a past mistake must be to surface (default `0.3`).
- `NERUVA_PRE_ACTION_DEADLINE_MS` — hard cap on background enrichment per action (default `1500`; fail-open).
- Multi-agent operations: opt in with `NERUVA_AUTO_RESOURCE_CLAIM=1` (file-edit coordination across agents). Off by default — solo agents don't pay for it.

## License

MIT
