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 集成