# Quickstart

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

Source: https://neurouter.com/docs/quickstart · Last updated: 2026-11-24

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 Compose | From source (SQLite) |
|---|---|---|
| Needs | Docker with Compose, Git | Node.js 24+, npm 11, Git |
| Database | PostgreSQL 18 with pgvector, in a container | SQLite file, no Docker |
| Closest to production | Yes: the production image | No: development servers |

> The source repository is private until the first public release, and pre-built images (`ghcr.io/neurouter/neurouter`) will be published with it. Both options below build from source.

## Option A: Docker Compose (PostgreSQL)

**1. Get the source.**

```bash
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):

```bash
npm install
npm run keys -- gen
```

or generate the same values with OpenSSL:

```bash
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:

```bash
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:**

```bash
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](https://dexidp.io) 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)

```bash
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:

```bash
claude mcp add --transport http neurouter http://localhost:3000/mcp
# Then run /mcp in Claude Code and choose "Authenticate".
```

5. **Watch the audit log.** Every call appears under *Audit & observability → Audit log*. Use **Verify** to check the hash chain.

## Next steps

- [Configuration reference](https://neurouter.com/docs/configuration): every environment variable and its default.
- [Deployment](https://neurouter.com/docs/deployment): Helm, PostgreSQL, keys and rotation.
- [Identity providers](https://neurouter.com/integrations): Okta, Microsoft Entra ID, Google Workspace and Keycloak.
