mcp-quickbooks

mcp-quickbooks

Enables LLM agents to manage QuickBooks Online invoices, customers, and payments via typed tools with OAuth 2.1 authentication, rate limiting, and retries, plus read-only resources for company and receivables summaries.

Category
访问服务器

README

mcp-quickbooks

CI Python 3.11+ License: MIT

A production-shaped Model Context Protocol server for QuickBooks Online, built on the official Python MCP SDK (FastMCP). It gives an LLM agent typed, least-privilege tools to create, read, update, delete, list, and search invoices, customers, and payments, plus read-only resources for company and receivables summaries — behind a real OAuth 2.1 authorization-code + PKCE flow with automatic token refresh, client-side rate limiting that honors QuickBooks throttles, and structured, actionable error responses. It runs over both stdio and Streamable HTTP.

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.

Capabilities

Tools (each returns a structured { "ok": true, ... } result, or { "ok": false, "error": {...} } with a suggestion):

Entity create read update delete list search
Customer create_customer get_customer update_customer delete_customer* list_customers search_customers
Invoice create_invoice get_invoice update_invoice delete_invoice list_invoices search_invoices
Payment create_payment get_payment update_payment delete_payment list_payments search_payments

* QuickBooks Online has no hard delete for customers, so delete_customer deactivates (Active = false) and says so in its tool description — history is preserved.

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

Claude Desktop

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

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 (MCP registry schema) and smithery.yaml (Smithery) describe the server for discovery. 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.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选