mcp-googletasks is a server based on the Model Context Protocol (MCP), whose main purpose is to provide a bridge between MCP clients (such as Claude Desktop, Cursor, Codex) and Google Tasks, allowing users to directly manage their task lists and tasks through these clients.
Its main capabilities are divided into two categories:
Task list management: list-tasklists (list all task lists), get-tasklist (get details of 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, supports paginated results), get-task (get details of 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, can reorder, change the parent task, or move it across task lists), clear-completed-tasks (clear all completed tasks in a list).
How to use:
-
Create a project in Google Cloud Console and enable the Google Tasks API; in "APIs & Services" > "Credentials", create an OAuth client ID, select "Web application" as the application type, and set http://localhost:3000/oauth2callback Add as an authorized redirect URI.
-
Create a .env file in the project directory and configure the environment variables: GOOGLE_CLIENT_ID (required), GOOGLE_CLIENT_SECRET (required), GOOGLE_REDIRECT_URI (optional, default http://localhost:3000/oauth2callback)。服务器会在启动时验证必填项,缺失或无效时会给出明确错误。
-
Install dependencies and build the server.
-
Configure the MCP client: for example, add the server configuration in ~/.codex/config.toml, or edit the configuration file for Claude for Desktop (MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json; Windows: %APPDATA%\Claude\claude_desktop_config.json), replace it with the actual project path, and restart the client.
Authentication flow: On first use, call the authenticate tool to obtain the authorization URL; visit it in a browser and sign in to your Google account; after authorization, the page will display a code; use the set-auth-code tool to submit that code to complete authentication. The authentication token (including the refresh token) is automatically saved to ~/.config/google-tasks-mcp/credentials.json with restricted permissions (600). Therefore, you only need to authenticate once, and the token will be automatically refreshed after it expires (usually 1 hour). Unless access is revoked or the credentials file is deleted, re-authentication is not required.
Use cases: suitable for users who want to manage Google Tasks in natural language through MCP clients such as Claude, and for developers who need to integrate task management into AI workflows.
Limitations and requirements: requires Node.js 20+ (see package.json engines), an MCP-compatible client, and a Google Cloud project with the Tasks API enabled. The project description explicitly states that it is "for demonstration purposes only, use at your own risk." In addition, most of the project code was generated by Claude/Copilot according to the author's instructions.
Implemented features include: persistent token storage, startup validation of environment variables, automatic token refresh, enhanced input validation (ID format, string length, RFC 3339 date format), OAuth callback response HTML sanitization to prevent XSS, graceful shutdown on SIGINT/SIGTERM signals, comprehensive TypeScript type safety, and a customizable redirect URI via GOOGLE_REDIRECT_URI.