NimBooks

v1.3.1
io.github.subimpact/nimbooks-mcp Checked 1 day ago Published 23 days ago

Read-only Nimiq books: balances, history, statements, staking, payment and stake links.

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

get_summary Account summary

Balance and money in/out for a Nimiq address over a window. Read-only: never signs, never sends. Defaults to the full history the public index returns (up to 1000 transactions, newest first). Balance is the live account balance now, not the balance at the end of the window; any staked NIM is reported separately because it lives in the staking contract. Money out includes transfers into the staking contract and out of it — the same treatment as the app’s statement; validator rewards arrive through a separate channel and are reported as their own line (rewardsReceivedNim). Nimiq Pay’s roun…

ParameterTypeDescription
addressstringNimiq address — "NQ82 6GYU …", the flat form, or 40 hex characters. Optional; defaults to the server’s configured address.
sincestringStart of the window, YYYY-MM-DD or ISO 8601 (UTC). Default: no start.
untilstringEnd of the window, YYYY-MM-DD or ISO 8601 (UTC). Default: now.

list_transactions List transactions

Classified transactions for a Nimiq address, newest first. Read-only: never signs, never sends. Each row carries the kind the NimBooks app shows (payment, stake, unstake, reward, swap, vesting), the counterparty, and the memo — a cashlink’s protocol tag reads as "Cashlink" rather than raw bytes, and a `nimbooks:invoice:<id>` memo is the reference that ties a payment to a request.

ParameterTypeDescription
addressstringNimiq address (NQ form, spaced or flat, or 40 hex characters). Optional; defaults to the server’s configured address.
limitintegerRows to return. Default 50.
sincestringOnly transactions at or after this date (YYYY-MM-DD or ISO 8601, UTC).
untilstringOnly transactions at or before this date (YYYY-MM-DD or ISO 8601, UTC).

get_statement Daily statement

Day-by-day money in and out for a year (or one month of it), priced at the CoinGecko daily close in USD for each UTC day — the same basis the NimBooks tax statement uses. Read-only: never signs, never sends. Failed transactions are excluded and fees are counted on outgoing transactions only. Staking rewards (restaking payouts) are included as in-day income; moving NIM into or out of the staking contract is not a fiat flow, so it is excluded, exactly like the app’s statement. Nimiq Pay’s round trips through its own contracts go in internalInNim/internalOutNim, not in or out, as in the app…

ParameterTypeDescription
year *integerCalendar year, UTC — e.g. 2026.
addressstringNimiq address (NQ form, spaced or flat, or 40 hex characters). Optional; defaults to the server’s configured address.
monthintegerOptional month 1–12. Omit for the whole year.

create_payment_request Draft a payment request

DRAFTS a payment request and returns a shareable link. This never signs anything, never sends anything, and never marks anything paid — the whole request rides inside the link, and only the payer’s wallet, with their approval, can actually move money. The link opens in the NimBooks app; the payment it produces carries the reference nimbooks:invoice:<id>, which check_request_paid looks for later. Note: inside the link, the payload field amountNim is denominated in Luna by the app’s link format; this tool’s own output reports amountNim in NIM and amountLuna in Luna.

ParameterTypeDescription
amountNim *stringAmount in NIM, as a decimal string — "12.5". Up to 5 decimals (1 NIM = 100000 Luna).
expirystringWhen the request stops being valid: "1h", "24h", "7d", "none" (default), or an ISO 8601 timestamp.
idstringFixed request id, for reproducible links. Generated when omitted.
memostringWhat the request is for, up to 80 characters. Travels in the link, not on chain.
payeestringAddress to be paid. Optional; defaults to the server’s configured address.

check_request_paid Check whether a request was paid

Looks for a payment tagged with a request’s reference (nimbooks:invoice:<id>) in the address’s transactions — the same match the NimBooks app uses to mark a request paid. Read-only: it reports what the chain says and changes nothing, here or in the app. Scans the newest 200 transactions.

ParameterTypeDescription
id *stringThe request id, as returned by create_payment_request.
addressstringThe payee address the request was made for. Optional; defaults to the server’s configured address.

list_invoices List saved payment requests

Payment requests stored in a NimBooks backup file (the app keeps them on the device; there is no server holding them). Requires the server to be started with --backup <path>. Read-only: the file is never written to, and the cashlink shelf inside it — which holds link private keys — is never opened.

