Skip to main content
Glama
QuickBooks Online MCP Server

QuickBooks Online MCP Server

by amin-ale

QuickBooks Online MCP Server

CI Python 3.11+ License: MIT

QuickBooks Online MCP server for Claude Desktop and any MCP client, written in Python on the official MCP SDK (FastMCP). It exposes 18 tools over invoices, customers, and payments (create, read, update, delete, list, search) plus read-only company and receivables resources, behind a real OAuth 2.1 authorization-code + PKCE flow with automatic token refresh, client-side rate limiting that honors QuickBooks throttles, and structured errors that tell an agent what to do next. It runs over stdio and Streamable HTTP.

Related: HubSpot CRM MCP Server · MCP Audit Gateway · What production MCP actually requires

Architecture

flowchart LR
    Agent["MCP client<br/>(Claude Desktop / HTTP)"]
    subgraph Server["mcp-quickbooks (FastMCP)"]
        Tools["18 tools<br/>invoices · customers · payments"]
        Resources["resources<br/>company · receivables · customers"]
        Client["QBOClient<br/>retry · backoff · error mapping"]
        RL["RateLimiter<br/>per-second + per-minute buckets"]
        Auth["AuthManager<br/>OAuth 2.1 + PKCE · token refresh"]
        Store[("token store<br/>.qbo_tokens.json")]
    end
    QBO["Intuit QuickBooks Online API<br/>/v3/company/{realmId}"]

    Agent <-->|stdio / streamable-http| Tools
    Agent <-->|resources/read| Resources
    Tools --> Client
    Resources --> Client
    Client --> RL
    Client --> Auth
    Auth <--> Store
    Auth <-->|token + refresh| QBO
    Client -->|REST + query| QBO

The server holds no state and stores no customer data: it is a stateless proxy over the QuickBooks REST API. Tokens live in a local file you control; the client deploys with its own Intuit credentials.

Related MCP server: QuickBooks Online MCP Server

Tools

Every tool returns a structured { "ok": true, ... } result, or { "ok": false, "error": {...} } with a suggestion. Each one carries MCP annotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint) and a declared output schema.

  • create_customer: Create a customer. The display name must be unique; QuickBooks rejects duplicates with error 6240.

  • get_customer: Read one customer by Id, including balance, contact details, and the current SyncToken.

  • update_customer: Sparse update of an existing customer. Needs the Id and a fresh SyncToken.

  • delete_customer: Deactivate a customer (QuickBooks has no hard delete for customers), preserving history.

  • list_customers: List customers, most recently updated first, with caller-driven pagination.

  • search_customers: Find customers by display-name prefix, exact email, or active flag.

  • create_invoice: Create an invoice for an existing customer with one or more line items.

  • get_invoice: Read one invoice by Id, including lines, totals, balance, and the current SyncToken.

  • update_invoice: Replace an invoice. Lines are replaced wholesale, so send every line it should end with.

  • delete_invoice: Delete an invoice permanently. Needs the Id and a fresh SyncToken.

  • list_invoices: List invoices, most recent transaction date first, with caller-driven pagination.

  • search_invoices: Find invoices by customer Id, transaction-date range, or document number.

  • create_payment: Record a payment received, optionally applied against a specific invoice.

  • get_payment: Read one payment by Id, including linked transactions and the current SyncToken.

  • update_payment: Replace a payment. Dropping the invoice link reopens that invoice's balance.

  • delete_payment: Delete a payment permanently. Any invoice it settled goes back to unpaid.

  • list_payments: List payments, most recent transaction date first, with caller-driven pagination.

  • search_payments: Find payments by customer Id or transaction-date range.

Resources

Read-only JSON:

  • qbo://company: company profile and legal address

  • qbo://summary/receivables: open/overdue invoice counts and outstanding balance

  • qbo://summary/customers: active customers ranked by outstanding balance

Least-privilege scopes

The default scope is com.intuit.quickbooks.accounting only. Add com.intuit.quickbooks.payment (via QBO_SCOPES) solely if you connect payment processing. The scope string is validated at startup against the known Intuit scope set, so a typo fails fast rather than silently under-authorizing. Identity scopes (openid, profile, email) are never requested unless you opt in.

Rate limiting and retries

