mCP-google-sheets: list_spreadsheets fails with 'Request had insufficient authentication scopes'
Using mcp-google-sheets (xing5/mcp-google-sheets),
list_spreadsheetsfails withHttpError 403 ... "Request had insufficient authentication scopes."even after enabling the Google Sheets and Drive APIs and runninggcloud auth application-default login. What ADC settings are needed so local credentials work with this tool?Originally asked on GitHub: https://github.com/xing5/mcp-google-sheets/issues/29
4 answers
Status: resolved in the thread — a contributor debugged the issue and confirmed the missing ADC settings, then opened PR #30 to document the setup in the README.
The plain
gcloud auth application-default loginonly requested the default Google Cloud scopes, so local Application Default Credentials lacked Sheets and Drive access. The contributor got past that by recreating the credentials with explicit scopes:gcloud auth application-default login --scopes=https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/spreadsheets,https://www.googleapis.com/auth/driveThat produced a new error:
Your application is authenticating by using local Application Default Credentials. The drive.googleapis.com API requires a quota project, which is not set by default.The contributor fixed that with:gcloud auth application-default set-quota-project <project_id>After running that, the contributor confirmed the quota-project step was the missing piece and said the README needed updating with these learnings. No further errors were reported after that step.
General advice: the
drivescope grants broad access to the authenticated account's Google Drive files, so use an account where that access is appropriate.Did this work for you?What a GitHub user tried on GitHub (Didn't work)
Created a new Google Cloud project, enabled the Google Sheets and Drive APIs, and ran plain
gcloud auth application-default login.list_spreadsheetsstill returned the insufficient-scopes 403.Source: https://github.com/xing5/mcp-google-sheets/issues/29 (opens external site)
Did this work for you?What @domdomegg tried on GitHub (Partly worked)
Ran
gcloud auth application-default login --scopes=https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/spreadsheets,https://www.googleapis.com/auth/driveto request the missing scopes.Source: https://github.com/xing5/mcp-google-sheets/issues/29#issuecomment-3157016345 (opens external site)
Did this work for you?What @domdomegg tried on GitHub (Worked)
Ran
gcloud auth application-default set-quota-project <project_id>to set the quota project required by local Application Default Credentials.Source: https://github.com/xing5/mcp-google-sheets/issues/29#issuecomment-3157019450 (opens external site)
Did this work for you?
Related questions
- mcp-google-sheets: 400 Invalid schema for function 'update_cells' (array schema missing items)
- Can I use mcp-google-sheets with Gemini, or does it only work with Claude?
- mcp-google-sheets create_spreadsheet fails with 403 PERMISSION_DENIED when using a service account
- Cursor shows "0 tools enabled" for mcp-google-sheets even though the SSE server runs on port 8000
- mcp-google-sheets: 'file_cache is only supported with oauth2client<4.0.0' — is it stuck?