Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/nornir

.nornir/mcp-second-agent-for-idiots.md

Run a SECOND agent on nornir-mcp — for idiots

Copy-paste recipes for wiring another MCP agent (e.g. GitHub Copilot CLI) to a running nornir-server without breaking the agent you already have (e.g. Claude Code). The full design is in mcp-relay-client.md. One rule to remember:

Every relay client opens one local single-writer redb. Two clients on the same path collide. Give each agent its OWN [storage].local_path.

If you only run one agent, you don't need this — see mcp-from-claude-code.md. You need this the moment a second agent's relay client would otherwise open the same ~/.nornir/funnel store and die with Database already open. Cannot acquire lock.


1. Give the new agent its own store path (one file)

mkdir -p ~/.nornir-copilot
cat > ~/.nornir-copilot/nornir.toml <<'TOML'
# Private local store for THIS agent's nornir-mcp relay client.
# Client mode: all real data comes over gRPC from the server; the only local
# state is the idea-intake/planning store (the funnel_* tools), which is
# single-writer — so it lives on its own path to coexist with other agents.
[storage]
local_path = "/home/you/.nornir-copilot"
TOML

2. Register the MCP server for the new agent

Same two env vars as any relay client (NORNIR_SERVER + token), plus NORNIR_CONFIG pointing at the file from step 1.

GitHub Copilot CLI — ~/.copilot/mcp-config.json:

{
  "mcpServers": {
    "nornir": {
      "type": "local",
      "command": "/home/you/.cargo/bin/nornir-mcp",
      "args": [],
      "env": {
        "NORNIR_SERVER": "http://oden:7878",
        "NORNIR_SERVER_TOKEN": "<the shared token>",
        "NORNIR_CONFIG": "/home/you/.nornir-copilot/nornir.toml"
      },
      "tools": ["*"]
    }
  }
}

Any other MCP client — same three env vars, its own config syntax. Get the token on the host: sudo grep NORNIR_SERVER_TOKEN /etc/nornir/nornir.env. Use an absolute command path so it doesn't depend on the client's PATH.

Keep nornir-mcp current: cargo install nornir --force (or copy a fresh target/release/nornir-mcp to ~/.cargo/bin). A relay client older than the server can desync on newer gRPC verbs.

3. Verify both agents run side by side

Restart the new agent so it picks up the config, then drive the binary directly to see the real startup (the stdio transport hides errors otherwise):

NORNIR_SERVER=http://oden:7878 \
NORNIR_SERVER_TOKEN=<token> \
NORNIR_CONFIG=~/.nornir-copilot/nornir.toml \
  nornir-mcp        # stderr should print: store loaded from .../.nornir-copilot/warehouse

Inside the agent, ask it to call repos_list (proves the server is reachable), then repo_overview for one repo (proves real data). Meanwhile the other agent's relay client keeps its own ~/.nornir/funnel — no contention.

4. If it still says "Database already open"


Verified 2026-06-19 on oden (nornir 0.4.49): Copilot CLI (~/.nornir-copilot)