Feat: MCP Enhancements#1888
Conversation
- [X] **blocks usage**: - [X] proposals payload bloat; - [ ] **correctness / UX**: - [ ] Two health endpoints, inverted utility; - [ ] Mixed naming; - [ ] **polish:** - [ ] `changeRate` is opaque; - [ ] *ByAccountId endpoints are redundant with their list counterparts; - [ ] DAO id casing mismatch; - [ ] Inconsistent pagination; - [ ] **strategic:** - [ ] No cross-DAO aggregation; - [ ] Per-endpoint DAO enums diverge with no machine-readable capability map;
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
🚅 Deployed to the anticapture-pr-1888 environment in anticapture-infra
14 services not affected by this PR
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ac56ee949d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 298cc755cd
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f8c3ccf365
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Summary
Refines the MCP server and supporting REST surface so LLM clients get smaller, better-described payloads.
GET /proposals/lean,/proposals/lean/{id},/proposals/lean/search(and Snapshot equivalents under/offchain/proposals/lean*). These mirror the existing endpoints but omit heavyfields (
calldatas/values/targetson-chain,bodyoff-chain). The MCP server (packages/anticapture-client/src/create-mcp-server.ts) now binds theproposals,searchProposals,proposal, and Snapshot equivalents tothe lean variants. The full-payload endpoints remain available over REST.
GET /healthnow returns a snapshot (status,database,chain.head,indexer.{lastEventTimestamp,lagSeconds,fresh}). Freshness threshold is 300s. New gateway routeGET /{dao}/healthproxiesthe per-DAO snapshot and includes the gateway's circuit-breaker state.
rawDeltaadded to every change-rate response (governance-activity, token-distribution) so clients don't need to recompute the signed delta themselves.changeRateprecision bumped from 2 to 6 decimals.gatewayHealth,daos,averageDelegationPercentage); DAO identifier descriptions clarified (uppercasefor response IDs,case-insensitivefor path params); merged upstream
/healthpaths blocklisted so the gateway's resolver definition wins.These rename/shape changes will require coordinated client updates:
DaoResponsefield rename —alreadySupportCalldataReview→supportsCalldataReview,supportOffchainData→supportsOffchainData. Affects/{dao}/dao,/daos, the GraphQL schema, the MCPdao/daostools, andany generated client types. Dashboard and other consumers must update field references.
/voting-powers/{accountId}→/voting-powers/{address}. The URL itself still matches positionally, but OpenAPI-generated clients and the MCPvotingPowerByAccountIdtool nowexpect
addressin place ofaccountId./health503 response shape — the legacy{ status, database, message }body is gone. The error response is now the full snapshot shape withdatabase: "error". Consumers that surfaced themessagestring lose thattext.