
Shift Mcp Server
io.github.cyanheads由 GitHub 帳號 cyanheads 發布v0.2.0更新於 Nov 1, 2026
Lightweight coordination layer for multiple AI agents working on the same codebase simultaneously.
概覽
本機 MCP 伺服器,讓多個 AI 代理在同一份程式碼庫上協作:登記任務摘要與涉及檔案、查看線上同伴、完成後簽退。
- 可以做什麼
- 登記或更新工作階段,提交任務摘要與預計改動的檔案,回傳 worker ID、協作協定與目前線上同伴
- 結束工作階段並將其從線上 worker 清單移除,可附一句總結
- 讀取線上 worker 名單,含摘要、宣告檔案與登記時間,可讀取預設工作區或指定工作區的 URI
- 工作階段提交或移除時,透過資源通知推送名單更新
- 適用情境
- 適合多個代理或工作階段同時處理同一個儲存庫、需要在編輯前了解彼此任務與檔案佔用的情況。單一代理也可用它跨重新啟動保留自己正在做什麼的紀錄。
- 執行需求
- 透過 npx、bunx 或 Docker 在本機以 stdio(或 HTTP)執行;原生執行需 Bun v1.4.3+ 或 Node.js v24+。不需要 API 金鑰或帳號。需要共用名單的代理必須使用相同的 SHIFT_WORKSPACE 與同一個可寫入的 SQLite 狀態目錄(SHIFT_STATE_DIR,預設 ~/.local/state/shift-mcp-server),且位於支援 SQLite 鎖定的本機檔案系統。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Shift Mcp Server,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
@cyanheads/shift-mcp-server
Lightweight coordination layer for multiple AI agents working on the same codebase simultaneously.
Overview
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.
Tools
Resources
The same roster is returned inline by shift_check_in. Modern subscriptions/listen streams receive one update per committed check-in, session update, or actual removal at the workspace-qualified URI; the bare alias is also published for the server's default workspace. Mutations from either protocol era publish through the same server event bus. This framework's legacy delivery adapter requires polling; that limitation is not inherent to the 2025 protocol. Notifications stay within one process; reads always observe committed state from other processes.
Capability reference
shift_check_in tool
- Required
gistplus optionalfiles,workspace, andworkerId(six ASCII letters/digits, case-insensitive) to update a session. IDs are stored and returned uppercase. - Returns your session,
activeWorkers, resolvedworkspace, and qualifiedstatusUri. Updates preserve omitted files and the originalcheckedInAt; an explicit emptyfilesarray clears the declaration. - The coordination protocol and applicable solo-worker notice are delivered once as
noticein structured output and as a text trailer. - An unknown
workerIdfails with reasonunknown_worker(NotFound), a recovery hint, and the current roster.
shift_check_out tool
- Required
workerId(six ASCII letters/digits, case-insensitive), optionalworkspaceand one-sentencesummary. - Returns
removed, resolvedworkspace, qualifiedstatusUri, and the ID/summary. An unknown or already-removed ID succeeds withremoved: falseand points to that roster without guessing why the ID is absent. - Publishes a resource update only when a session actually existed and was removed.
shift://status resource
- Returns
text/markdown— the active-workers table, or "No agents are currently active." when the roster is empty workerIdcomes fromshift_check_in- The bare resource reads the process default workspace. The qualified template reads the exact identifier encoded in its URI.
- Table cells escape backslashes and pipes and flatten CRLF/LF/CR; stored values and structured output remain unchanged.
Features
Built 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:
- Per-user SQLite roster shared across processes, isolated by workspace, durable across restarts until explicitly checked out
- The coordination protocol ships in every check-in response, so ground rules reach the agent without client-side configuration
- The active-workers table rides along with every check-in for situational awareness
- Patch semantics on session updates — only the fields provided change
Agent-friendly output:
- Both client surfaces carry the same data —
structuredContentfrom the output schema, markdown fromformat() shift_check_indeclares a typed error contract, so an unknown worker ID arrives withdata.reasonand a recovery hint- Failure responses embed the current roster, so an agent recovers in the same turn instead of calling again to orient
Getting started
Add the following to your MCP client configuration file:
Or with npx (no Bun required):
Or with Docker:
Set the same SHIFT_WORKSPACE and use the same state directory for every agent working together. Native processes for one OS user share ~/.local/state/shift-mcp-server by default. An explicit identifier is opaque and exact-match: my-project and /path/my-project are different namespaces. Native and Docker clients can share a roster by bind-mounting the native state directory into the container instead of using a named volume.
Without SHIFT_WORKSPACE, either transport uses the real path of the enclosing Git worktree root, or the launch cwd outside Git. An empty tool workspace selector uses this default too; nonempty identifiers remain exact. Launching from a subdirectory or symlink converges on the same root. Desktop clients and install badges may launch outside your project: configure SHIFT_WORKSPACE after installation, or pass workspace in every tool call. The Desktop bundle prompts for a workspace. The Codex plugin forwards SHIFT_WORKSPACE and SHIFT_STATE_DIR from your environment; the Claude plugin exposes matching configuration options.
A shared HTTP process uses its own launch directory as the default; multiplexed clients must pass an explicit workspace for their project:
Prerequisites
- Bun v1.4.3 or higher (or Node.js v24+).
- No API keys, accounts, or external services.
Installation
- Clone the repository:
- Navigate into the directory:
- Install dependencies:
- Configure environment:
Configuration
The roster uses SQLite independently of the framework's STORAGE_PROVIDER_TYPE. State persists until check-out; restarting does not clear abandoned sessions. There is no TTL or automatic reaping. Workspace names and worker IDs are coordination selectors, not authentication boundaries.
WAL and BEGIN IMMEDIATE serialize mutations, ID allocation, and the returned roster snapshot. Startup retries SQLite lock contention within one 3-second deadline; a busy mutation also waits at most 3 seconds. Busy, corrupt, or unwritable storage fails visibly without an in-memory fallback. Use a local filesystem supporting SQLite locking for the shared state directory.
See .env.example for the full list of optional overrides.
Running the server
Local development
-
Build and run:
-
Run checks and tests:
Docker
The Dockerfile defaults to HTTP transport, stateless session mode, logs at /var/log/shift-mcp-server, and roster state at /var/lib/shift-mcp-server. Reuse the same writable volume and workspace for every coordinating container. A host bind mount must be writable by the image's bun user. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.
Project structure
Development guide
See CLAUDE.md/AGENTS.md for development guidelines and architectural rules. The short version:
- Handlers throw, framework catches — no
try/catchin tool logic - Use
ctx.logfor request-scoped logging,ctx.statefor tenant-scoped storage - Register new tools and resources in
src/index.ts format()must render every field in the output schema — both client surfaces carry the same data
Contributing
Issues are welcome. Run checks and tests before submitting:
License
Apache-2.0 — see LICENSE for details.
來源:README.md,提交 79d20a6
工具
0版本歷史
4- v0.2.0最新Oct 18, 2026
- v0.1.8Oct 7, 2026
- v0.1.7Sep 21, 2026
- v0.1.6Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分