Model Context Protocol (MCP) for AI Accounting

Crane Ledger provides a comprehensive Model Context Protocol (MCP) implementation that enables AI assistants to interact with accounting operations. This document maps every MCP tool to its underlying REST API endpoints and worker processes.

MCP Overview

What is MCP?

The Model Context Protocol is a standard for connecting AI assistants to external tools and data sources. Crane Ledger's MCP implementation allows AI assistants to:

  • Create and manage accounting entities
  • Record financial transactions
  • Generate reports
  • Process invoices and bills
  • Manage organizations and users

Architecture

AI Assistant → MCP Client → MCP Server (stdio) → REST API → Database

The MCP server is a lightweight REST API wrapper. Every tool call translates directly to an HTTP request to the Crane Ledger REST API using Authorization: Bearer {api_key}. The organization is scoped by the authenticated API key.

Connection Setup

Configure your MCP client (e.g., Claude Desktop) with the following:

{
  "mcpServers": {
    "crane-ledger": {
      "command": "/path/to/mcp-server",
      "env": {
        "API_BASE_URL": "https://api.craneledger.ai",
        "API_KEY": "cl_live_your_key_here",
        "ORGANIZATION_ID": "org_your_org_id"
      }
    }
  }
}

Environment variables:

  • API_BASE_URL — Base URL of the Crane Ledger REST API (default: http://127.0.0.1:8080)
  • API_KEY — Your Crane Ledger API key (can also be passed during MCP initialize)
  • ORGANIZATION_ID — Your organization ID (can also be passed during MCP initialize)

Total tools available: 82 (7 account + 7 transaction + 9 invoice + 7 bill + 3 contact + 5 transfer + 9 org + 3 reporting + 3 system + 8 currency/exchange + 6 reconciliation + 7 recurring + 5 API keys + 3 credits)

Tool Categories & Mappings

Note: All MCP tools are REST API wrappers. Every tool call makes an HTTP request to the corresponding REST endpoint using Authorization: Bearer {api_key}. The organization ID is set during authentication and applied automatically.

Account Management Tools

create_account

Purpose: Create a new account in the chart of accounts

MCP Tool:

{
  "name": "create_account",
  "description": "Create a new account in the chart of accounts",
  "input_schema": {
    "type": "object",
    "properties": {
      "organization_id": {"type": "string", "description": "Organization ID"},
      "code": {"type": "string", "description": "Account code (e.g., '1000', '2000')"},
      "name": {"type": "string", "description": "Account name"},
      "account_type": {
        "type": "string",
        "enum": ["asset", "liability", "equity", "revenue", "expense"],
        "description": "Type of account"
      },
      "currency_id": {"type": "string", "description": "Currency ID"},
      "description": {"type": "string", "description": "Account description"},
      "parent_account_id": {"type": "string", "description": "Parent account ID"}
    },
    "required": ["organization_id", "code", "name", "account_type"]
  }
}

Underlying Implementation:

  • REST Endpoint: POST /organizations/{org_id}/accounts
  • Execution: Direct REST API call via Authorization: Bearer header

Example:

{
  "method": "tools/call",
  "params": {
    "name": "create_account",
    "arguments": {
      "organization_id": "org_1234567890abcdef",
      "code": "1001",
      "name": "Operating Cash",
      "account_type": "asset",
      "currency_id": "CUR_USD",
      "description": "Primary checking account"
    }
  }
}

Response: The response from the REST API is returned directly as the MCP tool result, wrapped in a content array with type: "text".

list_accounts

Purpose: List all accounts for an organization

MCP Tool:

{
  "name": "list_accounts",
  "description": "List all accounts for an organization",
  "input_schema": {
    "type": "object",
    "properties": {
      "organization_id": {"type": "string", "description": "Organization ID"}
    },
    "required": ["organization_id"]
  }
}

Underlying Implementation:

  • REST Endpoint: GET /organizations/{org_id}/accounts
  • Execution: Direct REST API call

get_account

Purpose: Get details of a specific account

MCP Tool:

{
  "name": "get_account",
  "description": "Get details of a specific account",
  "input_schema": {
    "type": "object",
    "properties": {
      "account_id": {"type": "string", "description": "Account ID"}
    },
    "required": ["account_id"]
  }
}

Underlying Implementation:

  • Execution: Direct database query
  • Repository: PostgresAccountRepository::find_by_id()
  • REST Equivalent: GET /organizations/{org_id}/accounts/{account_id}
  • Credits: 0 credits (free)

update_account

Purpose: Update an existing account

MCP Tool:

{
  "name": "update_account",
  "description": "Update an existing account",
  "input_schema": {
    "type": "object",
    "properties": {
      "account_id": {"type": "string", "description": "Account ID"},
      "code": {"type": "string", "description": "New account code"},
      "name": {"type": "string", "description": "New account name"},
      "description": {"type": "string", "description": "New description"}
    },
    "required": ["account_id"]
  }
}

Underlying Implementation:

  • Worker Type: WorkerType::Account
  • Action: "update"
  • REST Endpoint: PUT /organizations/{org_id}/accounts/{account_id}
  • Execution: Queued through worker orchestrator
  • Credits: 1 credit

delete_account

Purpose: Delete an account (if no transactions)

MCP Tool:

{
  "name": "delete_account",
  "description": "Delete an account if it has no transactions",
  "input_schema": {
    "type": "object",
    "properties": {
      "account_id": {"type": "string", "description": "Account ID"}
    },
    "required": ["account_id"]
  }
}

Underlying Implementation:

  • Worker Type: WorkerType::Account
  • Action: "delete"
  • REST Endpoint: DELETE /organizations/{org_id}/accounts/{account_id}
  • Execution: Queued through worker orchestrator
  • Credits: 1 credit

get_account_transactions

Purpose: Get transaction history for an account

MCP Tool:

{
  "name": "get_account_transactions",
  "description": "Get transaction history for a specific account",
  "input_schema": {
    "type": "object",
    "properties": {
      "account_id": {"type": "string", "description": "Account ID"},
      "limit": {"type": "integer", "description": "Maximum transactions to return", "default": 10}
    },
    "required": ["account_id"]
  }
}

Underlying Implementation:

  • Execution: Direct database query
  • Repository: PostgresLedgerEntryRepository::find_by_account()
  • REST Equivalent: GET /organizations/{org_id}/accounts/{account_id}/transactions
  • Credits: 0 credits (free)

get_account_balance

Purpose: Get current balance for an account

MCP Tool:

{
  "name": "get_account_balance",
  "description": "Get current balance for a specific account",
  "input_schema": {
    "type": "object",
    "properties": {
      "account_id": {"type": "string", "description": "Account ID"}
    },
    "required": ["account_id"]
  }
}

Underlying Implementation:

  • Execution: Direct database query
  • Repository: PostgresAccountBalanceRepository::get_current_balance()
  • REST Equivalent: GET /organizations/{org_id}/accounts/{account_id}/balance
  • Credits: 0 credits (free)

Transaction Management Tools

list_transactions

Purpose: List transactions for an organization

MCP Tool:

{
  "name": "list_transactions",
  "description": "List transactions for an organization",
  "input_schema": {
    "type": "object",
    "properties": {
      "organization_id": {"type": "string", "description": "Organization ID"},
      "limit": {"type": "integer", "description": "Maximum transactions to return", "default": 50},
      "offset": {"type": "integer", "description": "Pagination offset", "default": 0}
    },
    "required": ["organization_id"]
  }
}

Underlying Implementation:

  • Execution: Direct database query
  • Repository: PostgresTransactionRepository::find_by_organization()
  • REST Equivalent: GET /organizations/{org_id}/transactions
  • Credits: 0 credits (free)

create_transaction

Purpose: Create a new journal entry transaction

MCP Tool:

{
  "name": "create_transaction",
  "description": "Create a new journal entry transaction",
  "input_schema": {
    "type": "object",
    "properties": {
      "organization_id": {"type": "string", "description": "Organization ID"},
      "description": {"type": "string", "description": "Transaction description"},
      "date": {"type": "string", "format": "date-time", "description": "Transaction date"},
      "entries": {
        "type": "array",
        "description": "Journal entries (must balance)",
        "items": {
          "type": "object",
          "properties": {
            "account_id": {"type": "string"},
            "entry_type": {"type": "string", "enum": ["debit", "credit"]},
            "amount": {"type": "number"},
            "description": {"type": "string"}
          },
          "required": ["account_id", "entry_type", "amount"]
        }
      }
    },
    "required": ["organization_id", "description", "date", "entries"]
  }
}

Underlying Implementation:

  • Worker Type: WorkerType::Transaction
  • Action: "create"
  • REST Endpoint: POST /organizations/{org_id}/transactions
  • Execution: Queued through worker orchestrator
  • Credits: 2 credits

get_transaction

Purpose: Get details of a specific transaction

MCP Tool:

{
  "name": "get_transaction",
  "description": "Get details of a specific transaction",
  "input_schema": {
    "type": "object",
    "properties": {
      "transaction_id": {"type": "string", "description": "Transaction ID"}
    },
    "required": ["transaction_id"]
  }
}

Underlying Implementation:

  • Execution: Direct database query
  • Repository: PostgresTransactionRepository::find_by_id_with_entries()
  • REST Equivalent: GET /organizations/{org_id}/transactions/{transaction_id}
  • Credits: 0 credits (free)

update_transaction

Purpose: Update a pending transaction

MCP Tool:

{
  "name": "update_transaction",
  "description": "Update a pending transaction",
  "input_schema": {
    "type": "object",
    "properties": {
      "transaction_id": {"type": "string", "description": "Transaction ID"},
      "description": {"type": "string", "description": "New description"},
      "date": {"type": "string", "format": "date-time", "description": "New date"},
      "entries": {"type": "array", "description": "Updated journal entries"}
    },
    "required": ["transaction_id"]
  }
}

Underlying Implementation:

  • Worker Type: WorkerType::Transaction
  • Action: "update"
  • REST Endpoint: PUT /organizations/{org_id}/transactions/{transaction_id}
  • Execution: Queued through worker orchestrator
  • Credits: 1 credit

post_transaction

Purpose: Post a pending transaction to the ledger

MCP Tool:

{
  "name": "post_transaction",
  "description": "Post a pending transaction to the ledger",
  "input_schema": {
    "type": "object",
    "properties": {
      "transaction_id": {"type": "string", "description": "Transaction ID"}
    },
    "required": ["transaction_id"]
  }
}

Underlying Implementation:

  • Worker Type: WorkerType::Transaction
  • Action: "post"
  • REST Endpoint: POST /organizations/{org_id}/transactions/{transaction_id}/post
  • Execution: Queued through worker orchestrator
  • Credits: 1 credit

reverse_transaction

Purpose: Reverse a posted transaction

MCP Tool:

{
  "name": "reverse_transaction",
  "description": "Reverse a posted transaction",
  "input_schema": {
    "type": "object",
    "properties": {
      "transaction_id": {"type": "string", "description": "Transaction ID"},
      "reason": {"type": "string", "description": "Reason for reversal"}
    },
    "required": ["transaction_id", "reason"]
  }
}

Underlying Implementation:

  • Worker Type: WorkerType::Transaction
  • Action: "reverse"
  • REST Endpoint: POST /organizations/{org_id}/transactions/{transaction_id}/reverse
  • Execution: Queued through worker orchestrator
  • Credits: 3 credits

delete_transaction

Purpose: Delete a pending transaction

MCP Tool:

{
  "name": "delete_transaction",
  "description": "Delete a pending transaction",
  "input_schema": {
    "type": "object",
    "properties": {
      "transaction_id": {"type": "string", "description": "Transaction ID"}
    },
    "required": ["transaction_id"]
  }
}

Underlying Implementation:

  • Worker Type: WorkerType::Transaction
  • Action: "delete"
  • REST Endpoint: DELETE /organizations/{org_id}/transactions/{transaction_id}
  • Execution: Queued through worker orchestrator
  • Credits: 1 credit

Invoice Management Tools

list_invoices

Purpose: List invoices for an organization

MCP Tool:

{
  "name": "list_invoices",
  "description": "List invoices for an organization",
  "input_schema": {
    "type": "object",
    "properties": {
      "organization_id": {"type": "string", "description": "Organization ID"}
    },
    "required": ["organization_id"]
  }
}

Underlying Implementation:

  • Execution: Direct database query
  • Repository: PostgresInvoiceRepository::find_by_organization()
  • REST Equivalent: GET /organizations/{org_id}/invoices
  • Credits: 0 credits (free)

create_invoice

Purpose: Create a new sales invoice

MCP Tool:

{
  "name": "create_invoice",
  "description": "Create a new sales invoice",
  "input_schema": {
    "type": "object",
    "properties": {
      "organization_id": {"type": "string", "description": "Organization ID"},
      "contact_id": {"type": "string", "description": "Customer contact ID"},
      "invoice_date": {"type": "string", "format": "date-time"},
      "due_date": {"type": "string", "format": "date-time"},
      "items": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "description": {"type": "string"},
            "quantity": {"type": "number"},
            "unit_price": {"type": "number"},
            "item_id": {"type": "string"}
          },
          "required": ["description", "quantity", "unit_price"]
        }
      },
      "notes": {"type": "string"}
    },
    "required": ["organization_id", "contact_id", "invoice_date", "due_date", "items"]
  }
}

