- Keyan
oda_…key: free with a wallet sign-in (300 calls), or bought with tADA or tNIGHT. Both servers read it fromODATANO_ACCESS_KEY. - Node20 or newer.
npxfetches the servers, nothing else to install. - Network
ODATANO_ACCESS_URLpicks the host. This one serves preprod. - Costa tool call costs the API calls it makes: a read one, a Midnight write about 10
Both chains as agent tools
Two MCP servers, one key. @odatano/core-mcp gives an agent Cardano, @odatano/nightgate-mcp gives it Midnight. They run in Claude Code, Claude Desktop, Cursor or any other MCP client.
Before you start
.mcp.json{ "mcpServers": {
"odatano": {
"command": "npx",
"args": ["-y", "@odatano/core-mcp"],
"env": {
"ODATANO_ACCESS_KEY": "oda_…",
"ODATANO_ACCESS_URL": "https://api.preprod.odatano.dev"
}
},
"nightgate": {
"command": "npx",
"args": ["-y", "@odatano/nightgate-mcp"],
"env": {
"ODATANO_ACCESS_KEY": "oda_…",
"ODATANO_ACCESS_URL": "https://api.preprod.odatano.dev",
"NIGHTGATE_NETWORK": "preprod"
}
}
} }
Three steps
- 1Add the servers. Put the
.mcp.jsonabove in your project, or add them withclaude mcp add. Restart the client. - 2Ask. The agent picks the tool. Reads and verifies work right away.
- 3Let it write. On Cardano the agent builds and a wallet signs. On Midnight the agent builds and proves locally and a sponsor pays the fee.
claude codeURL=https://api.preprod.odatano.dev
claude mcp add odatano \
--env ODATANO_ACCESS_KEY=oda_… \
--env ODATANO_ACCESS_URL=$URL \
-- npx -y @odatano/core-mcp
claude mcp add nightgate \
--env ODATANO_ACCESS_KEY=oda_… \
--env ODATANO_ACCESS_URL=$URL \
--env NIGHTGATE_NETWORK=preprod \
-- npx -y @odatano/nightgate-mcp
# then ask, for example
"What is in transaction <hash>?"
→ get_transaction
"Which UTxOs does <address> hold?"
→ get_utxos
"Is <hash> attested in vault <address>?"
→ verify_attestation
"How busy was Midnight this week?"
→ analytics_key_figures
Cardano writes
- Build
build_ada_transfer,build_mint_transactionorbuild_plutus_spendreturn an unsigned transaction - Sign
create_signing_requesthands it to a person or a CIP-30 wallet. The agent never holds a payment key. - Submit
verify_signaturechecks the signed transaction,submit_signed_transactionsends it,get_submission_statusfollows it
flowbuild_ada_transfer → unsigned tx, build id
create_signing_request → request for the signer
a person signs in a wallet
verify_signature → verified
submit_signed_transaction → transaction hash
get_submission_status → confirmed
Midnight writes
- Seedthe first write creates one in
~/.nightgate-mcp/seed. It is the agent's identity on Midnight: keep the file.NIGHTGATE_SEED_HEXsets your own, 128 hex characters. - Vaultwithout a vault address the tools use the shared sandbox vault
…, open to every key on this network - Flow
anchor_documentbuilds and proves the call, hands it to the sponsor and waits until it landed, about a minute.verify_attestationchecks it, free. - Detailswhat the steps do and what fails: Midnight quickstart
flowanchor_document(sha256) → status, attesterId, txHash
built, proven and sponsored in one call
verify_attestation → verified: true
Next
- Toolsevery tool of both servers: AI agents on the start page
- Docsodatano.dev/docs/mcp: configuration, own instances, versions
- ExampleAGENT_MS, an agent that anchors its reports and predictions on Midnight