- Keyan
oda_…key: free with a wallet sign-in (300 calls), or bought with tADA. Both servers read it fromODATANO_ACCESS_KEY. - Node20 or newer.
npxfetches the servers, nothing else to install for reading. - Network
ODATANO_ACCESS_URLpicks the host. This one serves preprod. - Costa tool call costs the API calls it makes, mostly one. The agent holds no ADA and no NIGHT for reading.
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"
}
}
} }
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 person signs. On Midnight the agent builds and proves locally and a sponsor pays, see below.
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 \
-- 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
- Installthe server builds and proves locally, so it needs
@odatano/nightgate-txnext to it. Install both into one folder and start the server from there. - Seed
NIGHTGATE_SEED_HEX, 128 hex characters. It is the agent's attester identity, never a tool argument and never sent. - Vaultthe shared sandbox vault
…takes anchors from every key on this network - Flow
build_sponsorable_transactionproves the call,sponsor_unbound_transactionhands it to the sponsor,get_job_statuswaits until it lands,verify_attestationchecks it - Detailswhat the steps do and what fails: Midnight quickstart
shellmkdir nightgate-agent && cd nightgate-agent
npm i @odatano/nightgate-mcp @odatano/nightgate-tx \
@midnight-ntwrk/compact-runtime
.mcp.json"nightgate": {
"command": "node",
"args": ["/path/to/nightgate-agent/node_modules/
@odatano/nightgate-mcp/dist/index.js"],
"env": {
"ODATANO_ACCESS_KEY": "oda_…",
"ODATANO_ACCESS_URL": "https://api.preprod.odatano.dev",
"NIGHTGATE_NETWORK": "preprod",
"NIGHTGATE_SEED_HEX": "<128 hex>"
}
}
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