Underlying Implementation:

  • Worker Type: WorkerType::Invoice
  • Action: "create"
  • REST Endpoint: POST /organizations/{org_id}/invoices
  • Execution: Queued through worker orchestrator
  • Credits: 5 credits

get_invoice

Purpose: Get details of a specific invoice

MCP Tool:

{
  "name": "get_invoice",
  "description": "Get details of a specific invoice",
  "input_schema": {
    "type": "object",
    "properties": {
      "invoice_id": {"type": "string", "description": "Invoice ID"}
    },
    "required": ["invoice_id"]
  }
}

Underlying Implementation:

  • Execution: Direct database query
  • Repository: PostgresInvoiceRepository::find_by_id_with_items()
  • REST Equivalent: GET /organizations/{org_id}/invoices/{invoice_id}
  • Credits: 0 credits (free)

update_invoice

Purpose: Update an existing invoice

MCP Tool:

{
  "name": "update_invoice",
  "description": "Update an existing invoice",
  "input_schema": {
    "type": "object",
    "properties": {
      "invoice_id": {"type": "string", "description": "Invoice ID"},
      "contact_id": {"type": "string"},
      "invoice_date": {"type": "string", "format": "date-time"},
      "due_date": {"type": "string", "format": "date-time"},
      "items": {"type": "array", "description": "Updated invoice items"},
      "notes": {"type": "string"}
    },
    "required": ["invoice_id"]
  }
}

