# shift-mcp-server [Health: Active]

**Category:** 🤖 Coding Agents  
**Repository:** https://github.com/cyanheads/shift-mcp-server  
**GitHub Stars:** 1  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/shift-mcp-server

## Description
Lightweight coordination layer for multiple AI agents working on the same codebase simultaneously.

## Tools
Capabilities this server exposes over MCP:

- **shift_check_in** — Register or update a session. Returns the worker ID, active peers, declared-file overlaps, and recent check-out handoffs.
- **shift_check_out** — Remove an active session and leave its final declaration and optional summary for peers.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/cyanheads/shift-mcp-server), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Start the server:

```sh
SHIFT_WORKSPACE=my-project MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http
```

2. Install:

```sh
git clone https://github.com/cyanheads/shift-mcp-server.git
```

3. Configure:

```sh
cd shift-mcp-server
```

4. Install:

```sh
bun install
```

5. Configure:

```sh
cp .env.example .env
```

6. Run:

```sh
bun run rebuild
```

## Documentation

## What shift-mcp-server does

shift-mcp-server keeps a roster for agents working on the same project. Each session has a six-character worker ID, a task gist, optional declared files, a workspace, and timestamps. The roster shows active peers and helps agents identify shared files before making edits.

Two MCP tools form the coordination workflow:

- `shift_check_in` creates or updates a session and returns the worker record, active workers, the resolved workspace, a status resource URI, file overlaps, and recent handoffs.
- `shift_check_out` removes a session and records its final declaration, declared files, checkout time, and optional one-sentence summary for peers.

The server also exposes `shift://status` for the default workspace and a workspace-qualified status resource. A bundled `shift-guide` skill covers shared edits, interrupted sessions, and handoffs.

## How it works

Check in with a required task `gist`. You can include repo-relative `files`, a `workspace`, or an existing `workerId` to update a session. Updates use patch semantics: omitted fields remain unchanged, while `files: []` clears the file declaration. Worker IDs are case-insensitive and returned in uppercase.

File overlap detection compares normalized declarations lexically. When an absolute workspace identifier is used, paths within that root can match equivalent relative paths. The original declarations remain available, while the overlap result identifies matching files and the corresponding active worker IDs.

Sessions are isolated by workspace and persist across restarts until checked out. Native processes for one operating-system user share the default state directory at `~/.local/state/shift-mcp-server`. The roster can use a per-user SQLite store and is shared across processes that use the same state and workspace settings.

Both structured MCP output and formatted Markdown carry the same coordination data. Check-in responses include the coordination guidance and active-worker table, while failure responses include the current roster to help an agent recover without first making another orientation request. Status updates can be delivered through subscriptions for committed check-ins, session updates, and actual removals within the process event bus.

## Setup and configuration

Run the package through Bun or npx as an MCP stdio server:

```json
{
  "mcpServers": {
    "shift-mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@cyanheads/shift-mcp-server@latest"],
      "env": {
        "MCP_TRANSPORT_TYPE": "stdio",
        "MCP_LOG_LEVEL": "info"
      }
    }
  }
}
```

A Docker image is also available. Mount a persistent volume at `/var/lib/shift-mcp-server` and set `SHIFT_WORKSPACE` when agents or containers need to share an explicitly named roster. Native and containerized processes must use the same state directory and workspace to see one another.

When launched from a Git project, the server uses the enclosing real worktree root of `CLAUDE_PROJECT_DIR` when supplied by Claude Code, or of the launch directory. Outside Git, it uses the real launch directory. Subdirectories and symlinks into the same worktree resolve to the shared roster.

## Tools and capabilities

- Register or refresh a worker session with `shift_check_in`.
- Declare expected files and receive lexical overlap results.
- Inspect active workers and recent handoffs through the status resource.
- Close a session with `shift_check_out` and leave a handoff summary.
- Use in-memory, filesystem, Supabase, or Cloudflare KV/R2/D1 storage through the underlying framework.
- Run over stdio or Streamable HTTP with configurable authentication options including none, JWT, and OAuth.

## Limitations and notes

An unknown worker ID produces a typed `unknown_worker` error for check-in, while checkout of an unknown or already removed ID returns `removed: false`. Orphan detection can confirm that an owning process disappeared only within the same PID namespace; a shared HTTP server cannot detect individual agent disconnects. Confirm that a claim is stale before clearing it.

The legacy delivery adapter requires polling. Resource notifications remain within one process, while reads observe committed state from other processes. Text-formatted roster output normalizes line endings and escapes table delimiters, but structured fields preserve their original values.

_Full upstream README: https://allmcps.com/mcp/shift-mcp-server/readme_

