
Shodai Agreements
network.shodai由 shodai.network 發布官方發布者v0.1.0更新於 Nov 2, 2026
Author, validate, deploy, and operate Shodai on-chain agreements.
概覽
Shodai Agreements 讓助理透過 Shodai 協議 API 撰寫、驗證、預檢、部署並營運鏈上協議。
- 可以做什麼
- 列出、讀取並檢視協議及其文件、狀態與輸入紀錄
- 驗證協議範本並在部署前進行預檢
- 使用預先簽署的 EIP-712 許可部署協議、提交輸入
- 為部署與輸入產生 EIP-712 型別化資料,交由外部錢包簽署
- 以資源形式讀取範例協議、撰寫指南與文件索引
- 透過 author_agreement 提示把業務描述轉成協議 JSON
- 適用情境
- 適合使用 Shodai 鏈上協議、希望由助理起草、檢查並部署協議,或為外部錢包準備簽署資料的情境。可用於測試網實驗,也可透過託管端點進行正式環境的協議操作。
- 執行需求
- 需要 shodai.network/mcp 的遠端 Streamable HTTP 端點,或在本地以 Node.js 透過 stdio 執行 npm 套件。必須驗證身分:OAuth 瀏覽器登入,或以 Authorization bearer 標頭送出 API 金鑰(本地為 AGREEMENTS_API_KEY)。本地模式另支援 OAuth 用戶端憑證、環境設定(testnet 或 production),以及選用的 INFURA_PROJECT_ID 或 RPC 位址覆寫。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Shodai Agreements,將其新增到工作區。
- 連接 所需的 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
- 為需要使用其工具的對話啟用該服務。
Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。
交給代理程式安裝
把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。
閱讀 https://sourceweft.com/mcp/network.shodai%2Fagreements/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。其他 MCP 客戶端
把它新增到你客戶端的 mcpServers 設定中。 客戶端會在首次連接時完成 OAuth 登入。
{
"mcpServers": {
"shodai-agreements": {
"type": "http",
"url": "https://shodai.network/mcp"
}
}
}README
@shodai-network/agreements-mcp-server
Model Context Protocol server for the Agreements API. Configure Shodai as a remote Streamable HTTP MCP server and the full agreement lifecycle — author, validate, preflight, deploy, submit inputs — becomes callable as MCP tools.
The server is a pure consumer of the public /v0 API via @shodai-network/agreements-api-client. It holds no business logic and stores no credentials: every tool call forwards the caller's API key or OAuth access token to the Agreements API gateway, which enforces auth, entitlements, and metering.
Hosted endpoint
Stateless Streamable HTTP: POST only, JSON responses, no server-side sessions. Use this hosted setup contract:
The canonical hosted endpoint advertises Shodai's testnet authorization server. An OAuth-capable MCP client follows RFC 9728 protected-resource discovery, opens browser authorization, and reconnects with the resulting access token. Use environment: "testnet" for that OAuth connection.
When OAUTH_AUTHORIZATION_SERVERS is set, the server:
- Serves RFC 9728 protected-resource metadata at
/.well-known/oauth-protected-resource(and.../mcp) - Challenges unauthenticated
POST /mcpwithWWW-Authenticate(resource_metadata=...) - Accepts OAuth access tokens (
Authorization: Bearer <jwt>) in addition to API keys
API keys remain supported as a fallback and as the production credential path. Send Authorization: Bearer cns_pk_... and match the key to the tool environment: testnet keys use testnet, and production keys use production.
First-flight setup, tool access, and typed-data preparation: Quickstart with MCP.
Run locally (stdio)
Stdio environment variables:
Tools
Most tools call the public /v0 API through the TypeScript client and carry MCP behavior annotations (readOnlyHint, destructiveHint). A few tools perform more than one operation to keep signing and deployment safe.
On the hosted endpoint, every API-calling tool below requires environment: "testnet" | "production". Local stdio mode uses the fixed environment from AGREEMENTS_API_ENVIRONMENT instead.
Resources are discoverable with resources/list:
Prompt: author_agreement (business description → agreement JSON).
Signing custody modes
Deploys and input submissions require EIP-712 permits. Three supported modes:
- Pre-signed permit — the agent or host app holds a wallet, signs externally, and passes
signer/deadline/signaturetodeploy_agreementorsubmit_input. - Prepare typed data, sign externally — call
prepare_deployment_typed_data/prepare_input_typed_datato get the exact EIP-712 payload, sign it with any EIP-712-capable signer, then call the write tool. For deployments, pass the returnednormalizedInitValues,normalizedParticipants, andnormalizedObserversback todeploy_agreementwith the signature. - Local environment signer (stdio only) — set
AGREEMENTS_SIGNER_PRIVATE_KEYand write tools sign locally. Dev/testnet pattern; the hosted endpoint never signs with server-side keys.
Minimal hosted flow: read simple-example-agreement, call validate_agreement, preflight_deployment, prepare_deployment_typed_data with environment/agreement/chainId/signerAddress and intended deployment context, sign externally, then call deploy_agreement with the same environment, displayName, matching docUri, normalized deployment fields, and permit fields. For inputs, call prepare_input_typed_data with environment/agreementId/inputId/values/signerAddress, sign externally, call submit_input with the same environment, then reread state and input history.
Hosted MCP receives signed permit fields only, never private keys. Private-key environment signing is for local stdio development and testnet automation only.
Self-hosting
HTTP environment variables: PORT, HOST, MCP_PATH, PUBLIC_MCP_URL, AGREEMENTS_API_TESTNET_BASE_URL, AGREEMENTS_API_PRODUCTION_BASE_URL, and optional local AGREEMENTS_API_BASE_URL for single-origin testing. Set PUBLIC_MCP_URL when discovery metadata should advertise a canonical public endpoint that differs from the request host.
A Dockerfile is included for container deployments. GET /healthz serves as the health endpoint.
Development
Verify interactively with the MCP Inspector:
Pin @latest: older Inspector versions do not support --transport/--header for URL targets.
License
MIT — see LICENSE. Note this package is MIT-licensed individually; other packages in this repository are licensed under Apache-2.0.
來源:packages/agreements-mcp-server/README.md,提交 5315578
工具
0版本歷史
1- v0.1.0最新Sep 16, 2026
評分
已滿足適用檢查項的 85%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通必需25 分
- 已宣告認證方式必需10 分
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分