Grok connects to QuickBooks Online through DeepLedger's hosted MCP server. This single guide covers the Grok chat connector, the xAI Responses API for agents you build yourself, and the separate plugin requirements for Grok Bot. They share the Grok family, but they do not share one setup screen.
The mechanics are the same as for Claude and ChatGPT, because all three reach the same server.
What You Are Connecting
DeepLedger runs a hosted QuickBooks MCP server at:
https://mcp.deepledger.ai/mcp
It exposes QuickBooks Online as 26 accounting-shaped tools: bills, invoices, payments, journal entries, deposits, transfers, reports, master data, and attachments, plus platform tools for the bank feed, documents, per-client memory, a shared human and AI task list, guided workflows, and the month-end close.
The server holds the QuickBooks connection, which a QuickBooks admin authorizes once from the DeepLedger portal through Intuit's own OAuth. Grok never sees Intuit credentials. It authenticates to DeepLedger as you, and reaches only the companies you can open in the portal.
Before You Start
- A DeepLedger account with at least one QuickBooks Online company connected
- For the chat route: access to the Custom option at grok.com/connectors. xAI's connector documentation says connectors are available to all Grok users; Business and Enterprise teams need admin provisioning.
- For the API route: an xAI API key
Route 1: Grok Custom Connector (Chat)
- Open grok.com/connectors while signed in to Grok.
- Choose New Connector, then Custom.
- Paste the server URL:
https://mcp.deepledger.ai/mcp. - Complete the authentication step. Grok sends you to DeepLedger's sign-in page; log in with your DeepLedger account. There is no company to pick at this step, because the connection belongs to you and you choose the company inside the chat.
- Start a new conversation and confirm the tools loaded:
Which company am I in?
Grok reads the company profile and tells you the company name, country, fiscal year start, and the settings that shape bookkeeping work: sales tax on or off, class tracking, the book close date. It also says how many companies your connection can reach.
The server must be reachable over the public internet, which DeepLedger's is. Grok Bot has a separate plugin workflow, described below.
Grok Bot: Connect Through Plugins
Grok Bot is xAI's app for agents working on a persistent cloud computer, not a terminal-only version of Grok. Its connectors appear as Plugins. The official app connection instructions describe this flow:
- Open Settings → Plugins and look through the connectors available to your account.
- If a DeepLedger-compatible connection is available, choose Add and complete the requested authentication in your browser.
- Attach the installed connector to a task using
@, then ask which QuickBooks company is active before requesting accounting work.
Availability matters: we have not confirmed a DeepLedger listing in Grok Bot's plugin catalog. xAI's documentation does not describe the Grok chat custom-URL form as a Grok Bot setup option. Do not assume that pasting the MCP URL into the chat creates a connection.
Grok Bot inherits connector policies from your Cursor account, and installed connections are account-wide rather than private to an individual Bot. Check the team and enterprise requirements before sharing access. If the required plugin is unavailable or blocked, use the Grok chat route or the xAI API route in this guide instead.
Route 2: xAI Responses API (Agents)
For an agent you run yourself, xAI's API supports remote MCP servers directly. Add a tool of type mcp and xAI handles the MCP session server-side; your code sees ordinary tool calls in the response.
First, create a DeepLedger API key. In the portal, go to Settings → API Access and create one. The key acts as you: it reaches every company you can access and works in your active company. Put it in an environment variable, never in code.
export XAI_API_KEY=...
export DEEPLEDGER_API_KEY=dl_live_...
A minimal request:
curl https://api.x.ai/v1/responses \
-H "Authorization: Bearer $XAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-4.6",
"input": [{"role": "user", "content": "Which companies can I work in, and which one is active?"}],
"tools": [{
"type": "mcp",
"server_url": "https://mcp.deepledger.ai/mcp",
"server_label": "deepledger",
"server_description": "QuickBooks Online bookkeeping tools: companies, reports, transactions, master data, review tasks",
"authorization": "'"$DEEPLEDGER_API_KEY"'"
}]
}'
The authorization field becomes the Authorization header on calls xAI makes to DeepLedger. For a reporting workflow, allowed_tools can limit the tools this client exposes to the model:
"allowed_tools": ["qbCompanyProfile", "qbReports", "qbFetchTransactions"]
This is a client tool filter, not a read-only permission on the API key. The company tool can also switch your active company, which is shared across your connections. Confirm the intended company before each workflow.
The same tool definition works from the xAI Python SDK:
import os
from xai_sdk import Client
from xai_sdk.tools import mcp
client = Client(api_key=os.environ["XAI_API_KEY"])
chat = client.chat.create(
model="grok-4.6",
tools=[mcp(
server_url="https://mcp.deepledger.ai/mcp",
server_label="deepledger",
authorization=os.environ["DEEPLEDGER_API_KEY"],
)],
)
Field names above follow xAI's remote MCP documentation. The require_approval and connector_id parameters from OpenAI's Responses API are not supported on xAI's endpoint, so leave them out. The native Python SDK calls its tool filter allowed_tool_names, while the Responses API uses allowed_tools.
Working in More Than One Company
One DeepLedger connection reaches every QuickBooks company you can access, and you switch by asking. In Grok:
Switch to Acme Consulting and show me the aging report.
Grok calls the company tool, DeepLedger moves your active company, and reads Acme's profile back from QuickBooks. Ask Grok to confirm that company before running the report. Your active company is shared across connected clients, so another session can change it.
For an API agent, the switch is the qbCompanyProfile tool with operation: "switch" and either organizationId or an unambiguous name. operation: "list" returns everything the key can reach. The full model, including what happens when the active company is changed from the portal mid-run, is in one connection, every QuickBooks company.
What Grok Can Do After Connecting
Reads need no approval. Ask for a P&L, a balance sheet, aging, a vendor's history, or the chart of accounts, and Grok runs the report and explains it.
DeepLedger's supported recording paths include server-side checks for duplicates and open documents. Those checks do not replace human judgment: instruct your AI agent to explain proposed entries and route uncertain categorization to a review task. Review the company, amount, and accounting treatment before authorizing a write.
Voids and deletes: there is no delete tool. Voidable document types can be voided, with confirmation, and the record stays for the audit trail.
The Guardrails Underneath
- No delete tool, ever. Posted transactions cannot be removed through DeepLedger.
- Checks on supported recording paths, including duplicate and open-document checks before recording common transaction types.
- Human review for anything uncertain, through the shared task list in the portal.
- Activity history. Use DeepLedger's activity history alongside QuickBooks Online's audit log to review work. Do not treat either the AI's summary or an activity entry as a substitute for checking the recorded transaction.
- Revocation. Remove the connector in Grok, revoke the grant or the API key in DeepLedger, or disconnect the QuickBooks company. Any one of them stops access.
More on why the safety has to live in the tool layer: AI write access to QuickBooks, safely.
Troubleshooting
Grok says it cannot see a connector option. Check the current connector instructions and ensure you are signed in at grok.com/connectors. Business and Enterprise members may need their admin to provision access. Grok Bot uses its separate Plugins screen.
Grok says the connection is bound to one company. It is holding an older copy of the tool list. Remove the connector and add it again, or ask "which company am I in?"; the answer tells it how many companies it can reach and how to switch.
A switch reports that QuickBooks needs a reconnect. The switch itself succeeded. That company's QuickBooks token has expired or been revoked on Intuit's side, and someone with admin access needs to reconnect it from the portal under Settings, Companies. Tasks, documents, memory, and the bank feed keep working for that company in the meantime.
The API returns an authentication error from the MCP server. Check that authorization carries a current DeepLedger API key beginning with dl_live_, not your xAI key, and that the key has not been revoked or expired in the portal.
Related Guides
- Connect Claude to QuickBooks Online
- Connect ChatGPT to QuickBooks Online
- Connect Microsoft Copilot to QuickBooks Online
- Connect CrewAI to QuickBooks Online
- Switch between QuickBooks companies in one connection
Find more connection options on AI Platforms & Integrations, or review DeepLedger pricing before getting started.
