Here is the short answer: Grok connects to QuickBooks Online through an MCP server, and with DeepLedger's hosted server the setup is one URL and one sign-in. Grok gained custom MCP connectors on its paid tiers in mid-2026, which makes it the fourth major assistant after Claude, ChatGPT, and Gemini to plug into your own tools. This guide covers both routes: the grok.com connector for chatting with your books, and the xAI Responses API for agents you build yourself.
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 (first month free, no card required)
- For the chat route: a Grok plan that includes custom connectors. Custom connectors are not on the free plan; xAI's connector docs list the current tiers.
- 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, the terminal agent, supports remote MCP through the same connectors menu.
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 Keys 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 every call xAI makes to DeepLedger. allowed_tools restricts which of the 26 tools the model may call, which is a good idea for a read-only reporting agent:
"allowed_tools": ["qbCompanyProfile", "qbReports", "qbFetchTransactions", "qbMasterData"]
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 are as xAI documents them. The require_approval and connector_id parameters from OpenAI's Responses API are not supported on xAI's endpoint, so leave them out.
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, reads Acme's profile back from QuickBooks as proof, and Grok confirms the company by name before running the report. Every later answer carries the company it came from.
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.
Recording follows DeepLedger's protocol, which lives in the server, not in the prompt. Before a bill, expense, invoice, or payment is written, the tools look up the vendor or customer, check the last 15 days for a duplicate, and check for an open document that should be paid or closed instead of creating a new one. When categorization is not defensible from QuickBooks history, Grok opens a review task with its reasoning instead of guessing, and a person approves or corrects it in the portal.
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.
- Duplicate checks before every write, plus the wrong-document-type checks that catch an expense recorded against a vendor who has an open bill.
- Human review for anything uncertain, through the shared task list in the portal.
- A complete log. Every tool call is recorded in DeepLedger's activity log beside QuickBooks Online's own audit log, with the person behind the connection and the company it ran against.
- 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. Custom connectors are a paid-tier feature. Check your plan against xAI's connector docs.
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
DeepLedger connects QuickBooks Online to Grok and any MCP-capable client, with human review built into the workflow and a complete audit trail. The first month is free, no credit card required.