mina-mcp-server

v0.7.3
io.github.MinaProtocol/mina-mcp-server Checked 19 hours ago Published 6 months ago

Query Mina Protocol: accounts, blocks, transactions, zkApp events/actions, archive SQL, Rosetta.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_account

Get account information by public key from the live daemon (tutorial + live modes).

ParameterTypeDescription
publicKey *stringMina public key (B62...)
tokenstringToken ID (optional, defaults to MINA)

get_block

Get a block by state hash or height. Defaults to a "lite" summary (header + transaction counts) that stays within the tool budget; use detail to pull paged transactions or the full block. In tutorial mode, queries the live daemon first and falls back to the archive DB. In live mode, a stateHash is required (use get_archive_blocks to discover one).

ParameterTypeDescription
detailstringOutput size. "lite" (default): block header + transaction counts only — always within budget. "transactions": header + a page of userCommands (see transactionLimit/Offset). "full": the complete daem…
heightnumberBlock height
stateHashstringBlock state hash
transactionLimitnumberMax userCommands to return when detail="transactions".
transactionOffsetnumberOffset into the userCommands list when detail="transactions".

get_best_chain

Get the current best chain from the live daemon. Returns per-block headers + transaction counts (always within budget) — use get_block for a specific block's transactions. detail:"full" returns complete blocks and may overflow on busy networks.

ParameterTypeDescription
detailstringOutput size. "lite" (default): block header + transaction counts only — always within budget. "transactions": header + a page of userCommands (see transactionLimit/Offset). "full": the complete daem…
maxLengthnumberMaximum number of blocks to return

get_transaction_status

Check the daemon's status for a submitted transaction (PENDING / INCLUDED / UNKNOWN). Pass the id returned by send_payment as `payment` (or a zkApp tx id as `zkappTransaction`) — exactly one. Use this to poll after a send; for an already-mined tx, prefer get_transaction / search_transactions against the archive.

ParameterTypeDescription
paymentstringPayment transaction ID
zkappTransactionstringzkApp transaction ID

get_mempool

List transactions currently pending in the daemon's mempool (not yet in a block), optionally filtered by `publicKey`. Each entry has top-level `from`/`to` (B62q… pubkeys) plus `amount`/`fee`/`nonce`/`hash`/`kind`/`memo`/`failureReason`. Empty once everything has been included — does not show mined txs.

ParameterTypeDescription
publicKeystringFilter by public key

get_sync_status

[infra] Get the sync status and daemon info. Returns the flat daemon status object directly — fields like `syncStatus`, `blockchainLength`, `stateHash`, `numAccounts`, `chainId`, `addrsAndPorts` are at the top level (not nested under `daemonStatus`). In snapshot mode returns archive DB stats instead. In tutorial and live modes returns the live daemon status.

get_genesis_constants

Get the network's genesis constants: coinbase reward, account-creation fee, slot/epoch timing, k (confirmations), and ledger depth. Use these to reason about fees, finality, and timing rather than hard-coding values.

get_network_id

Get the daemon's network identifier (e.g. 'mina:mainnet', 'mina:devnet'). Use this to confirm which network the server is actually talking to before interpreting balances or submitting transactions.

get_events

[tutorial+live] Get emitted events from a zkApp address via the Archive-Node-API. Events are state-change notifications emitted by zkApp account updates. Snapshot mode does not run an Archive-Node-API and rejects this tool.

ParameterTypeDescription
address *stringzkApp public key (B62...)
fromnumberStart block height (inclusive)
statusstringBlock status filter
tonumberEnd block height (exclusive)
tokenIdstringToken ID (defaults to MINA token)

get_actions

[tutorial+live] Get dispatched actions from a zkApp address via the Archive-Node-API. Actions are reducer inputs that modify zkApp state. Snapshot mode does not run an Archive-Node-API and rejects this tool.

ParameterTypeDescription
address *stringzkApp public key (B62...)
endActionStatestringFilter to this action state hash (inclusive)
fromnumberStart block height (inclusive)
fromActionStatestringFilter from this action state hash (inclusive)
statusstringBlock status filter
tonumberEnd block height (exclusive)
tokenIdstringToken ID

get_archive_blocks

[tutorial+live] Get finalized blocks from the Archive-Node-API (height, creator, timestamp, coinbase). Prefer this for live mode (the archive node holds canonical history) over `get_best_chain` (daemon's in-memory view including not-yet-canonical tip). Returns full block rows — use a small `limit` on busy chains.

ParameterTypeDescription
canonicalbooleanOnly return canonical (finalized) blocks
limitnumberNumber of blocks to return
sortBystringSort order

get_network_state

[tutorial+live] Get network state from the Archive-Node-API: max canonical and pending block heights. (Different from `get_sync_status` which queries the daemon, and from `describe_state` which aggregates both.)

describe_state

[infra] Snapshot of the live public network: sync, latest block, mempool size, plus suggested next-tool hints. Call this first to orient yourself.

list_examples

[infra] List curated example workflows (each is a sequence of tool calls). Filter by the current server mode by default; pass `all` to see every workflow regardless of mode.

ParameterTypeDescription
includestring'current' filters to workflows runnable in this server's mode; 'all' shows every workflow.

get_example

[infra] Get the full step list for a single named example workflow. Use list_examples first to discover names.

ParameterTypeDescription
name *stringExample name from list_examples (e.g. 'send_payment', 'verify_in_archive').

rosetta_status

Mina-Rosetta /network/status — current/genesis/oldest block identifiers and sync state for this network, in standardized Rosetta format.

rosetta_account

Mina-Rosetta /account/balance — balance(s) for a B62q… account, optionally at a specific block.

ParameterTypeDescription
address *stringMina public key (B62q…)
blockHashstringBlock state hash (optional). Pass at most one of blockIndex or blockHash.
blockIndexnumberBlock height (optional). Pass at most one of blockIndex or blockHash.

rosetta_block

Mina-Rosetta /block — a block (with operations) by index or state hash. Provide exactly one. Defaults to a "lite" summary (block identifiers + transaction/operation counts); Rosetta expands each Mina tx into several operations, so the full shape is large on busy networks — use detail:"transactions" with paging, or detail:"full" deliberately.

ParameterTypeDescription
detailstring"lite" (default): counts only. "transactions": paged transactions. "full": entire response.
hashstringBlock state hash
indexnumberBlock height
transactionLimitnumberMax transactions when detail="transactions".
transactionOffsetnumberOffset into the transactions list when detail="transactions".

rosetta_mempool

Mina-Rosetta /mempool — pending transaction identifiers on this network.

rosetta_mempool_transaction

Mina-Rosetta /mempool/transaction — a single pending transaction with operations, by hash.

ParameterTypeDescription
hash *stringTransaction hash (returned by rosetta_mempool)