A dual token-bucket limiter caps outbound traffic under both the QuickBooks per-second and per-minute ceilings (configurable via QBO_REQUESTS_PER_SECOND / QBO_REQUESTS_PER_MINUTE). On 429 the client honors the Retry-After header; on 429/5xx without one it uses exponential backoff with jitter, up to QBO_MAX_RETRIES. A single 401 triggers a token refresh and one transparent retry.

Quickstart

uv venv --python 3.12 .venv
uv pip install -e ".[dev]"

cp .env.example .env       # fill in QBO_CLIENT_ID / QBO_CLIENT_SECRET
mcp-quickbooks auth        # opens Intuit, captures the redirect, stores tokens
mcp-quickbooks status      # verify the token refreshes

mcp-quickbooks stdio       # run over stdio (Claude Desktop)
mcp-quickbooks http --port 8000   # run over Streamable HTTP

Credentials are read lazily. The server starts, answers initialize, and serves tools/list with no QBO_* variables set at all; a tool call without credentials returns a structured 401 telling the caller what to configure. That keeps registry introspection and container smoke tests working without secrets.

Claude Desktop

{
  "mcpServers": {
    "quickbooks": {
      "command": "mcp-quickbooks",
      "args": ["stdio"],
      "env": { "QBO_ENVIRONMENT": "sandbox" }
    }
  }
}

Docker

docker build -t mcp-quickbooks .
docker run --rm -i --env-file .env mcp-quickbooks

