qb-mcp

qb-mcp

An MCP server that enables AI agents to interact with QuickBooks Online accounts to manage invoices, customers, payments, and financial reports. It provides 20 tools to automate accounting workflows and retrieve financial data through natural language interfaces.

Category
访问服务器

README

qb-mcp — QuickBooks Online MCP Server

A premium Model Context Protocol (MCP) server that lets AI agents (Claude, Cursor, Cline, etc.) interact with your QuickBooks Online account.

Features

20 tools covering the full QuickBooks Online workflow:

Category Tools
Invoices list_invoices, create_invoice, get_invoice, send_invoice
Customers list_customers, create_customer, get_customer
Payments record_payment, list_payments
Accounts list_accounts
Reports get_profit_loss, get_balance_sheet
Expenses create_expense, list_expenses
Items list_items, create_item
Vendors list_vendors, create_vendor
Bills create_bill, list_bills

Prerequisites

  • Node.js 18 or later
  • A QuickBooks Online account (sandbox or production)
  • An Intuit Developer account with an OAuth 2.0 app

Setup

1. Create an Intuit Developer App

  1. Go to developer.intuit.com and sign in (or create an account).
  2. Navigate to Dashboard → Create an app.
  3. Select QuickBooks Online and Payments as the platform.
  4. Give your app a name (e.g., "MCP Server").
  5. Under Keys & credentials, note your Client ID and Client Secret.
  6. Add http://localhost:3000/callback as a Redirect URI.
  7. Under Scopes, ensure com.intuit.quickbooks.accounting is selected.

2. Get Your Sandbox Company ID

  1. In the Intuit Developer dashboard, go to Sandbox in the left sidebar.
  2. You'll see a sandbox company — note the Company ID (also called Realm ID).
  3. You can also find this in the URL when logged into QuickBooks Online: https://app.qbo.intuit.com/app/homepage?companyId=XXXXXXXXX.

3. Get OAuth Tokens

For initial setup, you'll need to complete the OAuth 2.0 authorization flow to get your access and refresh tokens:

  1. Visit the Intuit OAuth Playground (or use the Postman collection).
  2. Select your app and the com.intuit.quickbooks.accounting scope.
  3. Authorize and connect to your sandbox company.
  4. Copy the Access Token and Refresh Token.

Note: Access tokens expire after 1 hour. The MCP server automatically refreshes them using the refresh token (valid for 100 days). After initial setup, tokens are stored in ~/.qb-mcp/tokens.json.

4. Install and Configure

# Clone and install
git clone <repo-url> qb-mcp
cd qb-mcp
npm install

# Configure environment
cp config/.env.example .env

Edit .env with your credentials:

QB_CLIENT_ID=your_client_id
QB_CLIENT_SECRET=your_client_secret
QB_REDIRECT_URI=http://localhost:3000/callback
QB_REALM_ID=your_company_id
QB_ENVIRONMENT=sandbox
QB_ACCESS_TOKEN=your_access_token
QB_REFRESH_TOKEN=your_refresh_token

5. Build

npm run build

6. Connect to Claude Desktop

Add this to your Claude Desktop config file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "quickbooks": {
      "command": "node",
      "args": ["/absolute/path/to/qb-mcp/dist/index.js"],
      "env": {
        "QB_CLIENT_ID": "your_client_id",
        "QB_CLIENT_SECRET": "your_client_secret",
        "QB_REALM_ID": "your_company_id",
        "QB_ENVIRONMENT": "sandbox",
        "QB_ACCESS_TOKEN": "your_access_token",
        "QB_REFRESH_TOKEN": "your_refresh_token"
      }
    }
  }
}

Alternatively, if you have a .env file in the project root, you can use:

{
  "mcpServers": {
    "quickbooks": {
      "command": "node",
      "args": ["/absolute/path/to/qb-mcp/dist/index.js"]
    }
  }
}

Restart Claude Desktop after updating the config. You should see the QuickBooks tools available in the tools menu.

Usage Examples

Once connected, you can ask your AI agent things like:

  • "List all unpaid invoices"
  • "Create an invoice for customer #42 with 2 hours of consulting at $150/hr"
  • "Show me the profit and loss report for last quarter"
  • "Record a $500 payment from customer #42 against invoice #1001"
  • "List all vendors"
  • "Create a bill from vendor #5 for $200 in office supplies"

Development

# Run in development mode (with tsx for hot-reload)
npm run dev

# Run tests
npm test

# Watch tests
npm run test:watch

# Type-check without building
npm run lint

# Build for production
npm run build

Switching to Production

  1. In your .env, change QB_ENVIRONMENT=production.
  2. Complete the OAuth flow against your real QuickBooks company (not sandbox).
  3. Update QB_REALM_ID to your production company ID.
  4. Update your access and refresh tokens.

Important: Always test thoroughly in sandbox before connecting to production data.

License

MIT

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选