Why ask AI about BigQuery instead of live Odoo
Questions like “revenue by month for the last 12 months” or “which customers owe us the most, and how much is over 60 days late?” scan a lot of history. Answering them from BigQuery keeps that load off your production database and lets the AI join Odoo with Google Analytics or Ads data. Live work — updating a record, drafting a quote — belongs to the MCP Server for Odoo instead.
Step 1: put Odoo in BigQuery with descriptions the AI can read
The BigQuery Connector syncs Odoo into your own Google Cloud project. Its Analytics Starter Pack creates up to 17 tables (sales, invoices, journal items, purchases, stock, CRM, POS, timesheets) and nine ready-made views such as receivables aging and a monthly P&L. Each column is written with its Odoo label, help text, the meaning of status keys and the table it joins — the context an AI needs to write correct SQL.
Step 2: grant read-only roles
The MCP endpoint is https://bigquery.googleapis.com/mcp and is available once the BigQuery API is enabled. Each person (or agent identity) needs roles/mcp.toolUser and roles/bigquery.jobUser on the project, plus roles/bigquery.dataViewer on the Odoo dataset only:
gcloud projects add-iam-policy-binding YOUR_PROJECT \ --member="user:[email protected]" --role="roles/mcp.toolUser" gcloud projects add-iam-policy-binding YOUR_PROJECT \ --member="user:[email protected]" --role="roles/bigquery.jobUser"
Then grant read access to the Odoo dataset only, in the BigQuery console:
GRANT `roles/bigquery.dataViewer` ON SCHEMA `YOUR_PROJECT.odoo` TO "user:[email protected]";
Step 3: connect your assistant
Claude (claude.ai, Desktop, Code)
In Google Cloud, create an OAuth client of type Web application with redirect URI https://claude.ai/api/mcp/auth_callback and JavaScript origin https://claude.ai. In Claude, open Settings → Connectors → Add custom connector, enter https://bigquery.googleapis.com/mcp, and put the client ID and secret under Advanced settings.
ChatGPT (Business plans)
Use the same OAuth client with redirect URI https://chatgpt.com/connector_platform_oauth_redirect.
Gemini CLI
Run gcloud auth application-default login, then save this as ~/.gemini/extensions/odoo-bigquery/gemini-extension.json:
{
"name": "odoo-bigquery",
"version": "1.0.0",
"mcpServers": {
"bigquery": {
"httpUrl": "https://bigquery.googleapis.com/mcp",
"authProviderType": "google_credentials",
"oauth": { "scopes": ["https://www.googleapis.com/auth/bigquery"] },
"timeout": 30000,
"headers": { "x-goog-user-project": "YOUR_PROJECT" }
}
}
}Step 4: keep it read-only and auditable
- The server’s
execute_sql_readonlytool runs only SELECT queries. - Its
execute_sqltool can change data — block it with an IAM deny policy for MCP read-write tools. - Queries return at most 3,000 rows and stop after 3 minutes.
- Every query the server runs is labelled
goog-mcp-server: truein BigQuery job history.
Step 5: give the assistant your data dictionary
In Odoo, Download AI Data Dictionary produces a Markdown file listing every table, column, join and ready-made view, with the rules for signs, currencies and status keys. Add it to a Claude Project, a ChatGPT project or a Gemini Gem so answers come out right the first time.
Questions to try
- Revenue by month for the last 12 months. Which month grew fastest?
- Which 10 customers owe us the most, and how much is over 60 days late?
- Which products sold more this quarter than the same quarter last year?
- Net profit by month this year, and the three expense accounts that grew most.
- Which vendors did we spend the most with in the last 6 months?
Check important figures against Odoo before acting on them: the assistant chooses the SQL, and BigQuery reflects the last sync.
Frequently asked questions
Can Claude query my Odoo data in BigQuery?
Yes. Google runs an official, managed BigQuery MCP server at https://bigquery.googleapis.com/mcp. Once Odoo data is in BigQuery, add that endpoint to Claude as a custom connector with a Google OAuth client, and Claude can list the Odoo tables, read their descriptions and run SQL within the roles you grant.
Is this different from connecting Claude directly to Odoo?
Yes. The BigQuery route answers questions about history — trends, year-over-year, aging, P&L — from a copy of the data, without load on the live Odoo database. A direct Odoo MCP server works with live records and can take actions such as drafting a quote, with approvals. Many teams use both.
How do I keep the AI read-only?
Grant BigQuery Data Viewer on the Odoo dataset only, plus MCP Tool User and BigQuery Job User on the project. Use the server’s execute_sql_readonly tool, which runs only SELECT queries, and block execute_sql (which can change data) with an IAM deny policy for MCP read-write tools.
Are there limits on what the AI can pull?
Queries through the BigQuery MCP server return at most 3,000 rows and stop after 3 minutes. Every query the server runs is labelled goog-mcp-server: true in BigQuery job history, so you can see and audit AI usage.
Does it work with Odoo Online?
The BigQuery Connector is an installable module, so it needs Odoo.sh or your own server. Odoo Online needs an external API pipeline into BigQuery instead; the BigQuery MCP part works the same once the data is there.
Continue in this topic
Set it up with us
Every BigQuery Connector purchase includes a free setup call: we connect your Google Cloud project, run the first sync and check the numbers together.
Book the setup call →