Running against a real Intuit sandbox

  1. Create an app at the Intuit Developer portal and open its Keys & OAuth section. Copy the Development client id and secret.

  2. Add a redirect URI that matches QBO_REDIRECT_URI in your .env (default http://localhost:8765/callback).

  3. Create a sandbox company from the developer dashboard; its company id is your QBO_REALM_ID.

  4. Set QBO_ENVIRONMENT=sandbox, fill in QBO_CLIENT_ID / QBO_CLIENT_SECRET, then run mcp-quickbooks auth. The browser flow returns a realmId automatically; it is stored alongside the tokens.

  5. mcp-quickbooks status confirms the tokens refresh. You are now driving the live sandbox.

Switch QBO_ENVIRONMENT=production (with production keys and a connected company) to point at real books. Credentials and tokens are yours; nothing is committed: .env and .qbo_tokens.json are gitignored.

Tests

The suite runs fully offline. Every QuickBooks and OAuth call is served by an in-memory fake (tests/fake_qbo.py) seeded from recorded-style fixtures in tests/fixtures/, wired in through an httpx mock transport: no network, no real credentials.

uv run pytest

Registry metadata

server.json describes the server for the MCP registry, and .mcp.json is the client-config snippet directory crawlers look for. Publishing is intentionally left as a manual step. See PUBLISHING.md. Nothing here submits to any registry.

Hire me

I make AI-era and money-critical integrations production-safe: real auth, real rate limits, real error handling, real tests. Available for MCP server builds and API-integration hardening. Portfolio and contact: https://amin-ale.github.io/portfolio-site · amin.ale.business@gmail.com

License

MIT: see LICENSE.

Available Tools

18 tools
create_customerCreate customerA

Create a customer in the connected QuickBooks Online company. Use it before invoicing someone who is not on file yet, and run search_customers first so you do not create a second record for an existing customer. Write operation: it adds one Customer and changes nothing else. Not idempotent, because QuickBooks rejects a duplicate DisplayName with error 6240 rather than returning the existing customer. Returns the created customer with its new Id and SyncToken, or ok=false with an error and a suggested fix.

Inputs: customer (required). Returns: ok, error, customer

create_invoiceCreate invoiceA

Create an invoice for an existing customer with one or more line items. Use it after resolving the customer Id with search_customers or create_customer. Write operation with real accounting effect: it posts a receivable against the company file. Not idempotent, so calling it twice bills the customer twice. Every line needs an amount, and a line without an item_id falls back to the default sales item. QuickBooks assigns the DocNumber, totals, and (unless due_date is given) the due date from the customer's payment terms.

Inputs: invoice (required). Returns: ok, error, invoice

create_paymentRecord paymentA

Record a payment received from a customer, optionally applied against a specific invoice. Use it once the money has actually arrived, after confirming the invoice Id with get_invoice or search_invoices. Write operation with real accounting effect: it posts cash against the customer and reduces the linked invoice balance. Not idempotent, so a repeated call records a second payment. Supplying invoice_id links the whole total_amount to that invoice; omitting it leaves an unapplied credit on the customer.

Inputs: payment (required). Returns: ok, error, payment

delete_customerDeactivate customerA
Destructive

Deactivate a customer. QuickBooks Online has no hard delete for customers, so this sets Active to false, which hides the customer from pick lists while keeping their invoices, payments, and history intact. Use it to retire a customer, not to erase data. Write operation and not idempotent: it needs the SyncToken from a fresh get_customer, and that token changes on success. Deactivated customers remain readable through search_customers with active=false.

Inputs: sync_token (required), customer_id (required). Returns: ok, error, customer

delete_invoiceDelete invoiceA
Destructive

Delete an invoice permanently from the company file. Use it only for an invoice raised in error: this server cannot undo it, and voiding or issuing a credit memo is usually the correct accounting action for an invoice the customer has already seen. Write operation and not idempotent: it needs the SyncToken from a fresh get_invoice, and a repeat call for the same Id fails because the invoice no longer exists. Payments linked to it lose that link.

Inputs: invoice_id (required), sync_token (required). Returns: ok, error, invoice

delete_paymentDelete paymentA
Destructive

Delete a payment permanently from the company file. Use it only for a payment recorded in error, and expect any invoice it settled to go back to unpaid for that amount. This server cannot undo the deletion. Write operation and not idempotent: it needs the SyncToken from a fresh get_payment, and a repeat call for the same Id fails because the payment no longer exists.

Inputs: payment_id (required), sync_token (required). Returns: ok, error, payment

get_customerGet customerA
Read-onlyIdempotent

Read one customer by QuickBooks Id, including contact details, billing address, open balance, and the current SyncToken. Use it to inspect a customer, and to obtain the SyncToken that update_customer and delete_customer require. Read-only: nothing in the company file changes. The Id must already exist; an unknown Id returns ok=false with status 404, so resolve names through search_customers or list_customers first.

Inputs: customer_id (required). Returns: ok, error, customer

get_invoiceGet invoiceA
Read-onlyIdempotent

Read one invoice by QuickBooks Id, including its lines, totals, remaining balance, due date, and the current SyncToken. Use it to check whether an invoice is still open, and to obtain the SyncToken that update_invoice and delete_invoice require. Read-only. An unknown Id returns ok=false with status 404; find the Id with search_invoices (which also matches on DocNumber) or list_invoices.

Inputs: invoice_id (required). Returns: ok, error, invoice

get_paymentGet paymentA
Read-onlyIdempotent

Read one payment by QuickBooks Id, including the total, transaction date, linked transactions, and the current SyncToken. Use it to confirm which invoice a payment was applied to, and to obtain the SyncToken that update_payment and delete_payment require. Read-only. An unknown Id returns ok=false with status 404; find the Id with search_payments or list_payments.

Inputs: payment_id (required). Returns: ok, error, payment

list_customersList customersA
Read-onlyIdempotent

List customers, most recently updated first, one page at a time. Use it to browse the roster or to find an Id when you have nothing to filter on; prefer search_customers when you do. Read-only. Paging is caller-driven through start_position and max_results, and the result reports how many rows came back, so keep requesting pages until fewer than max_results rows are returned. Both active and inactive customers are included.

Inputs: max_results, start_position. Returns: ok, count, error, customers, +2 more

list_invoicesList invoicesA
Read-onlyIdempotent

List invoices, most recent transaction date first, one page at a time. Use it to review recent billing when you have nothing to filter on; prefer search_invoices when you can filter by customer, date, or document number. Read-only. Paging is caller-driven through start_position and max_results, so keep requesting pages until fewer than max_results rows come back. Paid and unpaid invoices are both included; read the Balance field to tell them apart.

Inputs: max_results, start_position. Returns: ok, count, error, invoices, +2 more

list_paymentsList paymentsA
Read-onlyIdempotent

List payments, most recent transaction date first, one page at a time. Use it to review recent cash receipts when you have nothing to filter on; prefer search_payments when you can filter by customer or date. Read-only. Paging is caller-driven through start_position and max_results, so keep requesting pages until fewer than max_results rows come back.

Inputs: max_results, start_position. Returns: ok, count, error, payments, +2 more

search_customersSearch customersA
Read-onlyIdempotent

Find customers by display-name prefix, exact primary email, or active flag. Use it to turn a name or email an agent was given into a customer Id, and to check for an existing record before create_customer. Read-only. Filters combine with AND, and name_contains is a prefix match because the QuickBooks query language only supports a trailing wildcard. Calling it with no filters returns the whole roster one page at a time.

Inputs: email, active, max_results, name_contains, +1 more. Returns: ok, count, error, customers, +2 more

search_invoicesSearch invoicesA
Read-onlyIdempotent

Find invoices by customer Id, transaction-date range, or document number. Use it to answer what a customer was billed in a period, or to turn a document number into an invoice Id. Read-only. Filters combine with AND and the date bounds are inclusive. Payment status cannot be filtered here: read the Balance field on each result, where zero means settled.

Inputs: max_date, min_date, doc_number, customer_id, +2 more. Returns: ok, count, error, invoices, +2 more

search_paymentsSearch paymentsA
Read-onlyIdempotent

Find payments by customer Id or transaction-date range. Use it to reconcile what a customer has paid over a period, or to locate the payment that settled an invoice. Read-only. Filters combine with AND and the date bounds are inclusive. Which invoice a payment was applied to is not a filter: read the LinkedTxn entries on each result.

Inputs: max_date, min_date, customer_id, max_results, +1 more. Returns: ok, count, error, payments, +2 more

update_customerUpdate customerA
Destructive

Update an existing customer. Use it to correct contact details, addresses, or the display name. Write operation that overwrites the fields you supply on the live record and leaves omitted fields unchanged, so it is a sparse update rather than a replacement. Not idempotent: a successful write increments the SyncToken, so the same call cannot be replayed. Requires the Id plus the SyncToken from a fresh get_customer; a stale token fails with error 5010.

Inputs: customer (required), sync_token (required), customer_id (required). Returns: ok, error, customer

update_invoiceUpdate invoiceA
Destructive

Replace the contents of an existing invoice. Use it to correct amounts, dates, or the billing customer. Write operation that overwrites the live record: the line array is replaced wholesale, so send every line the invoice should end with or the omitted ones are dropped and the total changes. Not idempotent, and it requires the Id plus the SyncToken from a fresh get_invoice; a stale token fails with error 5010. Payments already linked to the invoice are not adjusted.

Inputs: invoice (required), invoice_id (required), sync_token (required). Returns: ok, error, invoice

update_paymentUpdate paymentA
Destructive

Replace the contents of an existing payment. Use it to correct an amount, a date, or the invoice a payment was applied to. Write operation that overwrites the live record: the amount and linked transactions are replaced with what you send, so leaving invoice_id out unlinks the payment and reopens that invoice's balance. Not idempotent, and it requires the Id plus the SyncToken from a fresh get_payment; a stale token fails with error 5010.

Inputs: payment (required), payment_id (required), sync_token (required). Returns: ok, error, payment

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.5/5.0

    Scored across 18 tools

    Disambiguation5/5

    Each tool combines one of three clearly separated resources (customer, invoice, payment) with one of six operations (create, get, update, delete, list, search), so every tool has a unique action-target pair. There is no meaningful overlap, and the descriptions reinforce distinct use cases.

    Naming Consistency5/5

    All tools follow the same lowercase snake_case verb_noun pattern, with plural nouns for list/search and singular nouns for the other operations. The naming is perfectly regular across all three resource families.

    Tool Count4/5

    18 tools is above the typical 3-15 sweet spot, but the count is justified by covering three resources with a full six-operation lifecycle each. No tool is redundant; the set is symmetrical rather than padded.

    Completeness4/5

    The CRUD and search lifecycle is complete for customers, invoices, and payments. Minor gaps exist: there is no item/product lookup to support itemized invoice lines, and no void or credit-memo path even though delete_invoice acknowledges those as the correct correction for issued invoices.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables interaction with QuickBooks Online through OAuth authentication. Supports CRUD operations for financial entities like customers, invoices, bills, estimates, and accounting records through natural language.
      1
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to query and manage QuickBooks Online data through natural language, including customers, invoices, bills, vendors, accounts, and financial reports.
      7
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables MCP clients to interact with QuickBooks Online accounting data through typed tools, including OAuth 2.0 authentication, tenant isolation, and approval-gated writes that require operator execution.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to read a company's accounting data — customers, vendors, items, accounts, invoices, estimates, payments, bills, purchases, journal entries, time activities, attachments and financial reports — through the QuickBooks Online Accounting API v3. On explicit request it can also create, update and void records, email invoices and upload attachments, using per-request OAuth headers for stateless, multi-tenant operation.
      Apache 2.0