MCP Gateway · Cursor
Connect BigQuery to Cursor
Writing a model or a query in the editor goes faster when the warehouse is one question away. Through the Speakeasy MCP Gateway, the Cursor agent can browse BigQuery datasets and tables, read column metadata for the model you're editing and test a query without opening the console. Cursor hooks fail closed, so a call Speakeasy can't check doesn't run.
- Category
- Data & analytics
- Tools
- 6
- Authentication
- OAuth
- Cursor
- Editor and terminal
Behind the MCP Gateway
Run BigQuery MCP behind the MCP Gateway
One URL for every agent, sign-in through your IdP, RBAC down to the tool, and every BigQuery call inspected and logged.
Before you start
What BigQuery needs first
A Google Cloud project administrator with IAM admin access does the BigQuery side of the setup.
- You need a Google Account that can administer the project and create OAuth credentials.
- Granting roles needs IAM admin access, such as Project IAM Admin.
- Billing is optional for initial setup.
- External apps in Testing allow at most 100 test users, and authorizations expire after seven days.
In BigQuery
- Enable the BigQuery API in the project.
- Grant each user MCP Tool User, BigQuery Job User, and BigQuery Data Viewer.
- Configure the OAuth consent screen as Internal or External.
- For External apps, add the BigQuery scope and test users, or publish the app.
- Create an OAuth client and copy its credentials.
Set up
Add BigQuery to Cursor in 4 steps
- 01
Add BigQuery from the catalog
An admin finds BigQuery in the MCP Catalog (MCP Gateway > MCP > Catalog) and clicks Add. Speakeasy registers the vendor's server as a remote MCP server and proxies sessions to it. Nothing is copied or re-hosted.
BigQuery uses OAuth. Servers that support dynamic client registration get their OAuth configuration applied automatically.
Where MCP-scoped policies are enabled, the install offers a recommended risk policy for the new server that detects secrets and PII and inspects tool requests and responses.
- 02
Choose who can use BigQuery
Give teams the
mcp:connectscope on the BigQuery server through team access or a role. The organization gateway works out each person's servers from their live access, so granting access adds BigQuery to their gateway on the next call, and removing it takes it away. - 03
Connect Cursor
Add the gateway to Cursor in one click from the Organization Gateway page.
On the Organization Gateway page in Speakeasy, choose Cursor under Install.
Click Add to Cursor to add the gateway to Cursor's MCP settings, then sign in when Cursor prompts you.
- 04
Sign in and use BigQuery from Cursor
The first time Cursor connects, it opens a browser so the person can sign in to Speakeasy through your identity provider.
BigQuery needs its own OAuth grant, so each person connects it once. Until they do, BigQuery calls fail while the rest of the gateway keeps working.
From then on, BigQuery's tools appear in Cursor, limited to what the person's access allows, and every call lands in the gateway's tool logs.
For a whole team, a Cursor team admin imports the plugin marketplace under Settings > Plugins > Import and turns on Serve Marketplace From Cursor, so members install without GitHub access.
Use cases
What Cursor users do with BigQuery
Browse datasets while writing a query
Ask Cursor which datasets the project has and which tables sit in each, so the names in your query come from the warehouse rather than memory.
Match model code to the table
When you edit an ORM model or a transformation file, Cursor reads the table's metadata and points out fields in the code that the table doesn't have.
Test a query from the editor
Highlight a query in a file and have Cursor run it read-only against the project, then show the first rows right next to the code.
Tools
6 tools
Each BigQuery tool can be allowed or denied per team and role at the MCP Gateway before Cursor sees it.
list_dataset_ids
List BigQuery dataset IDs in a Google Cloud project.
get_dataset_info
Get metadata information about a BigQuery dataset.
list_table_ids
List table ids in a BigQuery dataset.
get_table_info
Get metadata information about a BigQuery table.
execute_sql_readonly
Run a read-only SQL query in the project and return the result. Prefer this tool over execute_sql if possible.
execute_sql
Run a SQL query in the project and return the result. Prefer the execute_sql_readonly tool if possible.
Control
What Speakeasy can see and stop in Cursor
The gateway covers every client the same way. The rest depends on what Cursor exposes to Speakeasy.
Tool logs
Gateway
Every BigQuery call is logged with the person and the client that made it.
Access by role
Gateway
People reach only the BigQuery tools their team or role allows.
Request and response blocking
Gateway
A risk policy scoped to BigQuery can reject a tool request before it reaches the server, or withhold a result from Cursor. MCP-scoped policies are enabled per organization.
Prompt and tool-call blocking
Cursor
Cursor hooks send each prompt and tool call to Speakeasy, which allows or denies it before Cursor runs it, and fail closed.
User attribution
Cursor
Every Cursor hook event carries the user's email.
Budgets
Cursor
Spend limits can block Cursor traffic once a budget is reached. Connect the Cursor Admin API for dollar spend.
Device agent and MDM
Cursor
The device agent installs the marketplace and plugins and reapplies them every minute.
- Cursor Cloud agents need a checked-in
.cursor/hooks.json. Session and MCP-specific hooks don't run there. - After a plugin update, members run Developer: Reload Window.
Questions
Frequently asked questions
Why can't a new Cursor user authorize BigQuery?
Is each Cursor query tied to a person?
How do Cursor users get BigQuery?
Are BigQuery calls from Cursor logged?
Connect more