
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 分