LedgerHQ
Guides

MCP Server

Connect agents to the current LedgerHQ partner workflow.

LedgerHQ exposes an MCP Streamable HTTP endpoint at:

https://preview.ledgerhq.pro/api/mcp

MCP uses OAuth 2.1 with PKCE. MCP tools are scoped to the consent/default organization and use direct database-backed services rather than HTTP self-calls. The REST integration uses the same OAuth token account-wide, then scopes each company request with x-organization-id.

Current Tool Coverage

The generated inventory exposes the MCP tools registered through lib/mcp/tools/index.ts. Tool files for hidden or future app modules may remain in the repository, but only registered files are part of the live MCP surface.

Organization

  • connection_status
  • get_organization
  • list_accessible_organizations
  • list_firm_clients
  • create_client

Accounts

  • list_accounts
  • get_account
  • create_account
  • update_account
  • delete_account

Journal Entries

  • list_entries
  • get_entry
  • create_entry
  • post_entry
  • void_entry
  • create_journal_entry

Posting Resources

  • create_purchase
  • create_deposit
  • create_transfer
  • create_bill_payment
  • create_journal_entry

Banking Follow-Through

  • list_bank_accounts
  • get_bank_account
  • list_bank_transactions
  • get_bank_transaction
  • categorize_bank_transaction
  • reclassify_bank_transaction
  • reconcile_bank_transaction
  • exclude_bank_transaction
  • get_bank_reconciliation_status

Reports

  • trial_balance
  • balance_sheet
  • profit_and_loss
  • get_report_export_url
  • generate_financial_packet_json

get_report_export_url returns a REST download URL plus the headers an agent must send, including the same OAuth bearer token and the scoped x-organization-id value.

Fixed Assets

  • list_fixed_assets
  • get_fixed_asset
  • create_fixed_asset
  • update_fixed_asset
  • delete_fixed_asset
  • depreciate_fixed_asset
  • dispose_fixed_asset
  • run_fixed_asset_depreciation

Billing, Notifications, And Utilities

The exposed MCP surface also includes Stripe integration tools, notification tools, bank rules, import/export for the supported accounting migration surface, backups, and period close tools.

Amount Conventions

Monetary amounts in the documented LedgerHQ workflow are integer cents unless a tool description says otherwise.

Connect

Most MCP clients can connect directly to the server URL and complete OAuth in a browser:

curl -fsSL https://preview.ledgerhq.pro/install-codex-mcp.sh | bash

Manual Codex setup:

codex mcp add ledgerhq --url https://preview.ledgerhq.pro/api/mcp
codex mcp login ledgerhq
codex mcp list
claude mcp add LedgerHQ --transport streamable-http https://preview.ledgerhq.pro/api/mcp

Use the same LedgerHQ host your team signs into.

Codex users connect through LedgerHQ OAuth MCP. The setup does not ask for API keys, copied bearer tokens, provider credentials, or database URLs.

On this page