Midaz

Finance and commerce

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

Your AI app calls the Midaz MCP server, which does the finance and commerce work and sends the result back to the chat.

About Midaz

Midaz is a community MCP server from codespar, filed in our directory under finance and commerce. MCP server for Midaz by Lerian, self-hosted double-entry ledger: accounts, balances, transactions.

Midaz runs on your own machine: your AI app starts it with the command npx -y @codespar/mcp-midaz@0.1.0 and talks to it over standard input and output. It needs MIDAZ_BASE_URL set before Midaz starts.

Midaz is listed in the official MCP registry as io.github.codespar/mcp-midaz, version 0.1.0.

At a glance

Publisher
codespar (community)
Runs
Locally on your machine
Install from
Node.js package on npm: @codespar/mcp-midaz
Written in
TypeScript
License
MIT
GitHub stars
278
Official MCP registry
io.github.codespar/mcp-midaz

How to set up Midaz

  1. Install Node.js on the machine that runs your AI app, because Midaz starts with npx and downloads its package on first run.
  2. Create MIDAZ_BASE_URL for Midaz in the connected service's own settings, scoped to the smallest permissions the job needs.
  3. Add Midaz to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Midaz tools to confirm the connection.
  5. Run one read-only task with Midaz first, and keep your app asking before each tool call until the results look right.

Midaz compared with similar servers

  • Moonpay by codespar has fewer GitHub stars than Midaz (278 against 278); both are community servers, and both run locally.
  • Mercado Pago by codespar has fewer GitHub stars than Midaz (278 against 278); both are community servers, and both run locally.
  • Nequi by codespar has fewer GitHub stars than Midaz (278 against 278); both are community servers, and both run locally.

Before you connect Midaz

  • Give Midaz its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Midaz tool call until you trust what it does with them.
  • Treat text that Midaz fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Midaz on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Midaz

How marketing and sales teams put Midaz to work, by company size. Pick the size closest to yours and start Midaz on one use case.

Small business

  • A small business can ask Midaz which products and customers drive margin, then plan promotions around them.
  • Owners can use Midaz to check refunds, failed payments and churn reasons without opening three dashboards.
  • Midaz runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Ecommerce teams can connect Midaz to tie campaigns to orders and revenue, not just clicks.
  • Marketing and finance can use Midaz to check spend against budget each week and move money to what's working.
  • Start Midaz on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises should keep Midaz read-only for agents, with any money movement handled by people and existing approvals.
  • Large commerce teams can use Midaz to answer revenue questions by channel and region with figures finance signs off on.
  • Midaz is a community server, so have security review the code and pin a version before Midaz touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Midaz README

From codespar/mcp-dev-latam on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

@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 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)

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.

Questions about Midaz

What is the Midaz MCP server?

MCP server for Midaz by Lerian, self-hosted double-entry ledger: accounts, balances, transactions. Midaz is maintained by codespar on GitHub at codespar/mcp-dev-latam, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Midaz MCP server?

Add Midaz to your AI app's MCP config with the command npx -y @codespar/mcp-midaz@0.1.0. In Claude Code, run claude mcp add --transport stdio codespar-midaz -- npx -y @codespar/mcp-midaz@0.1.0. To run Midaz this way you need Node.js installed.

Does Midaz need an API key?

Yes. Midaz expects MIDAZ_BASE_URL to be set. Create the key for Midaz in the connected service's own settings, give it the smallest permissions the job needs, and keep it out of shared config files.

Is Midaz an official MCP server?

No. Midaz is a community server maintained by codespar. Community servers can be excellent; read the code and the open issues before you give Midaz access to company data.

What license is Midaz under?

Midaz is released under the MIT license, according to its GitHub repository. The license covers the code of Midaz; the service it connects to has its own terms.