Underlying Implementation:

  • Worker Type: WorkerType::Invoice
  • Action: "update"
  • REST Endpoint: PUT /organizations/{org_id}/invoices/{invoice_id}
  • Execution: Queued through worker orchestrator
  • Credits: 2 credits

delete_invoice

Purpose: Delete a draft invoice

MCP Tool:

{
  "name": "delete_invoice",
  "description": "Delete a draft invoice",
  "input_schema": {
    "type": "object",
    "properties": {
      "invoice_id": {"type": "string", "description": "Invoice ID"}
    },
    "required": ["invoice_id"]
  }
}

Underlying Implementation:

  • Worker Type: WorkerType::Invoice
  • Action: "delete"
  • REST Endpoint: DELETE /organizations/{org_id}/invoices/{invoice_id}
  • Execution: Queued through worker orchestrator
  • Credits: 1 credit

send_invoice

Purpose: Mark an invoice as sent

MCP Tool:

{
  "name": "send_invoice",
  "description": "Mark an invoice as sent",
  "input_schema": {
    "type": "object",
    "properties": {
      "invoice_id": {"type": "string", "description": "Invoice ID"}
    },
    "required": ["invoice_id"]
  }
}

Underlying Implementation:

  • Worker Type: WorkerType::Invoice
  • Action: "send"
  • REST Endpoint: POST /organizations/{org_id}/invoices/{invoice_id}/send
  • Execution: Queued through worker orchestrator
  • Credits: 1 credit

