# Bernstein MCP server

> Govern and orchestrate AI coding agents with policy as code, deterministic scheduling and verifiable, replayable run records.

- Listing: https://mcp.tc/i/bernstein
- Connect: this is a local (stdio) server; install it on your machine (see Install). The listing link is a page, not an MCP endpoint.
- Type: local (stdio)
- Auth: no API key needed
- Category: [Developer Tools](https://mcp.tc/c/developer-tools)
- Vendor: sipyourdrink-ltd
- Homepage: <https://bernstein.run>
- Docs: <https://docs.bernstein.run>
- Repository: <https://github.com/sipyourdrink-ltd/bernstein>
- Package: pypi `bernstein`

## About

Bernstein is an open-source governance and orchestration layer for AI agents. You write policy as code (who may do what, what needs approval, what must be recorded) and a deterministic Python scheduler runs agents in parallel, gates their output and records each step so a run can be verified offline. It works with Claude Code, Codex, Gemini CLI and many other CLI agents, each coding task in its own git worktree.

It runs locally as the PyPI package bernstein (started with uvx) over stdio, or as a container image. State is file-based with no hosted service. The listing documents no sign-in or API key for Bernstein itself, though the underlying CLI agents need their own authentication. Apache-2.0 licensed and in beta.

## What it can do

- Declare agent runs as YAML workflows with phases, roles and dependencies
- Run CLI coding agents in parallel in isolated git worktrees
- Gate agent output behind merge gates and approval policy
- Record runs in a replay journal with optional HMAC-chained audit log
- Verify and replay runs offline from the stored artifacts
- Check that a CLI agent is installed and authenticated with bernstein doctor

## Example prompts

- "Run this workflow with Bernstein and show me the task graph"
- "Verify the audit receipts for yesterday's Bernstein run"
- "Set up a policy that requires approval before agents merge changes"
- "Check that my CLI agents are installed and authenticated"

## Install

### Claude Code

1. Run this in a terminal, in your project folder:

```bash
claude mcp add --transport stdio bernstein -- uvx bernstein
```

2. Start Claude Code and type `/mcp`. **bernstein** should show as connected.

Add `--scope user` to make it available in every project.

### Claude Desktop

1. Open **Settings → Developer → Edit Config**. It opens `claude_desktop_config.json`. Add:

`claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "bernstein": {
      "command": "uvx",
      "args": [
        "bernstein"
      ]
    }
  }
}
```

2. Save the file and restart Claude Desktop.

Needs uv (Python) on your computer. The file lives in `~/Library/Application Support/Claude/` on macOS and `%APPDATA%\Claude\` on Windows.

### Cursor

[Add to Cursor](<https://cursor.com/install-mcp?name=bernstein&config=eyJjb21tYW5kIjoidXZ4IiwiYXJncyI6WyJiZXJuc3RlaW4iXX0%3D>) (opens Cursor)

Or add it by hand to `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (this project):

`mcp.json`:

```json
{
  "mcpServers": {
    "bernstein": {
      "command": "uvx",
      "args": [
        "bernstein"
      ]
    }
  }
}
```

Needs uv (Python) on your computer.

### VS Code

[Install in VS Code](<https://vscode.dev/redirect/mcp/install?name=bernstein&config=%7B%22type%22%3A%22stdio%22%2C%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22bernstein%22%5D%7D>) (opens VS Code)

Or from a terminal:

```bash
code --add-mcp '{"name":"bernstein","type":"stdio","command":"uvx","args":["bernstein"]}'
```

Or commit it to the repo in `.vscode/mcp.json`:

`.vscode/mcp.json`:

```json
{
  "servers": {
    "bernstein": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "bernstein"
      ]
    }
  }
}
```

Needs uv (Python) on your computer.

### Devin Desktop

1. Add it to `~/.config/devin/mcp_config.json` (macOS and Linux) or `%APPDATA%\devin\mcp_config.json` (Windows):

`mcp_config.json`:

```json
{
  "mcpServers": {
    "bernstein": {
      "command": "uvx",
      "args": [
        "bernstein"
      ]
    }
  }
}
```

2. Refresh the MCP server list in Cascade.

Devin Desktop is the new name for Windsurf.

### Codex

```bash
codex mcp add bernstein -- uvx bernstein
```

Or edit `~/.codex/config.toml` directly:

`config.toml`:

```toml
[mcp_servers.bernstein]
command = "uvx"
args = ["bernstein"]
```

Needs uv (Python) on your computer.

### Gemini CLI

```bash
gemini mcp add bernstein uvx bernstein
```

This adds it to the current project. Add `-s user` to use it everywhere.

### Any client

Most clients that start local servers accept this shape:

```json
{
  "mcpServers": {
    "bernstein": {
      "command": "uvx",
      "args": [
        "bernstein"
      ]
    }
  }
}
```

Zed puts servers under `context_servers` in its settings, with the same `command`, `args` and `env` fields.

Needs uv (Python) on your computer.

## Recent changes

- 2026-11-05 14:31 UTC: New version 3.24.0 (was 3.23.0), read from PyPI. Source: automatic check.
- 2026-10-24 19:32 UTC: New version 3.23.0 (was 3.22.0), read from PyPI. Source: automatic check.
- 2026-10-15 16:29 UTC: New version 3.22.0 (was 3.21.0), read from PyPI. Source: automatic check.
- 2026-10-08 04:20 UTC: Tracking started: version 3.21.0. Source: automatic check.

More on the History tab, with descriptions before and after for the newest entries: https://mcp.tc/i/bernstein#history (Atom feed: https://mcp.tc/i/bernstein/history.xml). It records what mcp.tc's anonymous checks saw, every 3 hours where the tool list can be read without sign-in; it is not a security review.

## Details

- Server version: 3.24.1
- Last checked: 2026-10-08
- Listed: 2026-10-08
- Updated: 2026-10-08

---
Source: https://mcp.tc/i/bernstein (mcp.tc is an independent directory, not affiliated with this server's publisher). Corrections: https://mcp.tc/report
