
Claude Code的快取 Books Online MCP 服务器——8个自动化工具以 ~200-token 目标提取取代50K-token快取
概览
MCP(模式上下文协议)服务器,为QuickBooks在线自动化提供Claude Code本土工具. 将50K-token浏览器 snapshot回路替换为目标DOM提取(~200-500个令牌)并复合Playwright动作,在一个工具调用中完成整个工作流程. - Python 3.10+ - mcp和剧作家软件包 - Chrome 以远程调试运行:google-chrome --remote-debugging-port=9222 该服务器默认在端口9222上通过CDP(Chrome DevTools Protocols)与Chrome连接. 在服务器中设置 CDP PORT 变量 。 如果使用不同的端口, py 。 - : JavaScript 函数通过 page. valuate () 使用 ARIA 选择器从 QB 的 DOM 返回收缩 JSON - : 使用 getByRole () 和 getByLabel () 完成 Playwright 工作流程 - 在 QB 页面中幸存的 ARIA- 稳定的选择器 重载 - : PLAYBOOK. md 包含完整引用, 用于手动使用浏览器 valuer/ browser run code 1.克洛德称qb 接收 支付(发票 num="6865",金额="22500",方法="ACH") 2.
概述(AI 翻译)
MCP(模式上下文协议)服务器,为QuickBooks在线自动化提供Claude Code本土工具.
将50K-token browser_snapshot回路替换为目标DOM取出(~200-500令牌)并复合Playwright动作,在一个工具调用中完成整个工作流程.
□ 工具
- 工具 * * 描述 * *
|-|-|-.
请检查access-date=中的日期值 (帮助) QQ
qb_page_state请检查access-date=中的日期值 (~50个令牌) QQ QQ[ [T2]] 列出所有带有可选客户过滤器的可见发票 QQ 请检查access-date=中的日期值 (帮助)
| qb_create_invoice Create 与行项目一起创建新的发票 |
删除现有发票中的一行
| [[T7] | 编辑现有付款额|
QQ qb_report 运行任何有日期范围选项的QBO报告(30+报告类型)
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
qb-auto — QuickBooks MCP Server
MCP (Model Context Protocol) server that gives Claude Code native tools for QuickBooks Online automation.
Replaces 50K-token browser_snapshot round-trips with targeted DOM extraction (~200-500 tokens) and compound Playwright actions that complete entire workflows in one tool call.
Tools
| Tool | Description |
|---|---|
qb_page_state |
Check current page/dialog state (~50 tokens) |
qb_list_invoices |
List all visible invoices with optional customer filter |
qb_invoice_state |
Inspect an open invoice form (line items, totals) |
qb_receive_payment |
Record a payment (navigate → fill → save → confirm) |
qb_create_invoice |
Create a new invoice with line items |
qb_delete_line_item |
Delete a line from an existing invoice |
qb_edit_payment_amount |
Edit an existing payment amount |
qb_batch_receive_payments |
Record multiple payments in sequence |
qb_report |
Run any QBO report (30+ report types) with date range options |
qb_report_pnl |
Profit & Loss (income statement) |
qb_report_balance_sheet |
Balance Sheet (assets, liabilities, equity) |
qb_report_ar_aging |
A/R Aging Summary (who owes, how overdue) |
qb_report_customer_balance |
Customer Balance Summary |
qb_report_open_invoices |
Open (unpaid) Invoices |
qb_report_vendor_balance |
Vendor Balance Summary |
Token Savings
| Workflow | Before (snapshots) | After (MCP) | Savings |
|---|---|---|---|
| Receive Payment | ~290K tokens | ~13K tokens | 95% |
| Create Invoice | ~350K tokens | ~18K tokens | 95% |
| Full session (5 ops) | ~500K tokens | ~45K tokens | 91% |
Setup
Prerequisites
- Python 3.10+
mcpandplaywrightpackages- Chrome running with remote debugging:
google-chrome --remote-debugging-port=9222
Install
pip install mcp playwright
playwright install chromium
Register with Claude Code
Add to ~/.mcp.json:
{
"mcpServers": {
"quickbooks": {
"type": "stdio",
"command": "python3",
"args": ["/path/to/qb-auto/server.py"]
}
}
}
Configuration
The server connects to Chrome via CDP (Chrome DevTools Protocol) on port 9222 by default. Set the CDP_PORT variable in server.py if using a different port.
Architecture
- Extractors: JavaScript functions injected via
page.evaluate()that return compact JSON from QB’s DOM using ARIA selectors - Actions: Complete Playwright workflows using
getByRole()andgetByLabel()— ARIA-stable selectors that survive QB page reloads - Playbook:
PLAYBOOK.mdcontains the full reference for manual use withbrowser_evaluate/browser_run_code
Files
| File | Purpose |
|---|
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"quickbooks": {
"type": "stdio",
"command": "python3",
"args": ["/path/to/qb-auto/server.py"]
}
}
}