This quickstart uses Shodai’s free testnet environment. Production access is available by request. Request production access.
This quickstart stops after
prepare_deployment_typed_data. The returned typed data proves that hosted MCP can assemble the exact deploy authorization payload, including chain nonce/context, without performing a live write.Connect hosted MCP with browser OAuth
Hosted Shodai MCP uses protected-resource discovery so an OAuth-capable client can locate Shodai’s authorization server and start browser authorization automatically.1
Add the hosted server
Add
https://shodai.network/mcp as a remote Streamable HTTP MCP server.2
Start the connection
Connect to the server and allow your MCP client to open Shodai sign-in in the browser.
3
Approve access
Sign in, review the permissions requested by the client, and approve the connection.
4
Confirm the tools are available
Return to your MCP client and confirm that the Shodai Agreements tools are available.
environment: "testnet" or environment: "production", and this quickstart uses testnet throughout.
Connect a client that does not support OAuth
Connect a client that does not support OAuth
Send an API key as
Authorization: Bearer cns_pk_.... The key must belong to the same environment passed to each tool, such as a testnet key with environment: "testnet". See Authentication for key creation, storage, production provisioning, and failure details.Validate and prepare an agreement
1
Call an authenticated read tool
Call:with:This confirms the authenticated MCP connection can call the testnet Agreements API.
2
Read the simple example resource
Run Parse the returned
resources/list, then read:contents[0].text value as agreement for the remaining tool calls.3
Validate the agreement
Call:with:Confirm the response includes participant variable keys, input IDs, state IDs, and warnings.
4
Prepare public deployment values
Choose public wallet addresses for the first-flight deployment context. Hosted MCP needs addresses only, not private keys.Use real public addresses from your signing setup for an actual run. The first address is the deploy signer for this first-flight check.
5
Preflight deployment
Call:with:Review
variables, participants, observers, contributors, and warnings before preparing typed data.6
Prepare deploy typed data
Call:with the same Confirm the response includes:
environment, agreement, chainId, signerAddress, and participants:typedDatasignerAddresschainIddeadlinedocUridocumentIdnormalizedInitValuesnormalizedParticipantsnormalizedObserverspreflightWarningsnextStepplaygroundUrl
Recommended signing harness
The signing harness is optional because hosted MCP does not require one specific custody model. Use one of these signing paths:
For SDK signing details, see TypeScript client reference. For low-level payload semantics and debugging, see EIP-712 signing.
Write authority
Onlydeploy_agreement and submit_input are side-effecting tools; submit_input may advance lifecycle state.
validate_agreement, preflight_deployment, prepare_deployment_typed_data, and prepare_input_typed_data are non-destructive preparation steps. Scope is not the same as side effect: some non-destructive tools require agreements.write because they validate deployment context or prepare write authorization.
Hosted MCP receives signed permit fields only. It never receives private keys. AGREEMENTS_SIGNER_PRIVATE_KEY is local stdio-only and for development/testnet automation.