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 分