Skip to main content
Glama

gtasks-mcp

CI License: MIT Node >= 20

一个用于 Google Tasks 的 Model Context Protocol 服务器——可从 Claude(或任何兼容 MCP 的客户端)列出、搜索、创建、更新、删除和清除任务。

改编自 zcaceres/gtasks-mcp(MIT 许可),改用纯 Node/TypeScript 而非 Bun 重建,并将凭据完全移出仓库(见下文安全部分),同时附带完整的测试套件。

设置

1. 创建 Google Cloud OAuth 客户端

  1. 前往 Google Cloud Console,创建项目(或复用现有项目)。

  2. 启用 Google Tasks API(API 和服务 → 库)。

  3. 配置 OAuth 同意屏幕(个人使用选择“外部”即可——你将是唯一的测试用户)。

  4. 创建凭据 → OAuth 客户端 ID → 应用类型选择 桌面应用

  5. 下载 JSON 文件。

2. 安装 OAuth 客户端文件

mkdir -p ~/.gtasks-mcp
mv ~/Downloads/client_secret_*.json ~/.gtasks-mcp/oauth-keys.json

在 Windows 上:%USERPROFILE%\.gtasks-mcp\oauth-keys.json

3. 构建并认证

npm install
npm run build
npm run auth

这将打开浏览器窗口进行 Google 同意流程。成功后,credentials.json(你的刷新/访问令牌)会被写入 ~/.gtasks-mcp/oauth-keys.json 的旁边。

4. 向 Claude Code 注册服务器

claude mcp add gtasks -- node /absolute/path/to/gtasks-mcp/dist/index.js

Related MCP server: mcp-google-tasks

暴露的工具

工具

描述

list

列出任务(所有列表,或通过 taskListId 指定单个列表)

search

按标题/备注搜索任务

list-tasklists

列出所有任务列表

create

创建任务(title 必填)

update

更新任务(id 必填)

delete

删除任务(id 必填)

clear

清除列表中的已完成任务

安全

  • 凭据永远不会存放在此仓库中。 oauth-keys.json(你的 Google Cloud OAuth 客户端)和 credentials.json(由 npm run auth 生成的个人访问/刷新令牌)都存储在 ~/.gtasks-mcp/ 下——即操作系统用户配置区域,而非项目目录。仓库内没有需要 git add -f 的 gitignore 文件;这些机密完全无法从仓库的工作树中访问。具体路径请参阅 src/config.ts

  • credentials.json 等同于你 Google Tasks 的密码——任何拥有该文件的人都能读写你的任务。请妥善保管(不要通过电子邮件发送、不要在聊天中粘贴、不要备份到共享位置)。

  • 依赖项:仅包含 @google-cloud/local-authgoogleapis@modelcontextprotocol/sdk——均为官方(Google / Anthropic)包。无遥测、无第三方网络调用;每个请求都直接发送到 Google 自己的 API。

  • 已知且已接受的传递性漏洞npm audit,检查于 2026-08-25):esbuild/vite(仅开发工具,不属于运行时)和 uuid(通过 gaxios/googleapis,本服务器实际使用中不存在不可信缓冲区输入路径)存在中等级别问题。两者都需要上游进行破坏性主版本升级才能清除;建议在下次定期依赖审计时重新评估,而非强制进行未经测试的升级。

开发

npm test        # vitest
npm run lint     # eslint (narrow scope — see eslint.config.js)
npm run typecheck
npm run build
A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Hosted Google Calendar MCP server for AI agents. No self-hosting or Google Cloud setup.

  • Read, search, send, organize, draft and schedule email across your inboxes from any MCP client.

  • Google Docs MCP Pack — read, create, and edit Google Docs via OAuth.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/smaurier/gtasks-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server