
Solves the "multiple AI agents editing the same codebase" problem with two simple tools: check in with your worker ID and a gist of what you're doing, get back a coordination protocol plus a live table of who else is active and which files they've claimed. Check out when you're done. The shift://status resource shows the full worker roster. Everything's in-memory, so state clears on restart, which is actually the point: lightweight session coordination without persistence overhead. Built for Claude Desktop or any MCP client that needs to prevent agents from stomping on each other's work during parallel code modifications.
Lightweight coordination layer for multiple AI agents working on the same codebase simultaneously.
Coordination layer for multiple AI agents working on the same codebase at once. Check in with a gist of your task and the files you expect to touch, see the full roster of active peers, and check out when finished — all from any MCP client. Runs as a stdio process or a local Streamable HTTP server.
| Tool | Description |
|---|---|
shift_check_in | Register or update a worker session. Returns a worker ID, the coordination protocol, and the active peers. |
shift_check_out | End a working session and remove it from the active worker list. |
| Resource | Description |
|---|---|
shift://status | All currently active workers with their gists, declared files, and check-in timestamps. |
The same roster is returned inline by shift_check_in; subscribers to shift://status also receive notifications/resources/updated on every check-in, session update, and check-out.
shift_check_in toolgist plus optional files and workerId (6-char uppercase alphanumeric from an earlier check-in) to update a session.activeWorkers. Updates preserve omitted files and the original checkedInAt.workerId fails with reason unknown_worker (NotFound), a recovery hint, and the current roster.shift_check_out toolworkerId (6-char uppercase alphanumeric), optional one-sentence summaryworkerId succeeds silently rather than erroringshift://status subscribers only when a session actually existed and was removedshift://status resourcetext/markdown — the active-workers table, or "No agents are currently active." when the roster is emptyworkerId comes from shift_check_innotifications/resources/updated on every check-in, session update, and check-outBuilt on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
Coordination-specific:
Agent-friendly output:
structuredContent from the output schema, markdown from format()shift_check_in declares a typed error contract, so an unknown worker ID arrives with data.reason and a recovery hintAdd the following to your MCP client configuration file:
{
"mcpServers": {
"shift-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/shift-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}
Or with npx (no Bun required):
{
"mcpServers": {
"shift-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/shift-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}
Or with Docker:
{
"mcpServers": {
"shift-mcp-server": {
"type": "stdio",
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "MCP_TRANSPORT_TYPE=stdio",
"ghcr.io/cyanheads/shift-mcp-server:latest"
]
}
}
}
Every agent sharing a codebase must reach the same server process for the roster to be shared. Over stdio each client spawns its own process, so point concurrent agents at one Streamable HTTP instance instead:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http
# Server listens at http://localhost:3010/mcp
git clone https://github.com/cyanheads/shift-mcp-server.git
cd shift-mcp-server
bun install
cp .env.example .env
# edit .env if you need to override a framework default
No server-specific environment variables. Framework defaults worth knowing:
| Variable | Description | Default |
|---|---|---|
MCP_TRANSPORT_TYPE | Transport: stdio or http. | stdio |
MCP_HTTP_PORT | Port for the HTTP server. | 3010 |
MCP_HTTP_HOST | Hostname for the HTTP server. | 127.0.0.1 |
MCP_SESSION_MODE | HTTP session handling: auto, stateful, or stateless. The server declares stateless in createApp(), since no handler needs a session; setting this variable overrides that. | stateless |
MCP_AUTH_MODE | Auth mode: none, jwt, or oauth. | none |
MCP_LOG_LEVEL | Log level (RFC 5424). | info |
LOGS_DIR | Directory for log files (Node.js only). | <project-root>/logs |
OTEL_ENABLED | Enable OpenTelemetry instrumentation. | false |
See .env.example for the full list of optional overrides.
Build and run:
bun run rebuild
bun run start:stdio
# or
bun run start:http
Run checks and tests:
bun run devcheck # Lint, format, typecheck, security, packaging
bun run test # Vitest suites: unit, smoke, integration, fuzz
bun run lint:mcp # Validate MCP definitions against spec
docker build -t shift-mcp-server .
docker run --rm -p 3010:3010 shift-mcp-server
The Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/shift-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.
| Directory | Purpose |
|---|---|
src/index.ts | createApp() entry point — registers the tools and the resource. |
src/mcp-server/tools | Tool definitions (check-in.tool.ts, check-out.tool.ts). |
src/mcp-server/resources | Resource definitions (status.resource.ts). |
src/services/worker-store | In-memory worker session store and table formatting. |
tests/ | Unit, smoke, integration, and fuzz suites mirroring src/. |
See CLAUDE.md/AGENTS.md for development guidelines and architectural rules. The short version:
try/catch in tool logicctx.log for request-scoped logging, ctx.state for tenant-scoped storagesrc/index.tsformat() must render every field in the output schema — both client surfaces carry the same dataIssues are welcome. Run checks and tests before submitting:
bun run devcheck
bun run test
Apache-2.0 — see LICENSE for details.
MCP_LOG_LEVELdefault: infoSets the minimum log level for output (e.g., 'debug', 'info', 'warn').
MCP_HTTP_HOSTdefault: 127.0.0.1The hostname for the HTTP server.
MCP_HTTP_PORTdefault: 3010The port to run the HTTP server on.
MCP_HTTP_ENDPOINT_PATHdefault: /mcpThe endpoint path for the MCP server.
MCP_AUTH_MODEdefault: noneAuthentication mode to use: 'none', 'jwt', or 'oauth'.