Snapshot

box.snapshot由 snapshot.box 發布官方發布者v0.1.0更新於 Nov 22, 2026

Query Snapshot governance data, and vote, propose or follow spaces for the user.

已驗證Streamable HTTP可網頁執行資料庫金融

概覽

AI 產生的概覽

Snapshot 治理資料伺服器:讓助理讀取 Snapshot 的空間、提案與投票,並代使用者投票、建立提案或追蹤空間。

可以做什麼
  • 以任意 GraphQL 查詢 Snapshot API 的治理資料,使用者地址會自動綁定為 $user
  • 在查詢因未知欄位或篩選條件失敗時檢視 GraphQL schema
  • 檢視已連線身分、委派簽章別名、授權狀態與公開個人資料
  • 對提案投票或覆寫先前的投票,提案的投票類型與隱私模式會自動套用
  • 建立提案,投票類型、期間與隱私預設沿用空間設定
  • 為使用者追蹤或取消追蹤某個空間
適用情境
適合關注 Snapshot 上 DAO 或代幣治理的情境:讓助理彙整進行中的提案、查詢投票權與結果,或代你投票、草擬提案與追蹤空間。
執行需求
託管端點 mcp.snapshot.box,使用 OAuth 2.0,需要連接錢包並在 Snapshot 上授權委派簽章別名。自架需 Bun 1.0.0 以上版本;HTTP 模式需 JWT_SECRET 及 Coinbase CDP 憑證(CDP_API_KEY_ID、CDP_API_KEY_SECRET、CDP_WALLET_SECRET);stdio 模式需 ALIAS_PRIVATE_KEY。SNAPSHOT_API_KEY 為選用,可提高速率上限。
安裝前請注意
寫入類工具會代使用者執行操作:投票會覆寫先前的投票,提案會公開發布,追蹤會改變帳戶狀態。簽章委派給別名錢包,須在 Snapshot 上授權,也可在該處撤銷。自架 stdio 模式在 ALIAS_PRIVATE_KEY 中使用原始私鑰;HTTP 模式需要 CDP 錢包密鑰與 JWT_SECRET,輪換該密鑰會使所有權杖失效。任意 GraphQL 查詢都會送往 Snapshot 的 API。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Snapshot,將其新增到工作區。
  2. 連接 所需的 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
  3. 為需要使用其工具的對話啟用該服務。

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

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/box.snapshot%2Fmcp/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。 客戶端會在首次連接時完成 OAuth 登入。

{
  "mcpServers": {
    "snapshot": {
      "type": "http",
      "url": "https://mcp.snapshot.box/"
    }
  }
}

README

[loc]

Snapshot MCP

A Model Context Protocol server for Snapshot. Lets AI assistants read governance data (spaces, proposals, votes, voting power) and act on the user's behalf (cast votes, create proposals, follow spaces) through Snapshot's GraphQL API. Available as a hosted endpoint at https://mcp.snapshot.box, or self-hostable.

Tools

snapshot-query

Runs any GraphQL query against the Snapshot API. The user's address is auto-bound as $user — declare it in the query and reference it; do not pass it in variables.

InputTypeDescription
querystringGraphQL query string
variablesobject?GraphQL variables

Example — fetch active proposals for a space:

graphql
query ($space: String!) {  proposals(first: 10, where: { space: $space, state: "active" }) {    id    title    choices    scores    votes    end  }}

snapshot-schema

Returns the Snapshot GraphQL schema. Call this before snapshot-query only when a query fails on an unknown field or filter. The response is large, so do not call it preemptively.

No inputs.

snapshot-whoami

Returns the connected identity and signing capability:

  • address — the user's account, auto-injected as $user in snapshot-query.
  • alias — the delegated signer wallet that signs writes on the user's behalf.
  • authorized — whether that alias is currently authorized for the user. When false, the write tools fail until the user re-authorizes.
  • profile — the user's public profile (name, about, avatar) when one exists.
  • links.alias — the page where the user authorizes or revokes the signer alias.

Useful as a pre-flight before a write action. Requires a connected wallet, same as snapshot-vote.

No inputs.

snapshot-vote

Casts a vote on a Snapshot proposal. The proposal's voting type and privacy are fetched from Snapshot and applied automatically, so the caller does not need to specify them. Re-calling on the same proposal replaces the previous vote (this is how the user changes a vote).

InputTypeDescription
spacestringSpace ID slug (e.g. "ens.eth")
proposalstringProposal ID (hex string)
choicenumber | number[] | objectA number for basic/single-choice, an array of indices for approval/ranked-choice, or { "1": weight, "2": weight, ... } for weighted/quadratic
reasonstring?Reason for the vote. Ignored on Shutter-encrypted proposals.

Requires a wallet to be configured for signing (see Configuration). On HTTP, this is the OAuth-managed CDP alias; on stdio, it is the ALIAS_PRIVATE_KEY. If the user has not yet authorized the alias, the tool returns the authorization URL for them to visit.

snapshot-propose

Creates a Snapshot proposal. Most defaults come from the space itself, so for typical use you only need space, title, and body. The space's enforced voting type, voting period, and privacy mode are read from Snapshot and applied automatically.

