
mcp
box.snapshot/mcp
Query Snapshot governance data, and vote, propose or follow spaces for the user.
Documentation
Snapshot monorepository
This is the Snapshot monorepository containing a Vue frontend, GraphQL API, a transaction relayer, and a TypeScript SDK.
Apps
./apps/ui: Snapshot official frontend using Vue 3./apps/api: Multichain indexer for Snapshot X using Checkpoint./apps/hub: GraphQL API for the Snapshot offchain protocol./apps/mana: Transaction relayer for gasless voting on Snapshot X./apps/mcp: MCP server for the Snapshot API./apps/sequencer: Sequencer for Snapshot offchain protocol
Packages
./packages/sx.js: TypeScript SDK for Snapshot, Snapshot X and Governor./packages/tune: Vue 3 UI kit for Snapshot apps./packages/lock: Web3 connector library for Snapshot's Vue app
Usage
Project setup
bun install
Compiles and hot-reloads for development
UI only
bun run dev
This runs ui (port 8080).
UI with backend services
Compiles and minifies for production
bun run build
Lints and fixes files
bun run lint
Runs tests
bun run test
Run E2E tests using Playwright
bun run test:e2e
Verifies TypeScript code
bun run typecheck
Running local services
You can run all local services (api, mana, ui) with single command assuming you have all necessary environment variables set up. Local APIs will only be used for Ethereum Sepolia and Starknet Sepolia.
This command will allow you to select which services you want to run.
bun run dev:interactive
Setup
You need to have Docker running on your machine.
In apps/api and apps/mana copy .env.example to .env files.
In apps/mana/.env you need to fill in following empty variables:
WALLET_SECRET- if you want to use it as relayer (used for both Starknet and Ethereum wallets).HERODOTUS_API_KEYandHERODOTUS_LEGACY_API_KEY- if you want to use L1<->L2 messaging (voting with strategies that use L1 proofs)
Getting it running faster
If you run bun run dev:interactive it will take long time to sync all the blocks for the first time. To mitigate it you can just change starting block
for indexing here:
- https://github.com/snapshot-labs/sx-monorepo/blob/daad48dbd2aa775e47334d0697cb84477c1d3427/apps/api/src/starknet/config.ts#L40 (for Starknet)
- https://github.com/snapshot-labs/sx-monorepo/blob/9f5c78468c72e0ddd51578bdd984cc9da19f119a/apps/api/src/evm/config.ts#L23 (for Ethereum)
If you do that make sure to create a new space, because spaces created before the new starting block you picked won't be available.
Versioning packages
Packages are versioned using changesets.
In most cases all you need to do is when adding new changes to versioned packages (right now it's just sx.js)
is to execute bun run changeset, specify package you updated, version bump per semver and description of your changes.
Then commit generated files in your PR.
Once merged changesets actions will create PR that can be used to release and publish those packages.
Development docs
No installation packages available.