Google Tasks MCP Server
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
This Model Context Protocol (MCP) server provides a bridge between MCP clients and Google Tasks, allowing you to manage your task lists and tasks directly from clients like Claude Desktop, Cursor, and Codex.
> [!NOTE]
> All (bar some edits) code in this project was "vibe coded" - generated with Claude/Copilot with instructions from me.
Features
This MCP server provides the following functionality:
Task List Management
- list-tasklists - List all your task lists
- get-tasklist - Get details about a specific task list
- create-tasklist - Create a new task list
- update-tasklist - Update an existing task list
- delete-tasklist - Delete a task list
Task Management
- list-tasks - List all tasks in a task list, including paginated results
- get-task - Get details about a specific task
- create-task - Create a new task
- update-task - Update an existing task
- delete-task - Delete a task
- complete-task - Mark a task as completed
- move-task - Move a task (reorder, change parent, or move across task lists)
- clear-completed-tasks - Clear all completed tasks from a list
Setup Instructions
1. Create Google Cloud Project & Enable API
1. Go to the Google Cloud Console
2. Create a new project
3. Navigate to "APIs & Services" > "Library"
4. Search for "Google Tasks API" and enable it
5. Go to "APIs & Services" > "Credentials"
6. Click "Create Credentials" > "OAuth Client ID"
7. Configure the OAuth consent screen (External is fine for personal use)
8. For Application Type, select "Web application"
9. Add "http://localhost:3000/oauth2callback" as an authorized redirect URI
10. Create the client ID and secret
2. Configure Environment Variables
Create a .env file in this project directory:
**Environment Variables:**
- GOOGLE_CLIENT_ID (required) - Your Google OAuth Client ID
- GOOGLE_CLIENT_SECRET (required) - Your Google OAuth Client Secret
- GOOGLE_REDIRECT_URI (optional) - OAuth redirect URI (defaults to http://localhost:3000/oauth2callback)
**Note:** The server validates that GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET are set at startup and will fail with clear error messages if they are missing or invalid.
3. Build the Server
1. Install dependencies:
2. Build the server:
4. Configure an MCP Client
Codex
Add the server to ~/.codex/config.toml:
Replace /path/to/google-tasks-mcp with the path to this project, then restart Codex.
To verify the server is registered:
Claude for Desktop
1. Install Claude for Desktop
2. Open the Claude configuration file:
- MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
- Windows: %APPDATA%\Claude\claude_desktop_config.json
3. Add the Google Tasks MCP server configuration:
Replace the path with your own value, then restart Claude for Desktop.
Authentication Flow
When you first use the Google Tasks MCP server:
1. Use the authenticate tool to get an authorization URL
2. Visit the URL in your browser and sign in with your Google account
3. After authorizing, you'll receive a code on the browser page
4. Use the set-auth-code tool with this code to complete authentication