mcpField
M
mcp-midaz

mcp-midaz

Local
github.com/codesparFinance275Updated 4w ago

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

  1. 01Account creation and paginated listing
  2. 02Available and on-hold balances per asset
  3. 03Balanced double-entry transaction posting
  4. 04Transaction lookup with operations
  5. 05Operations across multiple ledgers per connection

Use cases

  1. 01Creating accounts and reading balances in a self-hosted Midaz
  2. 02Moving funds between accounts and checking the result
  3. 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.

mcp.json · Universal config
{
"mcpServers": {
"codespar-mcp-midaz": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-midaz"
],
"env": {
"MIDAZ_BASE_URL": "<MIDAZ_BASE_URL>",
"MIDAZ_TRANSACTION_URL": "<MIDAZ_TRANSACTION_URL>",
"MIDAZ_API_KEY": "<MIDAZ_API_KEY>"
}
}
}
}
Run commandnpx -y @codespar/mcp-midaz
Environment variables to set
MIDAZ_BASE_URLBase URL of your self-hosted Midaz onboarding service
MIDAZ_TRANSACTION_URLBase URL of the Midaz transaction service. Defaults to MIDAZ_BASE_URL.
MIDAZ_API_KEYSecretBearer token when your deployment enforces auth

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@codespar/mcp-midaz0.1.0

Tools

5

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
namestringYesAccount display name
typestringYesAccount type (e.g. deposit, savings, creditCard, expense)
aliasstringNoOptional unique alias (used as @alias in transaction operations)
extraobjectNoAny additional Midaz account fields, merged into the payload
ledger_idstringYesLedger id inside the organization
asset_codestringYesAsset the account holds (e.g. BRL, USD)
organization_idstringYesMidaz 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.

npm License: MIT

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 to MIDAZ_BASE_URL when 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)

ToolWhat it does
create_accountCreate an account in a ledger (POST .../accounts)
list_accountsList a ledger's accounts, paginated
get_balanceRead available / on-hold balances per asset
create_transactionPost a balanced double-entry transaction (POST .../transactions/json)
get_transactionFetch 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

Markdown supported

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.