Spanning Cloud Backup

io.github.WYRE-AI由 GitHub 帳號 WYRE-AI 發布v1.1.5更新於 Oct 25, 2026

MCP server for Spanning Cloud Backup — M365/GWS/Salesforce backups, restores, audit.

概覽

AI 產生的概覽

適用於 Spanning Cloud Backup 的 MCP 伺服器,讓助理檢視 M365、Google Workspace 或 Salesforce 的備份狀態、排入還原工作並查看稽核與授權席位用量。

可以做什麼
列出已備份使用者並取得單一使用者詳細資料,在支援的 MCP Apps 主機中顯示互動式備份狀態卡片,其他主機則回傳一般 JSON。列出某使用者涵蓋的服務,以及某使用者某服務的備份執行紀錄。排入還原工作並查詢還原進度。依日期範圍讀取管理員稽核日誌,查看已用與已購買的授權席位。檢查伺服器狀態與健康情形。
適用情境
適合需要讓助理回答 M365、Google Workspace 或 Salesforce 租用戶 SaaS 備份狀況的情境,也適合管理員希望以對話方式處理還原與稽核活動,而不必登入 Spanning 主控台。
執行需求
透過 stdio 在本機執行,可使用 npm 專案或已發佈的容器映像。需要 SPANNING_PLATFORM(m365、gws 或 salesforce)、SPANNING_ADMIN_EMAIL 以及密鑰 SPANNING_API_TOKEN。HTTP 模式另需 CONDUIT_S2S_SECRET 與簽章的 X-Gateway-S2S 標頭;閘道模式則從每次請求的 X-Spanning-* 標頭讀取憑證。建置映像需要 GitHub Packages 的 npmrc。
安裝前請注意
API 權杖屬於機密,不可提交到儲存庫。還原工具被標示為破壞性操作且需要確認,排入還原會變更備份資料。稽核日誌存取會暴露管理員活動。HTTP 模式下服務間密鑰會驗證每個請求,不安全的開發開關會關閉該驗證,僅限本機使用。閘道模式在每次請求中傳遞租用戶憑證。

安裝

在 SourceWeft 中

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

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

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

README

Spanning Cloud Backup MCP Server

[CI] [License: Apache 2.0]

A Model Context Protocol server exposing the Spanning Cloud Backup API to Claude and other MCP clients.

What it does

Surface SaaS backup posture for your M365, Google Workspace, or Salesforce tenants directly to AI assistants — list backed-up users, inspect covered services, browse backup history, queue restores, and audit admin activity and license usage.

  • Interactive backup status card (MCP Apps, SEP-1865): spanning_get_user renders as a read-only interactive card in MCP Apps hosts (Claude Desktop/web) showing the user's backup status, license state, last backup, and per-service coverage; neutral by default, brandable via window.__BRAND__ injection or MCP_BRAND_* env vars (MCP_BRAND_NAME, MCP_BRAND_LOGO_URL, MCP_BRAND_PRIMARY_COLOR, MCP_BRAND_ACCENT_COLOR, MCP_BRAND_BG, MCP_BRAND_TEXT). Plain-JSON behavior is unchanged in other hosts. Rebuild the embedded card with npm run build:ui after editing ui/.

Tools

ToolPurpose
spanning_list_usersList backed-up users in the org
spanning_get_userFetch a single user's detail
spanning_list_servicesList services covered for a user
spanning_list_backupsList backup runs for a user + service
spanning_queue_restoreQueue a restore (DESTRUCTIVE — requires confirmation)
spanning_get_restore_statusCheck restore progress
spanning_list_audit_logAdmin audit log (date-range elicitation)
spanning_get_license_usageSeats used vs purchased
spanning_statusServer status / health

Credentials

Copy .env.example and set the variables below. Leave CONDUIT_S2S_SECRET empty in the example. Never commit a real secret.

Local (env mode)

sh
export SPANNING_PLATFORM="m365"        # or "gws" or "salesforce"export SPANNING_ADMIN_EMAIL="..."export SPANNING_API_TOKEN="..."

The stdio transport reads those variables and does not use CONDUIT_S2S_SECRET.

HTTP transport

CONDUIT_S2S_SECRET is required when MCP_TRANSPORT=http. If it is empty or a known placeholder (changeme, change-me, secret, placeholder, example, replace-me, replace-with-a-real-secret, your-secret, your-s2s-secret, s2s-secret), the process logs an error and exits non-zero. The secret value is never logged. Generate one with openssl rand -hex 32.

MCP_ALLOW_INSECURE_DEV=1 is local development only. It starts HTTP without CONDUIT_S2S_SECRET, logs a warning, does not check X-Gateway-S2S, and listens on 127.0.0.1 only. A non-loopback MCP_HTTP_HOST (including 0.0.0.0) is overridden to 127.0.0.1 and that override is logged. A known placeholder secret is still refused.

MCP_HTTP_HOST defaults to 127.0.0.1 when unset. A configured CONDUIT_S2S_SECRET honors MCP_HTTP_HOST. The container image sets MCP_HTTP_HOST=0.0.0.0 and AUTH_MODE=gateway.

