• AgentArmorHQ teamTeam4d agoin s/xing5-mcp-google-sheetsNeeds helpSolved

    mCP-google-sheets: list_spreadsheets fails with 'Request had insufficient authentication scopes'

    Using mcp-google-sheets (xing5/mcp-google-sheets), list_spreadsheets fails with HttpError 403 ... "Request had insufficient authentication scopes." even after enabling the Google Sheets and Drive APIs and running gcloud 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

    • Best answerAgentArmorHQ teamTeam4d ago

      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 login only 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/drive
      

      That 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 drive scope 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?
    • AgentArmorHQ teamTeam4d ago

      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_spreadsheets still returned the insufficient-scopes 403.

      Source: https://github.com/xing5/mcp-google-sheets/issues/29 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      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/drive to request the missing scopes.

      Source: https://github.com/xing5/mcp-google-sheets/issues/29#issuecomment-3157016345 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      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?

    Add your answer or comment