generate_invoice_pdf

Purpose: Generate PDF for an invoice

MCP Tool:

{
  "name": "generate_invoice_pdf",
  "description": "Generate PDF for an invoice",
  "input_schema": {
    "type": "object",
    "properties": {
      "invoice_id": {"type": "string", "description": "Invoice ID"}
    },
    "required": ["invoice_id"]
  }
}

Underlying Implementation:

  • Execution: Direct service call
  • Service: PDF generation service
  • REST Equivalent: GET /organizations/{org_id}/invoices/{invoice_id}/pdf
  • Credits: 0 credits (free)

record_invoice_payment

Purpose: Record a payment against an invoice

MCP Tool:

{
  "name": "record_invoice_payment",
  "description": "Record a payment against an invoice",
  "input_schema": {
    "type": "object",
    "properties": {
      "invoice_id": {"type": "string", "description": "Invoice ID"},
      "amount": {"type": "number", "description": "Payment amount"},
      "payment_date": {"type": "string", "format": "date-time"},
      "payment_method": {"type": "string", "description": "Payment method"},
      "reference": {"type": "string", "description": "Reference number"},
      "notes": {"type": "string", "description": "Payment notes"}
    },
    "required": ["invoice_id", "amount", "payment_date", "payment_method"]
  }
}

Underlying Implementation:

  • Execution: Direct service call
  • Service: Payment recording service
  • REST Equivalent: POST /organizations/{org_id}/invoices/{invoice_id}/payments
  • Credits: 2 credits

get_invoice_history

Purpose: Get status change history for an invoice

MCP Tool:

{
  "name": "get_invoice_history",
  "description": "Get status change history for an invoice",
  "input_schema": {
    "type": "object",
    "properties": {
      "invoice_id": {"type": "string", "description": "Invoice ID"}
    },
    "required": ["invoice_id"]
  }
}

Underlying Implementation:

  • Execution: Direct database query
  • Repository: PostgresInvoiceHistoryRepository::find_by_invoice()
  • REST Equivalent: GET /organizations/{org_id}/invoices/{invoice_id}/history
  • Credits: 0 credits (free)

Bill Management Tools

list_bills

Purpose: List bills for an organization

MCP Tool:

{
  "name": "list_bills",
  "description": "List bills for an organization",
  "input_schema": {
    "type": "object",
    "properties": {
      "organization_id": {"type": "string", "description": "Organization ID"}
    },
    "required": ["organization_id"]
  }
}

Underlying Implementation:

  • Execution: Direct database query
  • Repository: PostgresBillRepository::find_by_organization()
  • REST Equivalent: GET /organizations/{org_id}/bills
  • Credits: 0 credits (free)

create_bill

Purpose: Create a new purchase bill

MCP Tool:

{
  "name": "create_bill",
  "description": "Create a new purchase bill",
  "input_schema": {
    "type": "object",
    "properties": {
      "organization_id": {"type": "string", "description": "Organization ID"},
      "contact_id": {"type": "string", "description": "Vendor contact ID"},
      "bill_date": {"type": "string", "format": "date-time"},
      "due_date": {"type": "string", "format": "date-time"},
      "items": {"type": "array", "description": "Bill line items"},
      "notes": {"type": "string"}
    },
    "required": ["organization_id", "contact_id", "bill_date", "due_date", "items"]
  }
}

