cambium (remote)

io.github.jarmstrong158由 GitHub 帳號 jarmstrong158 發布v0.2.0更新於 Oct 24, 2026

Cloudflare Worker for read-only recall of cambium knowledge. MCP 2026-07-28, dual-era.

已驗證Streamable HTTP可網頁執行檔案與儲存知識與記憶

概覽

AI 產生的概覽

一個唯讀的 Cloudflare Worker,讓助理從 cambium 的 git 知識檔案召回已晉升的團隊與組織知識。

可以做什麼
依查詢檢索團隊與組織知識,可限定範圍與結果數量,相關度不足時明確棄答。查看此 Worker 被設定讀取哪些內容,以及各範圍下有效項目的數量。知識透過 GitHub Contents API 從專案儲存庫 cambium 分支和專用組織知識儲存庫中的 knowledge.json 檔案讀取。個人未晉升的知識無法遠端存取。
適用情境
當你希望 claude.ai(含手機版)中的助理能用上已晉升的團隊或組織知識,又不想執行桌面版 cambium 伺服器時使用。若召回結果為空,先呼叫狀態查詢。
執行需求
需要已部署的 Cloudflare Worker 端點;連接器 URL 內含作為憑證的路徑權杖。部署需設定 AUTH_TOKEN 密鑰,以及具備中繼資料與內容讀取權限的 GitHub 權杖(GH_PAT),並設定組織儲存庫與團隊範圍相關變數。
安裝前請注意
連接器 URL 本身就是憑證,容易出現在瀏覽紀錄、日誌、截圖與助理工作階段紀錄中,應定期輪換。預設 discover 模式下,任何能對所設定擁有者名下任一儲存庫推送 cambium 分支的人,都能對組織級召回注入內容,而召回結果可能被助理當成事實。GitHub 權杖權限較廣,建議改用 allowlist 模式縮小範圍。僅唯讀:不會執行 distill、endorse 或 promote。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 cambium (remote),將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

cambium-remote

Part of the xylem stack.

A Cloudflare Worker MCP server that makes cambium's promoted knowledge recallable from claude.ai (including mobile) — read-only.

Local cambium is a desktop stdio server; its team knowledge lives on a cambium branch of each project repo and its org knowledge lives in a dedicated knowledge repo — both plain knowledge.json files in git. This Worker reads those files through the GitHub Contents API and serves recall() over them, the same pattern agentsync-remote uses for the coordination board.

Read-only by design. It exposes recall and status. It does not distill, endorse, or promote (those are CAS writes / the generalization gate — desktop-only), and recall here does not increment recall counts (so it never feeds promotion). Local (personal, unpromoted) scope is desktop-only and not reachable remotely — only the promoted team and org tiers are.

Tools

  • recall(query, scope?, limit?) — search team + org knowledge. scope: auto (default, team+org) | team | org. Abstains with no_confident_match below the relevance floor, exactly like local cambium.
  • status() — what the Worker is configured to read and how many active items each scope holds. Call it first if recall looks empty.

⚠️ Trust model — read this before pointing it at an org

Team "scope" is a read selector, not an authorization control. It answers "where do we look", not "who is allowed to tell us things". Nothing in this Worker checks provenance, signatures, or authorship of the knowledge it serves.

In the default TEAM_SCOPE_MODE = "discover" mode, the entire membership test for team scope is:

does this repo, owned by TEAM_OWNER, have a branch named TEAM_BRANCH?

There is no allowlist and no denylist. So:

  • Anyone who can push a cambium branch to any repo under TEAM_OWNER can inject into your org-wide recall — an outside contributor with write access to one small repo, a compromised CI token, a collaborator you forgot to remove. Their knowledge.json is read as authoritative team knowledge.
  • It takes effect within the 5-minute discovery cache TTL. No redeploy, no review, no notification.
  • recall() output is exactly the kind of thing an agent treats as established fact and acts on. This is an injection path into agent behaviour, not merely a data-quality problem.

Discovery remains the default because it is genuinely safe in the single-operator case this was built for, and because changing it silently would empty team scope on existing deployments. It is safe only if you are the only person who can push under TEAM_OWNER.

If anyone else can push under TEAM_OWNER, use strict mode

toml
TEAM_SCOPE_MODE = "allowlist"TEAM_REPOS = "owner/repo-a,owner/repo-b"

Team scope then becomes exactly those repos. No discovery scan is performed, and TEAM_OWNER is ignored entirely — so leaving it set in wrangler.toml cannot silently re-widen your scope later. Adding a repo becomes a deliberate config change.

status() reports which model is in force, in plain language, in its own output. If you are unsure what a deployment is doing, call it.

What status() deliberately does not tell you

By default status() returns the count of team repos, not their names. In discover mode those names are the output of a scan over everything TEAM_OWNER owns, so they enumerate private repositories — their existence and their names — to anyone holding the path token, who has no GitHub identity and no repo permissions of their own. The count answers the actual diagnostic question ("is team scope finding anything?"). Set STATUS_DISCLOSE_REPOS = "true" to opt back in. In allowlist mode names are always shown: they are your own committed config, not a discovery result.

