Docs

Quickstart

Run Neurouter locally with Docker Compose and PostgreSQL, or with SQLite and no Docker, then register an MCP server and connect Claude Code.

Last updated: 2026-11-24 · Markdown

There are two ways to try Neurouter on one machine. Both use a development-only email login, so you don't need an identity provider yet.

Docker ComposeFrom source (SQLite)
NeedsDocker with Compose, GitNode.js 24+, npm 11, Git
DatabasePostgreSQL 18 with pgvector, in a containerSQLite file, no Docker
Closest to productionYes: the production imageNo: development servers

Option A: Docker Compose (PostgreSQL)

1. Get the source.

git clone https://github.com/neurouter/neurouter.git
cd neurouter

2. Generate the encryption keys. Neurouter needs a key-encryption key (32 random bytes, base64, with an id) and an HMAC pepper of at least 32 characters. Either use the bundled helper (needs npm install first):

npm install
npm run keys -- gen

or generate the same values with OpenSSL:

echo "NEUROUTER_MASTER_KEYS=k1:$(openssl rand -base64 32)"
echo "NEUROUTER_ACTIVE_KEY_ID=k1"
echo "HASH_PEPPER=$(openssl rand -base64 48 | tr -d '\n')"

3. Write .env with the three values plus a development sign-in:

PUBLIC_URL=http://localhost:3000
AUTH_DEV_LOGIN=true
BOOTSTRAP_ADMIN_EMAIL=you@example.com
NEUROUTER_MASTER_KEYS=k1:...
NEUROUTER_ACTIVE_KEY_ID=k1
HASH_PEPPER=...

Never commit .env. Keep the key values: without them, stored credentials can't be decrypted.

4. Start it:

docker compose up --build

The first build takes a few minutes. Compose starts PostgreSQL with pgvector and Neurouter, which applies its migrations on start. Open http://localhost:3000 and sign in with the email from BOOTSTRAP_ADMIN_EMAIL; that account becomes an admin. The MCP endpoint is http://localhost:3000/mcp.

Compose runs the production image in "local production" mode: it uses development semantics for sign-in and URLs, because production mode requires an https PUBLIC_URL and OIDC. Two optional profiles are included:

  • docker compose --profile oidc up adds a local Dex identity provider for testing real OIDC sign-in.
  • docker compose --profile otel up adds an OpenTelemetry collector; set OTEL_SDK_DISABLED=false.

Option B: from source with SQLite (no Docker)

git clone https://github.com/neurouter/neurouter.git
cd neurouter
npm install
cp .env.example .env
npm run keys -- gen        # paste the three values into .env
npm run dev

npm run dev starts the API server, waits for GET /healthz, then starts the Vite dev server. Open the URL Vite prints. The example .env already enables the development login with BOOTSTRAP_ADMIN_EMAIL=admin@example.com, and keeps PUBLIC_URL pointed at the Vite origin. The database is created at apps/server/data/neurouter.db.

First steps in the console

  1. Register an upstream server. Go to Administration → Servers, add the server's URL and transport (Streamable HTTP or SSE) and, if it needs one, a credential. Neurouter syncs its tools.
  2. Review the tools. Each tool definition is pinned. Approve the definitions you want to expose under Administration → Tools, and mark sensitive tools as requiring approval.
  3. Grant access. Under Administration → Access control, allow the server or individual tools for a user, group or agent.
  4. Connect a client. In the portal, Connect a client shows a ready-made snippet for Claude Code, Cursor, VS Code or a generic client. For Claude Code:
claude mcp add --transport http neurouter http://localhost:3000/mcp
# Then run /mcp in Claude Code and choose "Authenticate".
  1. Watch the audit log. Every call appears under Audit & observability → Audit log. Use Verify to check the hash chain.

Next steps