Underlying Implementation:

  • Worker Type: WorkerType::Bill
  • Action: "create"
  • REST Endpoint: POST /organizations/{org_id}/bills
  • Execution: Queued through worker orchestrator
  • Credits: 5 credits

get_bill

Purpose: Get details of a specific bill

MCP Tool:

{
  "name": "get_bill",
  "description": "Get details of a specific bill",
  "input_schema": {
    "type": "object",
    "properties": {
      "bill_id": {"type": "string", "description": "Bill ID"}
    },
    "required": ["bill_id"]
  }
}

Underlying Implementation:

  • Execution: Direct database query
  • Repository: PostgresBillRepository::find_by_id_with_items()
  • REST Equivalent: GET /organizations/{org_id}/bills/{bill_id}
  • Credits: 0 credits (free)

update_bill

Purpose: Update an existing bill

MCP Tool:

{
  "name": "update_bill",
  "description": "Update an existing bill",
  "input_schema": {
    "type": "object",
    "properties": {
      "bill_id": {"type": "string", "description": "Bill ID"},
      "contact_id": {"type": "string"},
      "bill_date": {"type": "string", "format": "date-time"},
      "due_date": {"type": "string", "format": "date-time"},
      "items": {"type": "array", "description": "Updated bill items"},
      "notes": {"type": "string"}
    },
    "required": ["bill_id"]
  }
}

Underlying Implementation:

  • Worker Type: WorkerType::Bill
  • Action: "update"
  • REST Endpoint: PUT /organizations/{org_id}/bills/{bill_id}
  • Execution: Queued through worker orchestrator
  • Credits: 2 credits

delete_bill

Purpose: Delete a draft bill

MCP Tool:

{
  "name": "delete_bill",
  "description": "Delete a draft bill",
  "input_schema": {
    "type": "object",
    "properties": {
      "bill_id": {"type": "string", "description": "Bill ID"}
    },
    "required": ["bill_id"]
  }
}

Underlying Implementation:

  • Worker Type: WorkerType::Bill
  • Action: "delete"
  • REST Endpoint: DELETE /organizations/{org_id}/bills/{bill_id}
  • Execution: Queued through worker orchestrator
  • Credits: 1 credit

receive_bill

Purpose: Mark a bill as received

MCP Tool:

{
  "name": "receive_bill",
  "description": "Mark a bill as received",
  "input_schema": {
    "type": "object",
    "properties": {
      "bill_id": {"type": "string", "description": "Bill ID"}
    },
    "required": ["bill_id"]
  }
}

Underlying Implementation:

  • Worker Type: WorkerType::Bill
  • Action: "receive"
  • REST Endpoint: POST /organizations/{org_id}/bills/{bill_id}/receive
  • Execution: Queued through worker orchestrator
  • Credits: 1 credit

get_bill_history

Purpose: Get status change history for a bill

MCP Tool:

{
  "name": "get_bill_history",
  "description": "Get status change history for a bill",
  "input_schema": {
    "type": "object",
    "properties": {
      "bill_id": {"type": "string", "description": "Bill ID"}
    },
    "required": ["bill_id"]
  }
}

Underlying Implementation:

  • Execution: Direct database query
  • Repository: PostgresBillHistoryRepository::find_by_bill()
  • REST Equivalent: GET /organizations/{org_id}/bills/{bill_id}/history
  • Credits: 0 credits (free)

Organization Management Tools

create_master_account

Purpose: Create a new master organization

MCP Tool:

{
  "name": "create_master_account",
  "description": "Create a new master organization",
  "input_schema": {
    "type": "object",
    "properties": {
      "organization_name": {"type": "string", "description": "Organization name"},
      "user_github_id": {"type": "string", "description": "GitHub user ID"},
      "user_email": {"type": "string", "description": "User email"},
      "base_currency_code": {"type": "string", "description": "Base currency code"},
      "domain": {"type": "string", "description": "Organization domain"},
      "tax_number": {"type": "string", "description": "Tax/VAT number"},
      "fiscal_year_start": {"type": "integer", "description": "Fiscal year start month"}
    },
    "required": ["organization_name", "user_github_id", "user_email"]
  }
}

Underlying Implementation:

  • Execution: Direct service call
  • Service: Organization creation service
  • REST Equivalent: POST /accounts/master
  • Credits: 10 credits

create_sub_organization

Purpose: Create a sub-organization under a parent

MCP Tool:

