# llm-bus MCP server

> Coordinates multiple AI agents through a shared event ledger, atomic task claims, and advisory file leases to prevent collisions and manage handoffs.

- Repository: https://github.com/danieldoderlein/llm-bus
- Page: https://hostedmcp.org/servers/danieldoderlein/llm-bus
- Transport: remote
- Stars: 9
- License: AGPL-3.0
- Latest version: 1.0.0

## Install

### Claude Code

```sh
claude mcp add --transport http llm-bus https://mcp.llm-bus.com/mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "llm-bus": {
      "url": "https://mcp.llm-bus.com/mcp"
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "llm-bus": {
      "type": "http",
      "url": "https://mcp.llm-bus.com/mcp"
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"llm-bus","type":"http","url":"https://mcp.llm-bus.com/mcp"}'
```

### Codex

```sh
codex mcp add llm-bus --url https://mcp.llm-bus.com/mcp
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.llm-bus]
url = "https://mcp.llm-bus.com/mcp"
```

### Gemini CLI

```sh
gemini mcp add -s user --transport http llm-bus https://mcp.llm-bus.com/mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "llm-bus": {
      "url": "https://mcp.llm-bus.com/mcp",
      "type": "http"
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `DATABASE_URL` | no | no |  |

## FAQ

### How do I prevent two agents from editing the same file at once?

The server provides advisory leases on real files to ensure parallel agents do not clobber each other's edits.

### What are the technical requirements for self-hosting?

To self-host, you require Node version 22 or higher and PostgreSQL 16.

### Is there a way to avoid agents constantly polling for new work?

Yes, there is a push channel via GET /api/wait that holds a request open until work is available, preventing idle agents from polling.
