Project for querying QuickBooks Online data via the API and MCP server. Use this when QuickBooks built-in reports don't meet your needs and you have specific queries to run.
quickbooks_api/
├── mcp-server/ # Intuit's official QuickBooks MCP server (Node.js)
├── scripts/ # Python scripts for direct API queries
├── .env.example # Template for credentials
└── README.md
- Go to Intuit Developer Portal
- Create a new app (or use an existing one)
- Get Client ID and Client Secret from the app's keys section
- Add
http://localhost:8000/callbackto Redirect URIs
cd mcp-server
npm installCopy mcp-server/.env and fill in your credentials. For production data, set:
QUICKBOOKS_ENVIRONMENT=production
Add the MCP server to Cursor (after npm run build in mcp-server/):
- Open Cursor Settings → MCP
- Add a new server. The server reads credentials from
mcp-server/.env— configurecwdso it finds that file:
{
"quickbooks": {
"command": "node",
"args": ["dist/index.js"],
"cwd": "/Users/toddweidman/quickbooks_api/mcp-server"
}
}cd scripts
pip install -r requirements.txtCopy .env.example to .env in the project root and add your credentials. Run example queries:
python query_customers.pyQuickBooks uses SQL-like syntax with limitations:
SELECT * FROM Customer WHERE active = true
SELECT * FROM Invoice WHERE TxnDate >= '2024-01-01' ORDERBY metadata.lastupdatedtime DESC
SELECT * FROM Bill STARTPOSITION 1 MAXRESULTS 100Limitations: No JOIN, GROUP BY, or OR in WHERE. Use STARTPOSITION / MAXRESULTS for pagination.