setup-and-authenticate
Set up Google Cloud OAuth credentials and authenticate the Google Workspace MCP server so Kiro can read Drive, Docs, Sheets, and Slides. Use when first installing this power, when tool calls fail with authentication or permission errors, or when switching Google accounts.
- License 许可
- MIT
- 最近更新
- 2026-11-10
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- setup-and-authenticate
- license
- MIT
- metadata
- { "author": "krank", "version": "1.0.0" }
- description
- Set up Google Cloud OAuth credentials and authenticate the Google Workspace MCP server so Kiro can read Drive, Docs, Sheets, and Slides. Use when first installing this power, when tool calls fail with authentication or permission errors, or when switching Google accounts.
- compatibility
- Requires Node.js 18+ and npx. Works with Kiro on Windows, macOS, and Linux.
03 SKILL.md 正文
Set Up and Authenticate Google Workspace Access
Overview
This power connects Kiro to Google Drive, Docs, Sheets, and Slides through a
self-hosted MCP server (@piotr-agier/google-drive-mcp).
The server runs locally over stdio and holds its own OAuth credentials and
token, so nothing is sent to a third party — your Google identity and refresh
token stay on your machine.
This skill covers the one-time setup: creating a Google Cloud project, enabling
the APIs, creating an OAuth client, and completing the browser consent flow.
Once done, the read skill (read-workspace) can search and read your content.
Prerequisites Checklist
- [ ] Node.js 18 or newer installed (
node --version) - [ ]
npxavailable (ships with Node.js) - [ ] A Google account with access to the Drive/Docs/Sheets/Slides you want to read
- [ ] Ability to create a project in the Google Cloud Console
Step-by-Step Guide
1. Create a Google Cloud project
- Open the Google Cloud Console.
- Click the project selector at the top, then New Project.
- Name it something like
kiro-workspace-accessand click Create. - Make sure the new project is selected before continuing.
2. Enable the required APIs
In your project, enable these APIs (search each by name in the console, or use the links):
Reading Google Docs, Sheets, and Slides all still require the Drive API too, so enable all four.
3. Configure the OAuth consent screen
- Go to APIs & Services > OAuth consent screen (or Google Auth Platform > Branding).
- If prompted to get started, set:
- App name:
Kiro Workspace Access - User support email: your email
- Audience / User type: choose Internal if available; otherwise External.
- App name:
- If you chose External, add your own Google account under Test users. While the app is in "testing," only listed test users can authenticate.
Scopes (read-only recommended)
Under Data Access > Add or Remove Scopes, add the read scopes you need. For read-only access to everything this power targets, add:
https://www.googleapis.com/auth/drive.readonly
https://www.googleapis.com/auth/documents.readonly
https://www.googleapis.com/auth/spreadsheets.readonly
https://www.googleapis.com/auth/presentations.readonly
Use the narrowest scopes that cover your use. Add write scopes (for example
documents, spreadsheets, presentations, drive.file) only if you intend
to edit content, not just read it.
4. Create the OAuth client (Desktop app)
-
Go to APIs & Services > Credentials > Create Credentials > OAuth client ID.
-
Application type: Desktop app.
-
Name it (for example
kiro-desktop) and click Create. -
Click Download JSON and save the file. The MCP server looks for it at:
- macOS / Linux:
~/.config/google-drive-mcp/gcp-oauth.keys.json - Windows:
%USERPROFILE%\.config\google-drive-mcp\gcp-oauth.keys.json(in PowerShell:$env:USERPROFILE\.config\google-drive-mcp\gcp-oauth.keys.json)
- macOS / Linux:
Create the google-drive-mcp folder if it does not exist. Save the downloaded
file there with the exact name gcp-oauth.keys.json.
5. Run the authentication flow
In a terminal, run the server's auth command. This opens a browser for Google consent and caches a token locally.
npx -y @piotr-agier/google-drive-mcp auth
- Sign in with the Google account whose files you want to read.
- Grant the requested scopes.
- On success, a token is stored at
~/.config/google-drive-mcp/tokens.json(%USERPROFILE%\.config\google-drive-mcp\tokens.jsonon Windows).
You only do this once. The refresh token is reused on future runs.
6. Confirm the power is active in Kiro
The MCP server is already declared in this power's mcp.json. After installing
the power and reconnecting/restarting Kiro:
- Ask Kiro: "Run authGetStatus and tell me which Google account is active."
- A correct response naming your account confirms authentication worked.
If tools are not visible, reconnect the MCP server from Kiro's MCP Server view or restart Kiro.
Common Workflows
Workflow: Switch to a different Google account
Goal: Authenticate as a different identity.
- Delete or rename the cached token:
~/.config/google-drive-mcp/tokens.json. - Re-run
npx -y @piotr-agier/google-drive-mcp auth. - Sign in with the other account.
Workflow: Grant write access later
Goal: Move from read-only to editing.
- Add the write scopes in OAuth consent screen > Data Access.
- Delete
tokens.jsonto force re-consent. - Re-run the
authcommand and approve the new scopes.
Troubleshooting
Error: "gcp-oauth.keys.json not found"
Cause: The OAuth client JSON is missing or in the wrong location. Solution:
- Confirm the file is at
~/.config/google-drive-mcp/gcp-oauth.keys.json(%USERPROFILE%\.config\google-drive-mcp\on Windows). - Confirm the filename is exactly
gcp-oauth.keys.json. - Re-download it from Credentials if needed.
Error: "access_denied" or "app is blocked" during consent
Cause: External app in testing with your account not listed as a test user. Solution:
- Go to OAuth consent screen > Test users and add your Google account.
- Retry the auth command.
Error: "insufficient permission" / 403 on a read call
Cause: The token was granted narrower scopes than the tool needs. Solution:
- Add the missing read scope in Data Access.
- Delete
tokens.jsonand re-runauthto re-consent.
Tools do not appear in Kiro
Cause: MCP server not connected after install. Solution:
- Open Kiro's MCP Server view and reconnect
google-drive. - If still missing, restart Kiro and confirm
npxruns (npx --version).
Best Practices
- Prefer read-only scopes unless you specifically need to edit content.
- Never commit
gcp-oauth.keys.jsonortokens.jsonto source control. - Keep the token file private; it grants access to your Google content.
- Re-run
authafter changing scopes so the token reflects the new grant.
04 同仓库更多 Skills
fetch-transcripts
Fetch YouTube video transcripts as plain text so the agent can read, summarize, quote, or research spoken video content. Runs a bundled Python script (wrapping youtube-transcript-api) against one or more video URLs or IDs and writes one .txt per video. Use when the user shares YouTube links or IDs and wants the words rather than the video — for research, summaries, quotes, or slide/content prep.
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment
writing-plans
Use when you have a spec or requirements for a multi-step task, before touching code
verification-before-completion
Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always
using-superpowers
Use when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions
using-git-worktrees
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback