About mcp-midaz
An MCP server for Midaz, an open-source multi-currency, multi-asset double-entry ledger by Lerian. It is aimed at teams that run their own ledger and want an agent to manage accounts, balances and transactions in that deployment.
Key features
- 01Account creation and paginated listing
- 02Available and on-hold balances per asset
- 03Balanced double-entry transaction posting
- 04Transaction lookup with operations
- 05Operations across multiple ledgers per connection
Use cases
- 01Creating accounts and reading balances in a self-hosted Midaz
- 02Moving funds between accounts and checking the result
- 03Recording internal fund transfers with agent assistance
MCP support
This MCP server exposes 5 tools to MCP clients for creating accounts, reading balances and posting transactions on the user's own Midaz deployment.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
npx -y @codespar/mcp-midazMIDAZ_BASE_URLBase URL of your self-hosted Midaz onboarding serviceMIDAZ_TRANSACTION_URLBase URL of the Midaz transaction service. Defaults to MIDAZ_BASE_URL.MIDAZ_API_KEYSecretBearer token when your deployment enforces authLocal servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.
Tools
5Saved tool list · updated 2w ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Account display name |
| type | string | Yes | Account type (e.g. deposit, savings, creditCard, expense) |
| alias | string | No | Optional unique alias (used as @alias in transaction operations) |
| extra | object | No | Any additional Midaz account fields, merged into the payload |
| ledger_id | string | Yes | Ledger id inside the organization |
| asset_code | string | Yes | Asset the account holds (e.g. BRL, USD) |
| organization_id | string | Yes | Midaz organization id |
Details
From the project README@codespar/mcp-midaz
MCP server for Midaz by Lerian — the open-source, multi-currency, multi-asset double-entry ledger. Your agent creates accounts, reads balances, and posts balanced transactions against your own Midaz deployment.
Self-hosted model
Midaz is not a SaaS — it runs in your infrastructure (github.com/LerianStudio/midaz). This server points at your deployment:
MIDAZ_BASE_URL→ your onboarding service (organizations / ledgers / accounts)MIDAZ_TRANSACTION_URL→ your transaction service (defaults toMIDAZ_BASE_URLwhen both sit behind one gateway)MIDAZ_API_KEY→ only if your deployment enforces auth
Midaz hierarchy: Organization → Ledger → Account → Transaction. Tools take organization_id + ledger_id explicitly, so one connection can operate across ledgers.
Quick Start
Claude Desktop
Add to ~/.config/claude/claude_desktop_config.json:
{
"mcpServers": {
"midaz": {
"command": "npx",
"args": ["-y", "@codespar/mcp-midaz"],
"env": {
"MIDAZ_BASE_URL": "https://midaz.your-company.internal",
"MIDAZ_API_KEY": "your-token-if-any"
}
}
}
}
Claude Code
claude mcp add midaz -- npx @codespar/mcp-midaz
Tools (5)
| Tool | What it does |
|---|---|
create_account | Create an account in a ledger (POST .../accounts) |
list_accounts | List a ledger's accounts, paginated |
get_balance | Read available / on-hold balances per asset |
create_transaction | Post a balanced double-entry transaction (POST .../transactions/json) |
get_transaction | Fetch a transaction with its operations |
Example
"Move R$ 1.250,00 from the treasury account to @vendor-acme and show both balances."
The agent calls create_transaction with a send block debiting treasury and crediting @vendor-acme (amounts must balance — Midaz rejects lopsided entries), then get_balance on each account.
Authentication
Your deployment decides: when MIDAZ_API_KEY is set it is sent as a Bearer token; otherwise requests are unauthenticated (typical for network-isolated internal deployments).
Enterprise
Need governance, budget limits, and audit trails for agent-driven ledger operations on Midaz? CodeSpar Enterprise adds a policy engine, payment routing, and compliance templates on top of these MCP servers.
License
MIT (this server). Midaz itself is Apache-2.0 by Lerian.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.