GH_PAT is the broadest credential in the xylem stack

Discovery requires Metadata: Read + Contents: Read across every repo under TEAM_OWNER, including private ones. That makes this Worker's PAT substantially more powerful than agentsync-remote's (scoped to one coordination repo). Two consequences worth acting on:

  • Prefer allowlist mode, which lets you scope the PAT to only the listed repos instead of the whole account.
  • Treat a leak of AUTH_TOKEN here as more serious than for the siblings: the Worker will read any in-scope repo on the caller's behalf.

Configure (wrangler.toml vars)

varmeaning
ORG_REPOowner/name of the dedicated org knowledge repo (its default branch's knowledge.json). Blank = no org recall.
TEAM_SCOPE_MODEdiscover (default) or allowlist. A trust decision — see Trust model.
TEAM_OWNERdiscover mode only. Owner (user/org) to auto-discover team repos under; every repo of theirs with TEAM_BRANCH is read. Blank = no discovery. Ignored in allowlist mode.
TEAM_REPOSdiscover mode: optional extra owner/name repos on top of discovery. allowlist mode: the complete team-scope set, comma-separated.
TEAM_BRANCHteam-scope branch (default cambium).
KNOWLEDGE_PATHfile name (default knowledge.json).
STATUS_DISCLOSE_REPOS"true" lets status() list team repo names. Default off — discovered names can include private repos.

In discover mode team scope is a growing set: a newly team-promoted repo shows up on mobile within minutes with no redeploy. One GraphQL scan per few minutes (cached in-isolate) lists the repos; a repo without the branch is skipped.

Deploy

bash
npm installnpm run typecheck && npm testnpx wrangler deploy# then set the two secrets in the Cloudflare dashboard (never in the repo):npx wrangler secret put AUTH_TOKEN   # the path-token credential; URL is /mcp/<AUTH_TOKEN>npx wrangler secret put GH_PAT       # fine-grained GitHub token: Metadata: Read + Contents: Read across your repos#                                    # (team scope is auto-discovered, so it needs to see all of TEAM_OWNER's repos)

Then add https://cambium-remote.<subdomain>.workers.dev/mcp/<AUTH_TOKEN> as a custom connector in claude.ai → Settings → Connectors. The whole URL is the credential — treat it like a password.

🔒 Auth — the connector URL is a credential

Path-token: POST /mcp/<token>, compared against the AUTH_TOKEN secret in time independent of both content and length; anything else returns a bare 404. Same scheme, and now literally the same code (src/shared/mcp-core.ts), as the sibling Workers.

Why the token is in the URL path, and what that costs you

This is a deliberate design choice, not an oversight. claude.ai custom connectors do not reliably send custom headers, so an Authorization: header — the obvious alternative — cannot be depended on. Putting the credential in the path is what makes the connector work at all.

Be clear about the price, because it is not the same as a header:

  • URLs get recorded in places request bodies never do. Browser history, shell history, proxy and CDN access logs, crash reports, bug reports, screenshots, "copy link" buttons, and agent session transcripts. During the audit that produced this section, the connector URLs for these Workers were found in ~54 occurrences across 13 local session transcripts on a single machine — none pasted deliberately; they were simply part of the tool configuration an agent echoed back.
  • The Worker itself does not log it. Every log line records the route as /mcp/***. The leak surface is everything around the Worker, which is exactly what you cannot audit.
  • A leak here is the worst of the three, because this Worker's GH_PAT spans every repo under TEAM_OWNER (see Trust model).

Practical guidance:

  1. Rotate on a schedule, not just on suspicion — assume the URL has been recorded somewhere you don't control. Rotation is cheap: change AUTH_TOKEN, update the connector.
  2. Rotate immediately if you've shared a terminal recording, a transcript, a screen capture, or a bug report from a machine where the connector is configured.
  3. Use a long random token (32+ bytes, e.g. openssl rand -hex 32).
  4. Scope GH_PAT as narrowly as your TEAM_SCOPE_MODE allows.
  5. If you ever get the chance to use a header or OAuth instead, take it. This tradeoff is forced by the client, not preferred.

Development

bash
npm installnpm run typechecknpm test

CI (.github/workflows/ci.yml) runs typecheck + tests on every push and PR, including in forks. .github/workflows/deploy.yml deploys the canonical repo on green main only, and is guarded by if: github.repository == … so a fork never attempts a deploy it has no secrets for.

License

MIT — see LICENSE, matching the sibling agentsync-remote and context-keeper-remote Workers.

Note for the maintainer: this README previously stated PolyForm Noncommercial 1.0.0 while the repo shipped no LICENSE file at all. An MIT LICENSE has been added here to match both siblings. If PolyForm was the intended licence for this Worker, replace LICENSE and this section before merging — the discrepancy was pre-existing and is flagged rather than assumed.

來源:README.md,提交 e3393bb

工具

0
SourceWeft 尚未讀取此伺服器的工具。

版本歷史

1
  1. v0.2.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式必需10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分