mcp-midaz

v0.1.0
io.github.codespar/mcp-midaz Checked 10 hours ago Published 5 months ago

MCP server for Midaz by Lerian — self-hosted double-entry ledger: accounts, balances, transactions

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

create_account

Create an account in a ledger (POST /v1/organizations/{org}/ledgers/{ledger}/accounts). Accounts hold balances per asset code (e.g. BRL, USD, USDC).

ParameterTypeDescription
asset_code *stringAsset the account holds (e.g. BRL, USD)
ledger_id *stringLedger id inside the organization
name *stringAccount display name
organization_id *stringMidaz organization id
type *stringAccount type (e.g. deposit, savings, creditCard, expense)
aliasstringOptional unique alias (used as @alias in transaction operations)
extraobjectAny additional Midaz account fields, merged into the payload

list_accounts

List a ledger's accounts (GET /v1/organizations/{org}/ledgers/{ledger}/accounts). Paginated via limit/page.

ParameterTypeDescription
ledger_id *stringLedger id
organization_id *stringMidaz organization id
limitnumberPage size
pagenumberPage number (1-based)

get_balance

Read an account's balances (GET /v1/organizations/{org}/ledgers/{ledger}/accounts/{account}/balances). Returns available and on-hold amounts per asset.

ParameterTypeDescription
account_id *stringAccount id
ledger_id *stringLedger id
organization_id *stringMidaz organization id

create_transaction

Post a balanced double-entry transaction (POST /v1/organizations/{org}/ledgers/{ledger}/transactions/json). The send block debits source accounts and credits distribute targets; amounts must balance. Accounts are referenced by id or @alias.

ParameterTypeDescription
ledger_id *stringLedger id
organization_id *stringMidaz organization id
send *objectMidaz send shape: { asset, value, scale, source: { from: [{ account, amount: { asset, value, scale } }] }, distribute: { to: [{ account, amount: {...} }] } }
descriptionstringHuman-readable transaction description
metadataobjectOptional key-value metadata stored on the transaction

get_transaction

Fetch a transaction with its operations (GET /v1/organizations/{org}/ledgers/{ledger}/transactions/{id}).

ParameterTypeDescription
ledger_id *stringLedger id
organization_id *stringMidaz organization id
transaction_id *stringTransaction id