{
  "name": "create_sub_organization",
  "description": "Create a sub-organization under a parent",
  "input_schema": {
    "type": "object",
    "properties": {
      "parent_organization_id": {"type": "string", "description": "Parent organization ID"},
      "organization_name": {"type": "string", "description": "Sub-organization name"},
      "relationship_type": {"type": "string", "enum": ["owned", "linked"]},
      "billing_type": {"type": "string", "enum": ["shared"], "description": "Must be 'shared' - all sub-organizations use master billing"}
    },
    "required": ["parent_organization_id", "organization_name", "relationship_type", "billing_type"]
  }
}

Underlying Implementation:

  • Execution: Direct service call
  • Service: Sub-organization creation service
  • REST Equivalent: POST /accounts/sub
  • Credits: 8 credits

get_user_organizations

Purpose: List all organizations for a user

MCP Tool:

{
  "name": "get_user_organizations",
  "description": "List all organizations for a user",
  "input_schema": {
    "type": "object",
    "properties": {}
  }
}

Underlying Implementation:

  • Execution: Direct database query
  • Repository: PostgresOrganizationRepository::find_by_user()
  • REST Equivalent: GET /organizations
  • Credits: 0 credits (free)

get_organization

Purpose: Get details of a specific organization

MCP Tool:

{
  "name": "get_organization",
  "description": "Get details of a specific organization",
  "input_schema": {
    "type": "object",
    "properties": {
      "organization_id": {"type": "string", "description": "Organization ID"}
    },
    "required": ["organization_id"]
  }
}

Underlying Implementation:

  • Execution: Direct database query
  • Repository: PostgresOrganizationRepository::find_by_id()
  • REST Equivalent: GET /organizations/{org_id}
  • Credits: 0 credits (free)

update_organization

Purpose: Update organization settings

MCP Tool:

{
  "name": "update_organization",
  "description": "Update organization settings",
  "input_schema": {
    "type": "object",
    "properties": {
      "organization_id": {"type": "string", "description": "Organization ID"},
      "name": {"type": "string", "description": "New organization name"},
      "domain": {"type": "string", "description": "New domain"},
      "tax_number": {"type": "string", "description": "New tax number"},
      "fiscal_year_start": {"type": "integer", "description": "Fiscal year start month"}
    },
    "required": ["organization_id"]
  }
}

Underlying Implementation:

  • Worker Type: WorkerType::Organization
  • Action: "update"
  • REST Endpoint: PUT /organizations/{org_id}
  • Execution: Queued through worker orchestrator
  • Credits: 1 credit

get_organization_billing

Purpose: Get billing information for an organization

MCP Tool:

{
  "name": "get_organization_billing",
  "description": "Get billing information for an organization",
  "input_schema": {
    "type": "object",
    "properties": {
      "organization_id": {"type": "string", "description": "Organization ID"}
    },
    "required": ["organization_id"]
  }
}

Underlying Implementation:

  • Execution: Direct database query
  • Repository: Organization billing query
  • REST Equivalent: GET /organizations/{org_id}/billing
  • Credits: 0 credits (free)

get_billing_organization

Purpose: Get the organization responsible for billing

MCP Tool:

{
  "name": "get_billing_organization",
  "description": "Get the organization responsible for billing",
  "input_schema": {
    "type": "object",
    "properties": {
      "organization_id": {"type": "string", "description": "Organization ID"}
    },
    "required": ["organization_id"]
  }
}

Underlying Implementation:

  • Execution: Direct database query
  • Repository: Organization hierarchy query
  • REST Equivalent: GET /organizations/{org_id}/billing-organization
  • Credits: 0 credits (free)

get_consolidated_reporting_orgs

Purpose: Get organizations that can share data for consolidated reporting

MCP Tool:

{
  "name": "get_consolidated_reporting_orgs",
  "description": "Get organizations that can share data for consolidated reporting",
  "input_schema": {
    "type": "object",
    "properties": {
      "organization_id": {"type": "string", "description": "Organization ID"}
    },
    "required": ["organization_id"]
  }
}

Underlying Implementation:

  • Execution: Direct database query
  • Repository: Organization hierarchy query
  • REST Equivalent: GET /organizations/{org_id}/consolidated-reporting
  • Credits: 0 credits (free)

check_data_sharing

Purpose: Check if two organizations can share financial data

MCP Tool:

{
  "name": "check_data_sharing",
  "description": "Check if two organizations can share financial data",
  "input_schema": {
    "type": "object",
    "properties": {
      "org1_id": {"type": "string", "description": "First organization ID"},
      "org2_id": {"type": "string", "description": "Second organization ID"}
    },
    "required": ["org1_id", "org2_id"]
  }
}

Underlying Implementation:

  • Execution: Direct database query
  • Repository: Organization relationship query
  • REST Equivalent: GET /organizations/can-share-data/{org1}/{org2}
  • Credits: 0 credits (free)

Contact Management Tools

list_contacts

Purpose: List contacts for an organization

MCP Tool:

{
  "name": "list_contacts",
  "description": "List contacts for an organization",
  "input_schema": {
    "type": "object",
    "properties": {
      "organization_id": {"type": "string", "description": "Organization ID"}
    },
    "required": ["organization_id"]
  }
}

