DeepLedger
Menu

Connect an agent

Connect Grok & Grok Bot to QuickBooks Online: Setup Guide

One guide to DeepLedger connections for Grok chat, the xAI Responses API, and Grok Bot via a custom MCP server in chat.

Published by DeepLedgerUpdated 9 min read

Grok connects to QuickBooks Online through DeepLedger's hosted MCP server. This single guide covers three separate routes: the Grok chat connector at grok.com/connectors, a custom MCP server you add in a Grok Bot chat, and the xAI Responses API for agents you build yourself. 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.

Using Intuit Enterprise Suite (IES)? DeepLedger also supports IES. Follow our Intuit Enterprise Suite connection guide for Grok for company authorization, setup and IES-specific limits.

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)

  1. Open grok.com/connectors while signed in to Grok.
  2. Choose New Connector, then Custom.
  3. Paste the server URL: https://mcp.deepledger.ai/mcp.
  4. 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.
  5. 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 uses a different path — a custom MCP server added in chat — described next. Do not use grok.com/connectors for Grok Bot.

Grok Bot: Add a Custom MCP Server in Chat

Grok Bot is xAI's app for agents working on a persistent cloud computer, not the same product as Grok chat on grok.com. Keep this route separate from Route 1 (grok.com/connectors) and Route 2 (the xAI Responses API).

DeepLedger is not in the Grok Bot plugin catalog. Do not look for it under Settings → Plugins, and do not expect pasting the MCP URL alone to finish the connection. The working path is to ask the bot to add DeepLedger as a custom MCP connector in the chat:

  1. In the Grok Bot chat, say:

Add a custom MCP server called DeepLedger at https://mcp.deepledger.ai/mcp

  1. Confirm when the bot asks.
  2. Click Authorize on the connect card, then sign in to DeepLedger in the browser that opens.
  3. Back in the bot chat, confirm the tools loaded:

Which company am I in?

The bot reads the company profile and tells you the company name and related bookkeeping settings, the same way Grok chat does after a connector is added.

Installed connections follow your account policies and can be shared across bots on that account. Check the team and enterprise requirements before sharing access. For a conversation in the Grok web or mobile app instead, use Route 1 above. For an agent you run yourself, use Route 2.

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.

Next step: verify one company and one report

In DeepLedger Settings → Companies, find the intended company. If it is not connected, choose Connect to QuickBooks and have an authorized person complete Intuit sign-in. Start with a demo company when testing a new AI provider; do not send private business reports until your organization has approved that provider and its data settings.

With DeepLedger enabled in your AI client, ask:

Using DeepLedger, list the companies I can access and identify the active company. Ask me which company to use. After I choose, select it and confirm its name and company identifier. Do not create or change accounting records.

Company selection can persist across your connected AI clients. Confirm it again when changing sessions; a company-bound credential may not allow switching. See selecting the right QuickBooks company.

Then replace the bracketed name with that confirmed company:

Using DeepLedger for [confirmed company], retrieve the profit and loss for September 1 through September 30, 2026, on an accrual basis. Show the returned company name and identifier, exact dates, accounting basis, currency, income, expenses and net income. Do not create or change accounting records. If the company or report settings cannot be confirmed, stop and explain the missing information.

In QuickBooks Online → Reports → Profit and Loss, run the report for the same company, September 1–30, 2026, accrual basis, currency and filters. Compare income, expenses and net income, then investigate any differing account lines. A successful tool response includes report data and matching context; a “connected” badge or an AI summary alone is not verification. If totals differ, correct the context and rerun before relying on the result. Follow the P&L analysis and verification workflow.

A read-only prompt is not read-only permissions. The connection can expose write tools; review permissions and proposed actions. After the report agrees, choose a real task from the journal-entry review workflow or overdue-invoice workflow, adapting the client-specific steps to your AI app.

Troubleshooting

Grok says it cannot see a connector option. For Grok chat, 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. For Grok Bot, DeepLedger is not in the plugin catalog — ask the bot in chat to add a custom MCP server named DeepLedger at https://mcp.deepledger.ai/mcp, then Authorize and sign in.

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.

Try your first bookkeeping task

Once connected, use these five Grok prompts for bills, expenses, invoices, deposits and reports. Each example names the evidence to provide and the result to check in QuickBooks.

Find more connection options on AI Platforms & Integrations, or review DeepLedger pricing before getting started.

Ready to get started?

Connect QuickBooks and try your first task with an AI agent.

Create an Account