ParameterTypeDescription
addressstringThe account whose requests to list. Optional; defaults to the server’s configured address.

get_staking Staked position

A Nimiq address's staking position: active staked, inactive (cooling down after an unstake), retired (ready to withdraw) and total, plus the pool it is staked to with its fee, net yield and payout type, an unstake clock (a retire only becomes valid one full epoch after deactivation), and a first-year rewards estimate at the pool's current net yield. Read-only: reads the public chain and the public validators list, never signs and never sends. Never staked reads as staked: false, never as a failed lookup; a failed lookup is an error that says so.

ParameterTypeDescription
addressstringNimiq address (NQ form, spaced or flat, or 40 hex characters). Optional; defaults to the server’s configured address.

list_validators Nimiq validator pools

The Nimiq validator pools of the current epoch, ranked neutrally, exactly as the NimBooks app ranks them: producing pools first (those with a reliability score this epoch), best net annual yield first within them, pools that publish no yield last, then the non-producing pools, and the name as the final stable tiebreak. Nothing is pinned first. Read-only: one call to the public validators list, never signs and never sends. netYieldPercent is the net annual yield on the network's total stake after the pool's fee, the Nimiq wallet's convention; it moves as emission falls and as stake moves.

ParameterTypeDescription
includeNonProducingbooleanInclude pools with no reliability score this epoch (they earn nothing right now). Default true.
limitintegerPools to return, 1 to 50. Default 50.

project_yield Project staking yield

Projects what staking an amount of NIM might earn, year by year. With an explicit rate it is a pure offline calculation. Read-only, never signs and never sends. Rate resolution, in order: an explicit annualRatePercent, then the named pool's current net yield, then the median of the producing pools. Compounding follows the pool's payout type (direct pools pay out, the rest restake) unless an explicit compound choice is given. Returns per-year rewards, cumulative rewards and balance, plus its assumptions: emission falls along the protocol supply curve, the network's total stake is held at today'…

ParameterTypeDescription
amountNim *stringAmount to stake, in NIM, as a decimal string, e.g. "1000". At most 5 decimals.
annualRatePercentnumberExplicit annual rate in percent, more than 0 and at most 100. Wins over any pool's or the typical rate, and makes the call work offline.
compoundbooleanRestake rewards as they arrive (true) or pay them out (false). Default: the pool's payout type, else true.
validatorstringA pool: its NQ address, exact name, or a unique part of the name (list_validators has them).
yearsintegerHorizon in years, 1 to 10. Default 1.

get_rewards Staking rewards

Staking rewards for an address over a window: the total (Luna and NIM), the reward days, the first and last reward date, and the breakdown per paying pool, plus an actual yield over the trailing 30 days measured against the current active stake and the current validator's estimate for comparison. Read-only, never signs and never sends. Important: only restaking (compounding) pools show up in this data; a direct-payout pool's rewards arrive as ordinary incoming transactions and are found with list_transactions instead. The public rewards data starts January 2025, so earlier asks come back empty…

ParameterTypeDescription
addressstringNimiq address (NQ form, spaced or flat, or 40 hex characters). Optional; defaults to the server’s configured address.
includeDaysbooleanInclude the per-day reward rows, newest first, at most 400. Default false.
sincestringStart of the window, YYYY-MM-DD or ISO 8601 (UTC). Default: the start of the public rewards data.
untilstringEnd of the window, YYYY-MM-DD or ISO 8601 (UTC). Default: now.

draft_stake Draft a stake link

DRAFTS a stake and returns a link only. This never signs anything and never sends anything: the link opens the NimBooks app with the stake panel pre-filled, and you check the amount and validator there and confirm in your own wallet. No validator is recommended, ranked or chosen for you, and there is no default validator. The link is the deliverable, exactly like create_payment_request: nothing is built, broadcast or queued here, and nothing is marked as staked. Notes explain what the app will do with the values, including a cap to the free balance and the 100 NIM first-stake minimum.

ParameterTypeDescription
addressstringThe staker account, used only to read the current delegation and liquid balance for notes. Optional; defaults to the server’s configured address.
amountNimstring | numberAmount in NIM, decimal, at most 5 decimals. An omitted or invalid amount is left out of the link with a note.
validatorstringA validator NQ address, or a validator name (exact, or a unique part of the name). There is no default validator.