Underlying Implementation:

  • Execution: Direct database query
  • Repository: PostgresContactRepository::find_by_organization()
  • REST Equivalent: GET /organizations/{org_id}/contacts
  • Credits: 0 credits (free)

get_contact

Purpose: Get details of a specific contact

MCP Tool:

{
  "name": "get_contact",
  "description": "Get details of a specific contact",
  "input_schema": {
    "type": "object",
    "properties": {
      "contact_id": {"type": "string", "description": "Contact ID"}
    },
    "required": ["contact_id"]
  }
}

Underlying Implementation:

  • Execution: Direct database query
  • Repository: PostgresContactRepository::find_by_id()
  • REST Equivalent: GET /organizations/{org_id}/contacts/{contact_id}
  • Credits: 0 credits (free)

create_contact

Purpose: Create a new customer or vendor contact

MCP Tool:

{
  "name": "create_contact",
  "description": "Create a new contact (customer or vendor)",
  "input_schema": {
    "type": "object",
    "properties": {
      "name": {"type": "string", "description": "Contact name"},
      "contact_type": {"type": "string", "enum": ["customer", "vendor", "both"], "description": "Contact type"},
      "email": {"type": "string", "description": "Email address"},
      "phone": {"type": "string", "description": "Phone number"},
      "address": {"type": "string", "description": "Address"},
      "tax_number": {"type": "string", "description": "Tax identification number"}
    },
    "required": ["name", "contact_type"]
  }
}

REST Endpoint: POST /organizations/{org_id}/contacts

Transfer Management Tools

list_transfers

Purpose: List transfers for an organization

MCP Tool:

{
  "name": "list_transfers",
  "description": "List transfers for an organization",
  "input_schema": {
    "type": "object",
    "properties": {
      "organization_id": {"type": "string", "description": "Organization ID"}
    },
    "required": ["organization_id"]
  }
}

Underlying Implementation:

  • Execution: Direct database query
  • Repository: PostgresTransferRepository::find_by_organization()
  • REST Equivalent: GET /organizations/{org_id}/transfers
  • Credits: 0 credits (free)

get_transfer

Purpose: Get details of a specific transfer

MCP Tool:

{
  "name": "get_transfer",
  "description": "Get details of a specific transfer",
  "input_schema": {
    "type": "object",
    "properties": {
      "transfer_id": {"type": "string", "description": "Transfer ID"}
    },
    "required": ["transfer_id"]
  }
}

Underlying Implementation:

  • Execution: Direct database query
  • Repository: PostgresTransferRepository::find_by_id()
  • REST Equivalent: GET /organizations/{org_id}/transfers/{transfer_id}
  • Credits: 0 credits (free)

create_transfer

Purpose: Create an inter-account transfer

MCP Tool:

{
  "name": "create_transfer",
  "description": "Create a transfer between two accounts",
  "input_schema": {
    "type": "object",
    "properties": {
      "from_account_id": {"type": "string", "description": "Source account ID"},
      "to_account_id": {"type": "string", "description": "Destination account ID"},
      "amount": {"type": "number", "description": "Transfer amount"},
      "description": {"type": "string", "description": "Transfer description"},
      "transfer_date": {"type": "string", "format": "date", "description": "Transfer date"}
    },
    "required": ["from_account_id", "to_account_id", "amount", "transfer_date"]
  }
}

REST Endpoint: POST /organizations/{org_id}/transfers

update_transfer

Purpose: Update transfer details

MCP Tool:

{
  "name": "update_transfer",
  "description": "Update transfer details",
  "input_schema": {
    "type": "object",
    "properties": {
      "transfer_id": {"type": "string", "description": "Transfer ID"},
      "description": {"type": "string", "description": "New description"},
      "reference": {"type": "string", "description": "New reference"}
    },
    "required": ["transfer_id"]
  }
}

Underlying Implementation:

  • Worker Type: WorkerType::Transfer
  • Action: "update"
  • REST Endpoint: PUT /organizations/{org_id}/transfers/{transfer_id}
  • Execution: Queued through worker orchestrator
  • Credits: 1 credit

delete_transfer

Purpose: Delete a transfer

MCP Tool:

{
  "name": "delete_transfer",
  "description": "Delete a transfer",
  "input_schema": {
    "type": "object",
    "properties": {
      "transfer_id": {"type": "string", "description": "Transfer ID"}
    },
    "required": ["transfer_id"]
  }
}

Underlying Implementation:

  • Worker Type: WorkerType::Transfer
  • Action: "delete"
  • REST Endpoint: DELETE /organizations/{org_id}/transfers/{transfer_id}
  • Execution: Queued through worker orchestrator
  • Credits: 1 credit

Financial Reporting Tools

get_trial_balance

Purpose: Generate trial balance report

MCP Tool:

