Google Tasks MCP

Google Tasks MCP

An MCP server that lets Claude manage Google Tasks, including listing, creating, updating, completing, moving, and deleting tasks and task lists. It supports both local and remote deployments and can be used with Claude Desktop or as a Cloudflare Worker.

Category
访问服务器

README

Google Tasks MCP

An MCP server that lets Claude manage your Google Tasks — the to-dos that show up on Google Calendar. List, create (one or many at once), update, complete, move, and delete tasks and task lists.

Sibling of google-sheets-mcp; same architecture, same deployment story:

  • Local — a .mcpb desktop extension for Claude Desktop and local Cowork sessions.
  • Remote — a Cloudflare Worker you add as a custom connector, which also works in cloud Cowork sessions, claude.ai on the web, and mobile.

Built on the MCP TypeScript SDK v2 (2026-07-28 spec, with fallback for 2025-era clients such as today's claude.ai) and the Google Tasks API v1, with no Google SDK dependency — just fetch, so the same code runs on Node and in V8 isolates.

The one thing to know about Google Tasks

Google Tasks stores date-only due dates. The API accepts a timestamp but discards the time; there is no way to set or read a time of day. So every tool here takes due as YYYY-MM-DD and the task renders as an all-day item on that date in Google Calendar. (Sending local midnight instead of UTC midnight is the classic "task shows a day early" bug — this server always sends UTC midnight.)

Other API limits: no recurring tasks, no starring, one level of subtasks, title ≤ 1024 chars, notes ≤ 8192 chars.

Tools

Tool What it does
list_tasklists All lists with ids and titles — call first
create_tasklist / rename_tasklist / delete_tasklist Manage lists (delete requires confirm: true)
list_tasks Tasks in a list; filter by status (open/completed/all), dueAfter, dueBefore, updatedAfter
get_task One task by id
create_task One task: title, notes, due (YYYY-MM-DD), optional parent/position
create_tasks Up to 100 tasks in one call, idempotent on title+due by default; returns a per-item report
update_task Change title / notes / due / status; pass null to clear notes or due
complete_task / reopen_task Toggle done
move_task Reorder, nest/un-nest, or move to another list
delete_task Delete one task
clear_completed Hide completed tasks (like the UI's "Clear completed")

Lists can be referenced by id or title; omit for the default list.

1. Google Cloud credentials (one-time, needed either way)

  1. In Google Cloud Console, create or pick a project (reusing the one from google-sheets-mcp is fine).
  2. Enable the Google Tasks API.
  3. APIs & Services → OAuth consent screen: add the scope https://www.googleapis.com/auth/tasks, add yourself under Test users, then click Publish app. Personal-use apps (under 100 users) don't need Google's verification review — you click through an "unverified app" warning once. Publishing matters because while the app sits in Testing, Google revokes refresh tokens every 7 days.
  4. APIs & Services → Credentials → OAuth client ID → Desktop app (or reuse the sheets one). Save the Client ID and Client Secret.

The Tasks API is free; the project never needs a billing account.

2a. Local install (Claude Desktop / local Cowork sessions)

npm install
npm run pack        # builds and produces google-tasks.mcpb (~1.7 MB)

Double-click google-tasks.mcpb, or Claude Desktop → Settings → Extensions → Install Extension…. Paste your Client ID and Secret. On first use a browser opens to authorize; the refresh token is cached at ~/.config/google-tasks-mcp/token.json.

Local MCP servers do not run in cloud Cowork sessions or on claude.ai — for those, use the remote deployment below.

2b. Remote install (cloud Cowork sessions, web, mobile)

Mint a refresh token (this one must carry the tasks scope — a token minted for sheets won't work):

GOOGLE_OAUTH_CLIENT_ID=…apps.googleusercontent.com \
GOOGLE_OAUTH_CLIENT_SECRET=… \
npm run mint-token

Pick a bearer token (a fresh one, not the sheets one, so each connector can be revoked independently):

node -e "console.log(require('crypto').randomBytes(32).toString('base64url'))"

Deploy to Cloudflare Workers:

npx wrangler login
npx wrangler secret put MCP_BEARER_TOKEN
npx wrangler secret put GOOGLE_OAUTH_CLIENT_ID
npx wrangler secret put GOOGLE_OAUTH_CLIENT_SECRET
npx wrangler secret put GOOGLE_REFRESH_TOKEN
npm run deploy

Verify with curl https://google-tasks-mcp.<you>.workers.dev/healthok.

Add it to Claude: Settings → ConnectorsAdd custom connector.

  • If the dialog has a Request headers section: URL https://google-tasks-mcp.<you>.workers.dev/mcp, header authorization: Bearer <your MCP_BEARER_TOKEN>.
  • Otherwise put the token in the path: https://google-tasks-mcp.<you>.workers.dev/mcp/<your MCP_BEARER_TOKEN>.

First smoke test in Claude: list_tasklists, then create_task with a due date, then open Google Calendar and confirm it landed on the right day.

Security notes

  • The endpoint is public; the bearer token is the only gate. Long random value, treat as a password. Auth fails closed (no token configured → every request 401), comparison is constant-time, and browser Origin headers other than claude.ai are rejected (403).
  • GOOGLE_REFRESH_TOKEN grants full read/write on every task list in the account.
  • Revoke everything: myaccount.google.com/permissions.

Configuration reference

Env var / secret Purpose
GOOGLE_OAUTH_CLIENT_ID / GOOGLE_OAUTH_CLIENT_SECRET OAuth client (both modes)
GOOGLE_REFRESH_TOKEN Pre-minted refresh token (required for remote)
MCP_BEARER_TOKEN Shared secret required by the remote endpoint
GTASKS_TOKEN_PATH Override the local token cache location

Scope: https://www.googleapis.com/auth/tasks.

Development

npm install
npm run build       # compile to dist/
npm run typecheck
npm run pack        # build + package the .mcpb bundle
npm run dev:worker  # run the Worker locally via wrangler
npm run deploy
src/
  index.ts          stdio entry point (local)
  worker.ts         Cloudflare Worker entry (remote) + bearer auth + origin check
  server.ts         server factory: registers all tool groups
  config.ts         credentials → token provider, shared by both entries
  google/
    auth.ts         fetch-based refresh-token provider
    client.ts       REST client for the Tasks API (14 endpoints)
    types.ts        minimal API types
  node/
    localOAuth.ts   Node-only desktop OAuth loopback flow
    mintToken.ts    CLI to print a refresh token for remote deploys
  tools/
    lists.ts        task-list tools
    tasks.ts        single-task CRUD, complete/reopen, move, clear
    bulk.ts         create_tasks (batch, idempotent)
    shared.ts       zod schemas + compact task view
  utils/
    dates.ts        YYYY-MM-DD ↔ RFC 3339 UTC-midnight
    result.ts       tool result/error helpers

Roadmap

  • v2 auth: replace the shared secret with spec-conformant OAuth 2.1 (RFC 9728 PRM, PKCE, CIMD/DCR) using @cloudflare/workers-oauth-provider, so each Claude user connects their own Google account. Not needed for a personal deployment.

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选