InputTypeDescription
spacestringSpace ID slug (e.g. "ens.eth")
titlestringProposal title
bodystring?Proposal body (markdown)
discussionstring?Discussion link
typestring?One of basic, single-choice, approval, ranked-choice, weighted, quadratic. Defaults to whatever the space enforces, or basic.
choicesstring[]?Vote choices. Defaults to ["For", "Against", "Abstain"] for basic; required for any other type.
labelsstring[]?Proposal label IDs
startnumber?Voting start as a unix timestamp in seconds. Defaults to now + space.voting.delay.
endnumber?Voting end as a unix timestamp in seconds. Defaults to start + space.voting.period (3 days if the space sets none).
privacy"shutter" | "none"?Opt into Shutter-encrypted voting with "shutter". Only honored when the space's voting.privacy is "any"; spaces with voting.privacy === "shutter" always encrypt.

The snapshot block is read from https://rpc.brovider.xyz/<chainId> based on the space's network. Requires a wallet, same as snapshot-vote.

snapshot-follow

Follows or unfollows a space for the user. Following a space you already follow returns an error, and so does unfollowing a space you do not follow. Check the current state with follows(where: { follower: $user }) before calling this.

InputTypeDescription
spacestringSpace ID slug (e.g. "ens.eth")
action"follow" | "unfollow"?Whether to follow or unfollow. Defaults to "follow".

Requires a wallet, same as snapshot-vote and snapshot-propose.

Usage

Hosted (Claude Desktop / Claude.ai)

json
{  "mcpServers": {    "snapshot": {      "type": "http",      "url": "https://mcp.snapshot.box"    }  }}

Self-hosting

Requirements: Bun ≥ 1.0.0

bash
bun install
HTTP server
bash
bun start

Listens on port 8080 by default (override with PORT env var).

Stdio (local)
bash
bun run stdio

Claude Desktop config example:

json
{  "mcpServers": {    "snapshot": {      "command": "bun",      "args": ["src/index.ts", "--stdio"],      "cwd": "/path/to/snapshot-mcp",      "env": {        "ALIAS_PRIVATE_KEY": "0x..."      }    }  }}

Configuration

Copy .env.example to .env and configure:

VariableDescription
SNAPSHOT_API_KEYSnapshot API key for higher rate limits (optional)
SNAPSHOT_API_URLGraphQL endpoint (default https://hub.snapshot.org/graphql)
PORTHTTP server port (default: 8080)
BASE_URLPublic URL for OAuth metadata (e.g. https://mcp.snapshot.box)
JWT_SECRETHS256 secret used to sign access tokens — required for HTTP mode (≥32 chars; openssl rand -hex 32)
CDP_API_KEY_IDCoinbase CDP API key ID — required for HTTP mode
CDP_API_KEY_SECRETCoinbase CDP API key secret — required for HTTP mode
CDP_WALLET_SECRETCoinbase CDP wallet secret — required for HTTP mode
ALIAS_PRIVATE_KEYSingle private key — stdio mode only (ignored by HTTP server)

The HTTP server requires CDP credentials and a JWT secret. Each user who connects via OAuth gets their own CDP-managed alias wallet, so votes can only be signed by the user who authorized the specific alias. Access tokens are stateless JWTs (HS256) signed with JWT_SECRET; rotating that secret invalidates every issued token.

Auth flow

HTTP (Claude Desktop / Claude.ai) — OAuth 2.0

The HTTP server exposes OAuth 2.0 endpoints. Claude Desktop and Claude.ai will show a "Connect" button that triggers the flow automatically:

  1. Claude redirects to /authorize
  2. Server mints a fresh per-session CDP alias wallet and redirects to snapshot.box/#/settings/alias/authorize/<alias> with a callback URL
  3. User authorizes that alias on Snapshot
  4. Snapshot redirects back to /auth/callback
  5. Server resolves the authorizing user from the alias, generates an auth code, and redirects back to Claude
  6. Claude exchanges the code for a JWT (HS256) access token at /token
  7. All subsequent requests include the token — the server verifies the signature and reads the user and their CDP account from the claims

Each user gets their own CDP alias, so one user cannot sign votes on behalf of another. Tokens are self-verifiable and survive server restarts (until JWT_SECRET rotates).

Stdio (local)

  1. Call snapshot-vote — if not yet authorized, returns the authorization URL
  2. User visits snapshot.box/#/settings/alias/authorize/<alias> to authorize
  3. Call snapshot-vote again — works

Development

bash
bun dev      # watch modebun test     # run security testsbun lint     # ESLintbun format   # Prettier

來源:apps/mcp/README.md,提交 082bd16

工具

0
該伺服器需要登入,因此 SourceWeft 無法在沒有帳號的情況下讀取其工具,也未收錄。已連接帳號所能看到的內容可能因帳號及其權限而異。

版本歷史

1
  1. v0.1.0最新Nov 22, 2026

評分

已滿足適用檢查項的 85%

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

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具15 分

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

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

其他 Snapshot 整合