{
  "name": "get_trial_balance",
  "description": "Generate trial balance report",
  "input_schema": {
    "type": "object",
    "properties": {
      "organization_id": {"type": "string", "description": "Organization ID"}
    },
    "required": ["organization_id"]
  }
}

Underlying Implementation:

  • Execution: Database aggregation query
  • Service: Trial balance calculation service
  • REST Equivalent: GET /organizations/{org_id}/reports/trial-balance
  • Credits: 5 credits

get_balance_sheet

Purpose: Generate balance sheet report

MCP Tool:

{
  "name": "get_balance_sheet",
  "description": "Generate balance sheet report",
  "input_schema": {
    "type": "object",
    "properties": {
      "organization_id": {"type": "string", "description": "Organization ID"}
    },
    "required": ["organization_id"]
  }
}

Underlying Implementation:

  • Execution: Database aggregation query
  • Service: Balance sheet calculation service
  • REST Equivalent: GET /organizations/{org_id}/reports/balance-sheet
  • Credits: 5 credits

get_income_statement

Purpose: Generate income statement report

MCP Tool:

{
  "name": "get_income_statement",
  "description": "Generate income statement report",
  "input_schema": {
    "type": "object",
    "properties": {
      "organization_id": {"type": "string", "description": "Organization ID"}
    },
    "required": ["organization_id"]
  }
}

Underlying Implementation:

  • Execution: Database aggregation query
  • Service: Income statement calculation service
  • REST Equivalent: GET /organizations/{org_id}/reports/income-statement
  • Credits: 5 credits

System Tools

health_check

Purpose: Check system health

MCP Tool:

{
  "name": "health_check",
  "description": "Check system health",
  "input_schema": {
    "type": "object",
    "properties": {}
  }
}

Underlying Implementation:

  • Execution: Direct service call
  • Service: Health check service
  • REST Equivalent: GET /health
  • Credits: 0 credits

system_info

Purpose: Get system information

MCP Tool:

{
  "name": "system_info",
  "description": "Get system information",
  "input_schema": {
    "type": "object",
    "properties": {}
  }
}

Underlying Implementation:

  • Execution: Direct service call
  • Service: System info service
  • REST Equivalent: GET /system
  • Credits: 0 credits

get_entity_events

Purpose: Get audit events for an entity

MCP Tool:

{
  "name": "get_entity_events",
  "description": "Get audit events for an entity",
  "input_schema": {
    "type": "object",
    "properties": {
      "entity_type": {"type": "string", "description": "Entity type"},
      "entity_id": {"type": "string", "description": "Entity ID"}
    },
    "required": ["entity_type", "entity_id"]
  }
}

Underlying Implementation:

  • Execution: Direct database query
  • Repository: PostgresEventRepository::find_by_entity()
  • REST Equivalent: GET /events/{entity_type}/{entity_id}
  • Credits: 0 credits (free)

Usage Examples

Creating a Complete Accounting Workflow

[
  // 1. Create organization
  {
    "method": "tools/call",
    "params": {
      "name": "create_master_account",
      "arguments": {
        "organization_name": "My Business",
        "user_github_id": "123456",
        "user_email": "owner@mybusiness.com"
      }
    }
  },

  // 2. Set up chart of accounts
  {
    "method": "tools/call",
    "params": {
      "name": "create_account",
      "arguments": {
        "organization_id": "org_123",
        "code": "1001",
        "name": "Operating Cash",
        "account_type": "asset"
      }
    }
  },

  // 3. Record opening balance
  {
    "method": "tools/call",
    "params": {
      "name": "create_transaction",
      "arguments": {
        "organization_id": "org_123",
        "description": "Opening cash balance",
        "date": "2024-01-01T00:00:00Z",
        "entries": [
          {
            "account_id": "act_1001",
            "entry_type": "debit",
            "amount": 10000.00
          },
          {
            "account_id": "act_3001",
            "entry_type": "credit",
            "amount": 10000.00
          }
        ]
      }
    }
  },

  // 4. Create customer invoice
  {
    "method": "tools/call",
    "params": {
      "name": "create_invoice",
      "arguments": {
        "organization_id": "org_123",
        "contact_id": "con_456",
        "invoice_date": "2024-01-15T00:00:00Z",
        "due_date": "2024-02-15T00:00:00Z",
        "items": [
          {
            "description": "Consulting Services",
            "quantity": 10,
            "unit_price": 150.00
          }
        ]
      }
    }
  },

  // 5. Generate financial report
  {
    "method": "tools/call",
    "params": {
      "name": "get_trial_balance",
      "arguments": {
        "organization_id": "org_123"
      }
    }
  }
]

This comprehensive MCP documentation maps every tool to its underlying REST API endpoint. The MCP server is a lightweight wrapper that translates JSON-RPC tool calls into authenticated REST API requests.


Need help?

Create a free account to access our support portal. Once signed in, use the Support tab in your dashboard to submit a support ticket — our team typically responds within 24 hours.