@odatano/nightgate-mcp
MCP server exposing NIGHTGATE, the Midnight blockchain attestation layer, as agent tools — the companion to the CAP indexer plugin of the same name.
Facts
Where it sits
Who is behind it
In the atlas: maintains 4@ODATANOmaintainerMaxContributes to this
In the atlas: contributes to 4@maxalexweber11 contributor
Before choosing this
Conditions
PolicySAP API Policy 4.2026a§ 1.1, 1.2, 2.2.2from Serve your application over MCPAn MCP server exposes an SAP API, or uses SAP APIs to supply tools, resources or data to an agent.
- § 1.1 Published APIs. Published APIs are made available for the documented purposes identified by SAP, including integration, extensions and data exchange.
- § 1.2 Non-Published APIs. Customer and third-party applications must not access non-published APIs except where documentation permits it or SAP otherwise authorizes it.
- § 2.2.2 AI call sequences and data extraction. Outside SAP-endorsed architectures, data services or expressly identified pathways, the policy prohibits specified agentic API use and systematic or large-scale extraction.
MCP does not replace the API's documented-use boundary. Check that every endpoint is published for the intended use and whether the policy's AI-call or extraction provisions apply to the design.
SAP API Policy 4.2026a →LicenceSAP Developer License Agreement 3.2 CAP§ 1, 3from Serve your application over MCPA covered CAP plugin or application exposes SAP product data or covered customer-application functionality through MCP.
- § 1 License. Productive customer applications are limited to SAP BTP or another SAP-licensed platform, and mass extraction to a non-SAP product is restricted except where solely required for SAP interoperability.
- § 3 Artificial Intelligence Training. The agreement prohibits use of the covered materials and customer applications for training artificial-intelligence models or systems.
The CAP developer agreement can apply alongside the API Policy. Ordinary agent inference is not automatically AI training; section 3 becomes relevant when covered materials or applications are used to train, develop or refine a model or system.
SAP Developer License Agreement 3.2 CAP →What it declares
Every artifact
- Type
- MCP server
- Origin
- Independently maintained
- Runtime
- Node.js
For serve your application over MCP
- Exposure source
- Domain-specific backend
- Exposed operations
- Document anchoring, ZK claims, disclosure grants and live-state verification; the local-sponsored path requires builder and seed configuration
- Execution path
- Remote backend callsLocal transaction building
Connections
Exposing application data and operations to agents over MCP
CAP plugin indexing the Midnight blockchain, exposed as OData V4
Download
Install
npm add @odatano/nightgate-mcpDerived from the package name. No recipe recorded; the README has the configuration.
Architecture
Download
README
quoted from ODATANO/NIGHTGATE-MCP under Apache-2.0, read
@odatano/nightgate-mcp
MCP server for NIGHTGATE on Midnight. Anchors documents, proves zero-knowledge claims over hidden fields, grants and verifies disclosure against live contract state; swaps shielded tokens over an offer board and mints them on a token factory. Transactions are sponsored, the agent holds no NIGHT. The chain is read through the ODATANO API: no indexer, no node.
Quick start
Get an oda_… key at api.odatano.dev (Cardano
wallet sign-in, a redeem code, or tADA over x402), then:
{
"mcpServers": {
"nightgate": {
"command": "npx",
"args": ["-y", "@odatano/nightgate-mcp"],
"env": { "ODATANO_ACCESS_KEY": "oda_..." }
}
}
}
Claude Code: claude mcp add nightgate --env ODATANO_ACCESS_KEY=oda_... -- npx -y @odatano/nightgate-mcp
The hosted gateway is the default (Midnight preprod). The same key works for
@odatano/core-mcp (Cardano). Node.js >= 20.
Tools
docs/tools.md lists every tool and the two flows: fee
sponsoring (build and prove here, a sponsor pays) and shielded swaps (two
halves, one sponsor). Errors carry the server's HTTP status and code.
Configuration
docs/configuration.md: every variable, an own NIGHTGATE instance, version requirements. Needs NIGHTGATE >= 0.36.0, which the hosted gateway runs.
Development
npm install && npm run integration
Live lanes:
NIGHTGATE_LIVE=1 NIGHTGATE_TEST_CONTRACT=<vault> NIGHTGATE_TEST_PAYLOAD_HASH=<64 hex> npm run integration
NIGHTGATE_SEED_HEX=<hex> NIGHTGATE_VAULT=<vault> npm run live:sponsor-unbound
License
Apache-2.0
History
Changed 1
Notes
Needs NIGHTGATE 0.36.0 and @odatano/nightgate-tx 0.14.0.
Changed
- The proof tools send typed parameters.
siblings,dirs,setSiblings,setDirs,allowedValues,claims,schema,openingA,openingB,documentandproofFieldsgo to NIGHTGATE as arrays and objects; the*Jsonstring parameters of NIGHTGATE 0.35 and below are not sent anymore.post_swap_offersendstagsas an array. Tool inputs are unchanged.
Changed 1
Notes
Needs NIGHTGATE 0.35.0 and
@odatano/nightgate-tx0.14.0; analytics under/odata/v4/analytics(the gateway serves both names).Changed
- The analytics URL defaults to
<ODATANO_ACCESS_URL>/odata/v4/analyticsinstead of…/odata/v4/astra. An ASTRA instance that still serves/odata/v4/astraneedsODATANO_ANALYTICS_URLset to that path.
- The analytics URL defaults to
Changed 1
Notes
Needs NIGHTGATE 0.35.0 and
@odatano/nightgate-tx0.14.0 (the gateway serves both spellings).Changed
- The tools call NIGHTGATE under
/odata/v4/midnightand/odata/v4/midnight-indexer. Against a server below 0.35.0 setNIGHTGATE_SERVICE_PATH=/api/v1/nightgateandNIGHTGATE_INDEXER_SERVICE_PATH=/api/v1/indexer.
- The tools call NIGHTGATE under
Features 1, Changed 1
Notes
Needs NIGHTGATE 0.34.0 and
@odatano/nightgate-tx0.12.2.Added
get_grant_usage: the key's jobs and its limits, the hour and day budgets and the rate classes with what is left.
Changed
- A 429 from NIGHTGATE carries
retryAfterSecondsfromRetry-After, as a gateway 429 did already.
Changed 4
Notes
Needs NIGHTGATE 0.33.0 and
@odatano/nightgate-tx0.12.2.Changed
build_sponsorable_transactionand the localmint_tokenread contract state through the NIGHTGATE API (createTxBuilder({ api })); they dial no indexer and no node.NIGHTGATE_INDEXER_HTTP_URLandNIGHTGATE_INDEXER_WS_URLswitch them back to a Midnight indexer.- The swap wallet syncs from
NIGHTGATE_INDEXER_HTTP_URLandNIGHTGATE_INDEXER_WS_URLonly; without them the swap tools refuse with the two names instead of dialing the public indexer. build_sponsorable_transactionreturnstxId(sha256 of the bytes),charactersandbytesinstead of the base64; the bytes stay in the server process for one hour,outFilewrites them to a path.sponsor_unbound_transactionandsponsor_finalized_transactiontaketxIdorfile(base64 text or raw bytes); the base64 argument remains for callers without either. The result carriessentwith characters, bytes andtxId.
Changed 3
Notes
Needs NIGHTGATE 0.32.0.
Changed
sponsor_finalized_transaction,sponsor_unbound_transaction,sponsor_swapandmint_tokentake nosponsorSessionId: the server's sponsor pool pays, or the wallet session the agent grant is pinned to.take_swap_offer:submit: truehands both halves to the sponsor at once; it replaces the sponsor session id as the trigger.- The platform pool id is gone from every tool description.
Fixes 2
Notes
Fixed
- A maker half posted with
post_swap_offeris tied to itsofferId;get_swap_walletlists it withofferIdandboardStatusand drops it once the offer isfilled(read throughget_swap_wallet,get_swap_offer,list_swap_offers,my_swap_offers). An expired or retired offer keeps its half forrevert_swap_offer. - Board rows carry
tagsas the server sends them: an array from NIGHTGATE 0.30.3 on.
- A maker half posted with
Features 4, Changed 4
Notes
Added
- Offer board (NIGHTGATE 0.30.0):
post_swap_offer(offer, expiresAt?, tags?),list_swap_offers(givesType?, wantsType?, tag?, limit?),retire_swap_offer(offerId).sponsor_swapandtake_swap_offertake anofferIdfrom the board in place of the maker half:take_swap_offerreads the entry first and refuses before proving when it is closed or carries another offer;sponsor_swappairsofferIdwithtakerHalfor thehalfIdof a taken offer. - Board reads (NIGHTGATE 0.30.1):
list_swap_offers(status?, since?)reads closed offers and the change feed,my_swap_offers(status?, since?, limit?)the caller's own posts,get_swap_offer(offerId)one offer open or closed,get_board_status()the board's counts and sponsor readiness without credentials (indexer service,NIGHTGATE_INDEXER_SERVICE_PATH, default/api/v1/indexer). mint_token(contractAddress, name, amount, recipientCoinPublicKey?, recipientEncryptionPublicKey?, sponsorSessionId?, sessionId?, idempotencyKey?): a token of your own name on a token factory. WithoutsessionIdthe seed is the issuer, the mint is built, proven and signed here (@odatano/nightgate-tx0.10.2 on@odatano/contract-token-factory) andsponsorUnboundTransactionpays; withsessionIdthe server session mints (mintFactoryToken, NIGHTGATE 0.30.1). The recipient defaults to this wallet; another wallet takes both of its keys. The type is in the response.- Disclosure to token holders:
grant_disclosure_to_holders(payloadHash, tokenType, registryAddress, content?, contentType?, expiresAt?),revoke_holder_disclosure(holderGrantId),claim_disclosure(payloadHash, tokenType, claimSecret),holder_claim_key(claimSecret?).
Changed
- Peer dependency
@odatano/nightgate-tx>=0.10.2(holderClaimKey,tokenFactoryIssuerSecret); local building and swaps still run on 0.8.0. A missing or older install is reported per tool with the version it needs. Optional peer@odatano/contract-token-factoryfor local minting. mint_tokenderives the default recipient from the seed without starting the local builder.- Amounts given as JS numbers must be safe integers; pass a decimal string for anything larger.
- Function calls pass an unused declared parameter as
null.
- Offer board (NIGHTGATE 0.30.0):
Features 4, Changed 5
Notes
Added
- Shielded swap tools (NIGHTGATE 0.29.0,
@odatano/nightgate-tx0.8.0):get_swap_wallet: address, public keys, per token type balance, free coins andspendable; halves built here that have not landed.read_swap_offer:gives,wants,inputs,outputs,boundof an offer file or base64 half, read from the transaction.build_swap_offer(give, want, bind?): one proven half, as offer file (swapoffer1...).take_swap_offer(offer, expect?, sponsorSessionId?, idempotencyKey?): the mirror half; with a sponsor session it submits both halves. A refusal carrieshalfId.sponsor_swap(makerHalf, takerHalf | halfId, sponsorSessionId, idempotencyKey?).revert_swap_offer(id): releases the coins of a half built here.
NIGHTGATE_SWAP_STATE_FILE,NIGHTGATE_SWAP_MAX_INPUTS.get_attester_identityreturnsshieldedAddress,coinPublicKey,encryptionPublicKey.npm run integrationcovers the swap tools (scripts/integration-swap.mjs).
Changed
- Peer dependency
@odatano/nightgate-tx>=0.8.0(was>=0.6.0). - Lockfile: one
@midnight-ntwrk/ledger-v8(8.1.0) in the tree. Two copies made the local builder fail withexpected instance of DustParameters. live:sponsor-unboundverifies with the attester id.NIGHTGATE_SEED_HEXis 128 hex (a 64-byte BIP39 seed); 64 hex is refused at startup.get_job_statusdescribes theswapresult of a swap job.
- Shielded swap tools (NIGHTGATE 0.29.0,
Changed 2
Notes
Changed
get_job_statusdescribeschainSegments(NIGHTGATE 0.28.0): for a confirmed batch, which calls applied. Tool errors carry the server's stringcode(INVALID_ARGUMENT, ...).- README reorganized; compatibility names the current version only.
Features 1, Changed 1
Notes
Added
- Analytics tools over ODATANO ASTRA (
analytics_overview,analytics_key_figures,analytics_daily,analytics_top_block_producers,analytics_metrics,analytics_metric,analytics_series,analytics_compare,analytics_anomalies), registered when the host serves ASTRA atODATANO_ANALYTICS_URL(default: the gateway's/odata/v4/astra). Same key, one unit per read, chain pinned to Midnight;analytics_compareputs Cardano next to it.
Changed
- Default gateway host is
https://api.preprod.odatano.dev(one host per network;api.odatano.devnow only redirects there with a 307). Node drops theAuthorizationheader on a cross-host redirect, so the old default would answer 401 for every call: setODATANO_ACCESS_URLexplicitly on older versions, or upgrade. The missing-key warning fires for anyapi.<network>.odatano.devhost.
- Analytics tools over ODATANO ASTRA (
Breaking 3
Notes
Changed (breaking)
- One connection env for both ODATANO MCP servers.
ODATANO_ACCESS_URL(defaulthttps://api.odatano.dev, the gateway),ODATANO_ACCESS_KEY(theoda_…key, or anngat_…grant / other bearer against a direct instance) andODATANO_ACCESS_USER/ODATANO_ACCESS_PASSWORD(basic auth for a direct instance) replaceNIGHTGATE_BASE_URL,NIGHTGATE_TOKEN,NIGHTGATE_USERNAMEandNIGHTGATE_PASSWORD; the old names are not read any more.@odatano/core-mcp0.3.0 reads the same four, so an.mcp.jsonneeds one key for both chains and no URL. The otherNIGHTGATE_*variables (network, seed, indexer, zk-config, proof server, timeout, service path) are unchanged. - Gateway error bodies reach the agent. The ODATANO ACCESS gateway
answers with
{ error: "<text>", ...detail }; the client now keeps the text as the message and hands the detail (unitsLeft,price, thetopuphint,products,validUntil,retryAfterSecondsfromRetry-After) through to the tool error, so a 402 says how to top up instead of "request failed with HTTP 402". - The hosted API is the documented default. README: quick start with a key from api.odatano.dev first, sponsoring through the gateway's platform pool, own instance second; the server warns at startup when the gateway is the target and no key is set. Server version constant follows the package.
- One connection env for both ODATANO MCP servers.
Changed 2
Notes
Changed
- The ODATANO ACCESS key (
oda_…) is the documented credential.api.nightgate.devis the ODATANO ACCESS gateway since 2026-09-18: it meters the key in units, swaps in the NIGHTGATE agent grant underneath and fronts ODATANO with the same key. SetNIGHTGATE_BASE_URL=https://api.nightgate.devandNIGHTGATE_TOKEN=oda_…; the key goes as a plainAuthorization: Bearer. Get one atPOST https://api.odatano.dev/keys(x402), from a giveaway code, or by signing in at the console. A rawngat_…agent grant (x-agent-token) still works against a direct NIGHTGATE instance. No code change: the client already sent a prefix-less token as a bearer. .env.exampleand README updated accordingly; this changelog added and shipped with the package.
- The ODATANO ACCESS key (
Breaking 3
Notes
Changed (breaking)
- Vault lineage 4: every record is keyed by attester AND payload
(NIGHTGATE >= 0.24.0).
verify_attestationtakesattesterId+payloadHash(or a bounddocumentId),verify_predicatetakesattesterId, theprove_*tools accept an optionalattesterId(the record the claim is proven against),anchor_documentis one plain attest and returnsattesterId. prepare_anchor_commitmentandcommit_document_anchorare gone: nothing is left to guard, no identity can take over another attester's record.- Local building needs
@odatano/nightgate-tx>= 0.6.0; the proof calls takerecordKeyorpayloadHash(+attesterId). Against a 0.23.x server the verify calls fail with 400 (unknown parameter).
- Vault lineage 4: every record is keyed by attester AND payload
(NIGHTGATE >= 0.24.0).
Features 2
Notes
Added
- 32-slot vault. Schema and opening take 16 or 32 entries,
allowedMaskup to 32 bits,kup to 32; the vacuity guard is checked against the schema instead of a fixed all-ones constant. Target it withcompiledArtifactRef: 'attestation-vault-32'(NIGHTGATE >= 0.19.0 for width 32). A 16-slot setup keeps working against any 0.18.x server. - Local ZK claims: field and document proofs can be built in-process.
- 32-slot vault. Schema and opening take 16 or 32 entries,
Features 2
Notes
Added
- Parallel sponsoring channel:
sponsor_unbound_transactionwith the platform pool id (NIGHTGATE >= 0.18.0; 404 against older servers). - Local transaction building for agents:
build_sponsorable_transactionandget_attester_identityvia the optional@odatano/nightgate-tx= 0.2.0 txbuilder, driven by
NIGHTGATE_SEED_HEX(never a tool argument).
- Parallel sponsoring channel:
Features 1
Notes
Added
- Cross-root document proofs and guarded anchoring (
prepare_anchor_commitment/commit_document_anchor, removed again in 0.6.0).
- Cross-root document proofs and guarded anchoring (
Features 1
Notes
Added
- Membership and equality proof tools; README documents the tool set and the server compatibility table.
Features 1
Notes
Added
- Initial MCP server: attestation, verification and job tools over the
NIGHTGATE OData API, agent-grant (
ngat_…) or basic auth.
- Initial MCP server: attestation, verification and job tools over the
NIGHTGATE OData API, agent-grant (
Others providing
Compare all 9 on the Serve your application over MCP page →- API ManagementAPI ManagementAPI proxies in front of backend services, with security and traffic management policies attached to them, and Developer Hub where consumers subscribe.sap official, btpAPI proxies with security and traffic policies and Developer Hub
- com.sap.cds:cds-adapter-mcpcom.sap.cds:cds-adapter-mcpThe MCP protocol adapter for CAP Java, serving an @mcp-annotated Application Service as an MCP server with three generated tools, describe, query and call, and data changes only through unbound actions.sap official, capMCP adapter turning a CAP Java service into an MCP server
- @cap-js/mcp@cap-js/mcpA CAP plugin that serves an @mcp-annotated service over MCP with three generated tools, describe, query and call_action, and writes its endpoint into the local agent's configuration in development.sap official, capExposes CAP services as MCP servers for AI agents
- @gavdi/cap-mcp@gavdi/cap-mcpGenerates an MCP server from the CDS model — annotated entities become resources and annotated actions become tools, so an agent reaches the service without a second server being written.independent, capGenerates an MCP server from annotated CDS entities and actions
- @neoimpulse/cap-js-mcp@neoimpulse/cap-js-mcpAn MCP server inside a CAP application, with default tools that read the running model and query entities, plus configurable application tools, prompts and resources.independent, capMCP server inside a CAP application with model and query tools
- @odatano/core-mcp@odatano/core-mcpMCP server exposing ODATANO — the Cardano-to-OData bridge built on CAP — to an agent, so the chain is reachable as tools rather than as a REST client.independent, capMCP server exposing the ODATANO Cardano-to-OData bridge as tools
- @shahid.la/cds-db-nlquery-mcp@shahid.la/cds-db-nlquery-mcpMCP server that answers plain-English questions against the entities in db/schema.cds — it discovers the schema, generates CQN-backed SQL with real joins, and returns rows.independent, capMCP server answering plain-English questions against a CDS schema
- cap-mcp-plugincap-mcp-pluginGenerates an MCP server from a CDS model: annotated entities become MCP resources, functions and actions become tools, and services can expose reusable prompt templates. A fork of @gavdi/cap-mcp that adds an OAuth proxy, IAS client registration and draft-lifecycle tools.independent, capMCP server generated from a CDS model, forked from @gavdi/cap-mcp
Details
Sources
Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.
Compatibility and provenance
Contributors
History in the atlas
- [{"key":"mcp_exposure_source","value":"NIGHTGATE Midnight attestation backend via hosted gateway or direct host"},{"key":"mcp_operations","value":"Document anchoring, ZK claims, disclosure grants and live-state verification; the local-sponsored path requires builder and seed configuration"},{"key":"mcp_execution_path","value":"NIGHTGATE gateway/direct-host calls; sponsored writes build/prove locally and submit through a sponsor"}]
- Domain-specific backend
- Remote backend calls; Local transaction building
- First seen.
For your agent
- Ref
artifact:odatano-nightgate-mcp- JSON
- /artifacts/odatano-nightgate-mcp.json
- MCP
- Connecting an agent