Google Cloud BigQuery plugin (1.1.0): team CLIENT_SECRET is not used in the local OAuth token exchange ("The provided client secret is invalid")

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

With the official Google Cloud BigQuery plugin (1.1.0), our team admin set CLIENT_ID and CLIENT_SECRET in the dashboard plugin settings. On a member’s desktop Cursor, the Google sign-in completes, but the token exchange always fails:

[MCPService] createClient completed for server: plugin-google-cloud-bigquery-google-cloud-bigquery, connected=false, statusType=error, error=OAuth token exchange failed: The provided client secret is invalid.

The plugin README says the secret “stays on Cursor’s backend; it is never sent to members’ machines”. However, the OAuth callback goes to http://localhost:8787/callback, and the state parameter contains "surface":"mcp_process", so the exchange seems to run in the local MCP process. It looks like the local exchange is not using the team secret (a non-empty but wrong value is sent).

Steps to Reproduce

  1. In Google Cloud, create an OAuth client (type: Web application) with redirect URIs https://www.cursor.com/agents/mcp/oauth/callback and http://localhost:8787/callback. The OAuth consent screen is Internal and includes the https://www.googleapis.com/auth/bigquery scope.
  2. As team admin, add the Google Cloud BigQuery plugin to the team and set CLIENT_ID / CLIENT_SECRET in its settings.
  3. As a member on desktop Cursor, install the plugin and click Connect.
  4. Sign in with Google. The browser returns to localhost, then the connection fails with the error above.

Expected Behavior

Members sign in under the team’s OAuth client and connect, without the secret being distributed to their machines (as described in the plugin README).

Operating System

MacOS

Version Information

Version: 3.27.14
VSCode Version: 1.128.0
Commit: 69b724ebc67ec522c1b5d287a5025f7a7e81be90
Date: 2026-10-23T21:46:59.851Z
OS: macOS 26.6.2 (arm64)

Additional Information

What we verified

  • The secret is correct. Calling Google’s token endpoint directly with the same client ID/secret and a dummy code returns invalid_grant (“Malformed auth code.”). With a deliberately wrong secret it returns invalid_client / “The provided client secret is invalid.” (the exact message Cursor shows). With no secret it returns “client_secret is missing.” So Cursor sends a non-empty value that is not the team secret.
  • Re-entering the secret in the dashboard (twice) does not help.
  • The member-side Configure dialog shows the Client ID filled in and the Client secret empty. Entering the secret there and saving does not help either.
  • The same client works with static OAuth in ~/.cursor/mcp.json (url https://bigquery.googleapis.com/mcp, auth with CLIENT_ID / CLIENT_SECRET, scopes https://www.googleapis.com/auth/bigquery). It connects (9 tools) and queries work. So the client, the secret, the consent screen and Google-side IAM are fine.

Question
On desktop, is the token exchange for team plugin variables supposed to go through Cursor’s backend? Here it seems to run in the local MCP process.

Environment

  • Plugin: google-cloud-bigquery 1.1.0 (cursor/plugins, third_party/google-cloud-bigquery)
  • Plan: Teams
  • Workaround: static OAuth in personal ~/.cursor/mcp.json. This requires distributing the client secret to every member, so we can’t roll it out team-wide.

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey @Kosuke_Sakihama, thanks for the detailed report!

Your read is right: team OAuth clients for this plugin don’t work for members on desktop yet, so re-entering the secret won’t help. It’s not your OAuth client or Google setup. We’ve let the team know, and this is an issue we’re tracking.

For now, the static ~/.cursor/mcp.json setup you tested is the working path on desktop. If sharing the secret is the blocker, a Google Desktop app client may fit better, since Google doesn’t treat those secrets as confidential. If your team uses Cloud Agents, sign-in there may work with the team client, though I haven’t confirmed that for BigQuery yet.

I’ll post here when there’s an update.