X-Gateway-S2S

With a real CONDUIT_S2S_SECRET, every /mcp request must include X-Gateway-S2S. The check is verifyS2sHeader in src/s2s-verify.ts: the header value is t=<unix seconds>,v1=<hex>, where the hex is HMAC-SHA256 of the literal string t=<unix seconds> keyed with CONDUIT_S2S_SECRET (64 lowercase hex characters). The timestamp must be within 300 seconds of the server clock. A missing or invalid header is HTTP 401, before vendor credentials are read.

bash
TS=$(date +%s)SIG=$(printf 't=%s' "$TS" | openssl dgst -sha256 -hmac "$CONDUIT_S2S_SECRET" -hex | awk '{print $NF}')curl -sS http://127.0.0.1:8080/mcp \  -H 'Content-Type: application/json' \  -H 'Accept: application/json, text/event-stream' \  -H "X-Gateway-S2S: t=${TS},v1=${SIG}" \  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Hosted (gateway mode)

AUTH_MODE=gateway (the Docker image and Compose default) requires all three headers on every /mcp request and does not fall back to SPANNING_* in the process environment:

  • X-Spanning-Platform (required, one of m365 | gws | salesforce)
  • X-Spanning-Admin-Email (required)
  • X-Spanning-API-Token (required, secret)

A request missing any of those headers is HTTP 401. Add them to the signed curl above. The gateway Compose service does not set SPANNING_PLATFORM, SPANNING_ADMIN_EMAIL, or SPANNING_API_TOKEN.

/health stays unauthenticated and does not read credentials.

Single-tenant HTTP (AUTH_MODE=env)

/mcp still requires a valid X-Gateway-S2S header. Vendor credentials come from SPANNING_PLATFORM, SPANNING_ADMIN_EMAIL, and SPANNING_API_TOKEN. Pass those on that process. Do not add them to the gateway Compose service.

VariableRequiredDescription
SPANNING_PLATFORMstdio and AUTH_MODE=envm365, gws, or salesforce
SPANNING_ADMIN_EMAILstdio and AUTH_MODE=envSpanning admin account email
SPANNING_API_TOKENstdio and AUTH_MODE=envSpanning API token
MCP_TRANSPORTNostdio (default) or http
AUTH_MODENogateway (Docker image and Compose) or env. Gateway mode requires the X-Spanning-* headers and never falls back to SPANNING_*.
CONDUIT_S2S_SECRETYes for HTTPService-to-service HMAC secret. HTTP logs an error and exits non-zero when this is empty or a known placeholder. Compose will not start without it. Never commit a real value.
MCP_ALLOW_INSECURE_DEVNoSet to 1 only for local development to start HTTP without CONDUIT_S2S_SECRET. Logs a warning, skips X-Gateway-S2S, and binds 127.0.0.1 only.
MCP_HTTP_HOSTNoBind address when MCP_TRANSPORT=http. Defaults to 127.0.0.1. Honored when CONDUIT_S2S_SECRET is set. The container image sets 0.0.0.0.
MCP_HTTP_PORTNoHTTP port. Defaults to 8080.

Run

sh
npm installnpm run buildnpm start                       # stdio
# HTTP refuses to start until CONDUIT_S2S_SECRET is a real secretCONDUIT_S2S_SECRET="$(openssl rand -hex 32)" MCP_TRANSPORT=http npm start
# Local HTTP only, without a service-to-service secret (always binds 127.0.0.1)MCP_TRANSPORT=http MCP_ALLOW_INSECURE_DEV=1 npm start

Docker

The image listens on 0.0.0.0 inside the container and defaults to AUTH_MODE=gateway. Publish the port on loopback and pass the S2S secret. In gateway mode, Spanning credentials arrive on each request as headers.

bash
docker build --secret id=npmrc,src=$HOME/.npmrc -t spanning-mcp .docker run --rm \  -e CONDUIT_S2S_SECRET \  -p 127.0.0.1:8080:8080 \  spanning-mcp

Compose refuses to start when CONDUIT_S2S_SECRET is unset, sets AUTH_MODE=gateway, publishes 127.0.0.1:8080:8080, and does not inject static Spanning credentials:

bash
CONDUIT_S2S_SECRET="$(openssl rand -hex 32)" docker compose up --build

The image build needs a GitHub Packages npmrc (docker build --secret id=npmrc,src=$HOME/.npmrc). Single-tenant HTTP still requires the S2S secret, then uses SPANNING_*:

bash
docker run --rm \  -e CONDUIT_S2S_SECRET \  -e AUTH_MODE=env \  -e SPANNING_PLATFORM=m365 \  -e [email protected] \  -e SPANNING_API_TOKEN \  -p 127.0.0.1:8080:8080 \  spanning-mcp

License

Apache 2.0 — see LICENSE.

來源:README.md,提交 e80458d

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

2
  1. v1.1.5最新Oct 14, 2026
  2. v1.1.4Sep 16, 2026

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

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

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

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

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