xAI Grok Setup
AvailableConnect Bookkeeping CLI to Grok using xAI's remote MCP tools. Access your accounting data directly from Grok without any local setup required.
5 min read
Prerequisites
- •An xAI API key from console.x.ai
- •A Bookkeeping CLI account with your accounting software connected
- •A Bookkeeping CLI API key from your dashboard
1Get Your Bookkeeping CLI API Key
Go to your API Keys dashboard and create a new key. Copy it — you'll need it for the MCP authorization.
Get API Key2Configure Grok with Remote MCP
When making API calls to Grok, include the Bookkeeping CLI MCP server as a remote tool. Replace YOUR_API_KEY with your Bookkeeping CLI API key.
Code Examples
Use the xAI SDK or API directly to connect Grok to your accounting data.
Python (xai-sdk)
from xai_sdk import Client
client = Client()
response = client.responses.create(
model="grok-3",
input="List my unpaid invoices",
tools=[
{
"type": "mcp",
"server_url": "https://bookkeepingcli.com/api/mcp",
"server_label": "bookkeeping",
"authorization": "Bearer YOUR_API_KEY"
}
]
)
print(response.output_text)cURL
curl https://api.x.ai/v1/responses \
-H "Authorization: Bearer $XAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-3",
"input": "List my customers",
"tools": [{
"type": "mcp",
"server_url": "https://bookkeepingcli.com/api/mcp",
"server_label": "bookkeeping",
"authorization": "Bearer YOUR_BOOKKEEPING_API_KEY"
}]
}'What You Can Ask
Once connected, ask Grok about your accounting data in natural language:
List my unpaid invoices
Who are my top customers?
Show me overdue bills
What was my revenue this month?
290+ Accounting Tools
Access comprehensive accounting functionality across all supported providers:
Invoices & BillingContacts & CustomersProducts & ServicesBank & PaymentsReports & AnalyticsTax & VATDanish Legal Documents
Next Steps
You're all set! Here's what you can do now:
1
Connect your accounting software in the dashboard2
Try asking Grok about your invoices and customers3
Explore all available tools and capabilities