Shodai Agreements

network.shodai由 shodai.network 發布官方發布者v0.1.0更新於 Nov 2, 2026

Author, validate, deploy, and operate Shodai on-chain agreements.

已驗證Streamable HTTP可網頁執行金融開發者工具

概覽

AI 產生的概覽

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 位址覆寫。
安裝前請注意
寫入類工具會在鏈上部署協議並提交輸入,並消耗計量的 API 額度。託管端點只接收已簽署的許可欄位,切勿向其傳送私鑰。設定 AGREEMENTS_SIGNER_PRIVATE_KEY 會讓本地伺服器以錢包私鑰簽署,文件說明僅限開發與測試網。API 金鑰須與環境相符,測試網與正式環境金鑰不可混用。

安裝

在 SourceWeft 中

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

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:

text
Configure Shodai as a remote Streamable HTTP MCP server.
URL:https://shodai.network/mcp
Auth:Start the connection and complete Shodai browser sign-in and consent.
Tool environment:testnet
Use this value as the environment argument on API-calling tools.

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 /mcp with WWW-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)

json
{  "mcpServers": {    "shodai-agreements": {      "command": "npx",      "args": ["-y", "@shodai-network/agreements-mcp-server"],      "env": {        "AGREEMENTS_API_KEY": "YOUR_API_KEY",        "AGREEMENTS_API_ENVIRONMENT": "testnet"      }    }  }}

Stdio environment variables:

VariableUse
AGREEMENTS_API_KEY (or API_KEY)API key used for tool calls. Required unless OAuth client credentials are configured.
OAUTH_CLIENT_ID / OAUTH_CLIENT_PRIVATE_JWKOAuth client-credentials auth for agent identities; the server mints and refreshes bearer tokens itself. Alternative to AGREEMENTS_API_KEY (which wins if both are set).
OAUTH_ISSUER_URL (or OAUTH_TOKEN_URL)Authorization server issuer for token-endpoint discovery, or the explicit token endpoint. Required with OAuth client credentials.
OAUTH_SCOPEOptional space-separated scopes to request on minted tokens.
AGREEMENTS_API_ENVIRONMENTtestnet (default) or production.
AGREEMENTS_API_BASE_URLExplicit gateway origin override. Wins over the environment.
AGREEMENTS_SIGNER_PRIVATE_KEYOptional local permit signer for write tools (dev/testnet only).
INFURA_PROJECT_IDInfura project ID used to derive RPC URLs for the built-in Linea, Sepolia, and Base agreement chains.
AGREEMENTS_RPC_URL, AGREEMENTS_RPC_URL_<chainId>Optional RPC overrides used when preparing or signing permits.

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.

ToolWrapsScope
list_agreementsGET /v0/agreementsagreements.read
get_agreementGET /v0/agreements/{id}agreements.read
get_agreement_documentGET /v0/agreements/documents/{documentId}agreements.read
get_agreement_stateGET /v0/agreements/{id}/stateagreements.read
get_input_historyGET /v0/agreements/{id}/inputsagreements.read
validate_agreementPOST /v0/agreements/validate-templateagreements.write
preflight_deploymentPOST /v0/agreements/validateagreements.write
deploy_agreementPOST /v0/agreements/validate, then POST /v0/agreements/deploy-with-permitagreements.write
submit_inputPOST /v0/agreements/{id}/inputagreements.write
prepare_deployment_typed_dataPOST /v0/agreements/validate, then local EIP-712 payload construction with a chain nonce readagreements.write
prepare_input_typed_dataGET /v0/agreements/{id}, then local EIP-712 payload construction with a chain nonce readagreements.write

Resources are discoverable with resources/list:

ResourceURI
simple-example-agreementagreements://examples/simple-agreement.json
complex-example-agreementagreements://examples/complex-agreement.json
authoring-guideagreements://docs/author-agreement-json.md
docs-indexagreements://docs/index.md

Prompt: author_agreement (business description → agreement JSON).

Signing custody modes

Deploys and input submissions require EIP-712 permits. Three supported modes:

  1. Pre-signed permit — the agent or host app holds a wallet, signs externally, and passes signer/deadline/signature to deploy_agreement or submit_input.
  2. Prepare typed data, sign externally — call prepare_deployment_typed_data / prepare_input_typed_data to get the exact EIP-712 payload, sign it with any EIP-712-capable signer, then call the write tool. For deployments, pass the returned normalizedInitValues, normalizedParticipants, and normalizedObservers back to deploy_agreement with the signature.
  3. Local environment signer (stdio only) — set AGREEMENTS_SIGNER_PRIVATE_KEY and 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

bash
npm install @shodai-network/agreements-mcp-serveragreements-mcp-server-http   # Streamable HTTP on PORT (default 3905), endpoint /mcp

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

bash
pnpm installpnpm --filter @shodai-network/agreements-mcp-server buildpnpm --filter @shodai-network/agreements-mcp-server test

Verify interactively with the MCP Inspector:

bash
npx -y @modelcontextprotocol/inspector@latest --cli http://localhost:3905/mcp \  --transport http --method tools/list --header "Authorization: Bearer $SHODAI_API_KEY"

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

版本歷史

1
  1. v0.1.0最新Sep 16, 2026

評分

已滿足適用檢查項的 85%

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

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

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

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