摘要
让你的 AI 处理 QuickBooks Online:查询客户、供应商、产品和服务、发票、账单、付款和科目,读取单条记录,运行损益表、资产负债表以及应收和应付账龄报表,并创建客户和发票。使用 Intuit OAuth 登录,支持沙盒公司或正式公司。
引导式设置
2 分钟将 QuickBooks Online 连接到 Microsoft Copilot
开始 AnythingMCP Cloud 免费试用,在引导式设置中连接 QuickBooks Online,再把你的 MCP URL 添加到 Microsoft Copilot。无需代码,也无需自行运行服务器。
无需信用卡 · 7 天试用 · 提供自托管方案
试试这样问
QuickBooks Online 的示例提示
点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。
Claude 是 AI,可能会出错。请核对回答。
💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → QuickBooks Online、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无
git clone、无本地服务器。
QuickBooks Online + Microsoft Copilot
让你的 AI 处理 QuickBooks Online:查询客户、供应商、产品和服务、发票、账单、付款和科目,读取单条记录,运行损益表、资产负债表以及应收和应付账龄报表,并创建客户和发票。使用 Intuit OAuth 登录,支持沙盒公司或正式公司。
前提条件
完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:
QBO_CLIENT_ID, QBO_CLIENT_SECRET, QBO_REALM_ID, QBO_API_URL
步骤 1 — 获取凭证
- 登录 developer.intuit.com,打开 My Hub → App dashboard → Create an app,选择 QuickBooks Online and Payments,并选择权限范围 com.intuit.quickbooks.accounting。
- 在 Settings → Redirect URIs 下,为 Development 添加
https://cloud.anythingmcp.com/api/mcp-oauth/callback,之后再为 Production 添加。如果你自行托管 AnythingMCP,则改为填写https://your-anythingmcp-host/api/mcp-oauth/callback。URI 必须完全一致。 - 从 Keys & credentials 复制 Client ID 和 Client Secret,分别填入
QBO_CLIENT_ID和QBO_CLIENT_SECRET。开发密钥只能用于沙盒公司。生产密钥可用于真实公司;Intuit 会在一次简短的应用评估(应用仪表板上的一份问卷)后授予。 - 找到公司的 realm id(Company ID):在 QuickBooks 中点击齿轮图标,打开 Account and settings → Billing & subscription,复制 Company ID(去掉空格)。沙盒公司的 ID 位于开发者网站的 Sandboxes 下。把它填入
QBO_REALM_ID。 - 把
QBO_API_URL设为https://quickbooks.api.intuit.com(真实公司)或https://sandbox-quickbooks.api.intuit.com(沙盒公司)。它必须与密钥匹配:开发密钥对应沙盒 URL,生产密钥对应生产 URL。 - 安装连接器,在连接器页面点击 Authorize with Provider,登录 Intuit 并连接同一家公司。
- 先运行
qbo_get_company_info,在 AI 读取或写入任何内容之前核对公司名称。一个连接器只对应一家公司;如需连接第二家公司,请再安装一次。
保持登录状态:访问令牌有效期为一小时,会自动续期。刷新令牌如果 100 天未使用就会过期,并且每次授权最迟在 5 年后结束。届时,或者在 QuickBooks 中断开了该应用时,请再次点击 Authorize with Provider。不要同时在另一个工具中使用同一个 Intuit 应用:Intuit 大约每天替换一次刷新令牌,两者中总有一个会留下旧令牌。
权限和只读设置:权限范围 com.intuit.quickbooks.accounting 提供会计数据的读写权限,以登录的 QuickBooks 用户的角色所允许的范围为限。Intuit 没有只读的会计权限范围。如需只读设置,请用一个角色无法创建交易的用户登录,并停用 qbo_create_customer、qbo_update_customer 和 qbo_create_invoice。
安装时默认关闭:qbo_send_invoice(以你公司的名义通过邮件把发票发给客户)和 qbo_delete_invoice。只有在 AI 需要发送或删除发票时才打开它们。
发票立即入账:QuickBooks 没有发票草稿。AI 创建的发票会立即增加客户的余额并出现在报表中,但不会通过邮件发出。客户无法删除,只能设为停用。
客户名称:客户的显示名称在客户、供应商和员工之间必须唯一,并且不能包含冒号(QuickBooks 用冒号分隔子客户)、制表符或换行符。
常见错误:401 AuthenticationFailed(3200)表示授权已过期或被撤销,或者 QBO_API_URL 与密钥不匹配:请检查 URL,然后再次点击 Authorize with Provider。403 ApplicationAuthorizationFailed(3100)表示 realm id 属于此次登录未获授权的公司,或者用户的角色缺少访问权限。400 QueryParserError 表示查询有语法错误。6240 Duplicate Name Exists Error 表示显示名称已被占用;2040 Invalid String 表示名称包含冒号、制表符或换行符;5010 Stale Object Error 表示记录在此期间已被修改,需要重新读取。429 表示达到了每分钟 500 个请求的限制:请等待一分钟。
连接器不处理发票 PDF 和附件、付款记录、银行馈送、薪资或 QuickBooks Desktop,除发票外不删除任何内容。
步骤 2 — 安装 adapter
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
步骤 3 — 在 Microsoft Copilot 中添加连接器
你的服务器 URL: 在 AnythingMCP 中打开 MCP Servers → 此连接器所在的服务器,复制它的 URL(
https://cloud.anythingmcp.com/mcp/…)。本指南中出现YOUR_SERVER_ID的地方都用它替换。
Microsoft Copilot 通过在 Copilot Studio 中构建的智能体使用 MCP 服务器:把 AnythingMCP 作为工具添加到智能体,然后把智能体发布到 Microsoft 365 Copilot 和 Teams。Copilot Studio 从 Microsoft 的云端通过 Streamable HTTP 连接,AnythingMCP 支持这种方式。
- 在 Copilot Studio 中打开你的智能体(或新建一个),进入 Tools,选择 Add a tool → New tool → Model Context Protocol。
- 填写 Server name(例如
AnythingMCP)、说明连接器用途的 Server description,以及 Server URLhttps://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID。Copilot Studio 根据描述决定何时调用该服务器。 - 身份验证选择 API key,把 Type 设为 Header,请求头名称填
X-API-Key,然后选择 Create。 - 在 Add tool 中选择 Create a new connection,粘贴 AnythingMCP 的 MCP API 密钥(MCP Servers → 你的服务器 → API keys),然后选择 Add to agent。
- 在智能体的 Test 窗格中试一试:提出需要用到
QuickBooks Online的工具的请求。 - 选择 Publish,然后进入 Channels → Microsoft 365 and Microsoft Teams,保持勾选 Make agent available in Microsoft Copilot,再选择 Add channel。See agent in Teams 会为你安装该智能体;在 Microsoft 365 Copilot 中输入 @ 并选择该智能体。
希望每个用户各自登录?请选择 OAuth 2.0 → Dynamic discovery 代替 API 密钥:每个用户会在智能体首次调用时登录 AnythingMCP。
自托管?请用你实例的公网 HTTPS 地址替换 https://cloud.anythingmcp.com。Copilot Studio 从 Microsoft 的云端连接,因此 localhost 无法使用。
可用工具
| Tool | What it does |
|---|---|
qbo_get_company_info | Read the connected company: CompanyName, LegalName, addresses, email, phone, Country, FiscalYearStartMonth, the company's start date and… |
qbo_query | Run a read-only QuickBooks query (SQL-like, one entity, no joins): e.g. "select * from Invoice where Balance > '0' orderby DueDate… |
qbo_get_customer | Read one customer by its Id (the numeric Id from qbo_query, not a document number or name), with contact details, addresses, Balance and… |
qbo_get_invoice | Read one invoice by its Id (the numeric Id from qbo_query, not a document number or name), with its lines, totals, Balance, due date… |
qbo_get_item | Read one item (product or service) by its Id (the numeric Id from qbo_query, not a document number or name), with prices, income and… |
qbo_get_vendor | Read one vendor by its Id (the numeric Id from qbo_query, not a document number or name), with contact details, addresses and Balance |
qbo_get_bill | Read one bill (a vendor's invoice to the company) by its Id (the numeric Id from qbo_query, not a document number or name), with its lines… |
qbo_get_payment | Read one customer payment by its Id (the numeric Id from qbo_query, not a document number or name), with the invoices it was applied to… |
qbo_create_customer | Create a customer |
qbo_update_customer | Change some fields of a customer (sparse update); fields not named keep their values |
qbo_create_invoice | Create an invoice for a customer |
qbo_send_invoice | Email an invoice to the customer as a PDF from QuickBooks, to the invoice's BillEmail or to send_to (which also becomes the invoice's… |
qbo_delete_invoice | Delete an invoice permanently (it disappears from reports; QuickBooks keeps it in the audit log) |
qbo_report_profit_and_loss | Profit and Loss report (income, cost of goods sold, expenses, net income) for a period, as QuickBooks' report JSON: Header, Columns and… |
qbo_report_balance_sheet | Balance Sheet report (assets, liabilities, equity) as of the end of a period, as QuickBooks' report JSON with nested Rows |
qbo_report_aged_receivables | Aged Receivables summary: what each customer owes, split into Current, 1-30, 31-60, 61-90 and 91+ days past due, as of report_date (default… |
qbo_report_aged_payables | Aged Payables summary: what the company owes each vendor, split into Current, 1-30, 31-60, 61-90 and 91+ days past due, as of report_date… |
示例提示
- “哪些发票已经逾期?每位客户各欠多少钱?”
- “按月显示本财年的损益表。”
- “为 Acme Ltd 开一张发票:10 小时的“咨询”服务,30 天后到期。”
- “哪些供应商账单已逾期超过 60 天?”
FAQ
这适用于哪个 Copilot? 适用于工作中的 Microsoft 365 Copilot,通过 Copilot Studio 的智能体实现。面向个人账户的 Microsoft Copilot 应用无法添加自己的 MCP 服务器。
我需要什么? 一个可以使用 Copilot Studio 的工作账户(许可证或试用版),用于构建智能体。在 Microsoft 365 Copilot 或 Teams 中使用它的人需要拥有该智能体的访问权限:把它共享给他们,或请管理员为整个组织发布。如果你的组织对 Power Platform 连接器设置了数据策略,这些策略同样适用于 MCP 服务器。
智能体不调用工具。 检查请求头名称是否正好是 X-API-Key,密钥是否属于与 URL 相同的 MCP 服务器,并把 Server description 写得具体:Copilot Studio 根据它决定何时调用服务器。每次修改后重新发布智能体;在已打开的对话中输入 "start over" 即可使用新版本。
下一步
这份指南对你有帮助吗?