Google Tasks MCP
Google Tasks MCP
一个 MCP 服务器,允许 AI 代理读取和管理用户的 Google Tasks。它使用 Google 官方的 Tasks API、OAuth 2.0 桌面应用凭据,以及基于 stdio 的 MCP TypeScript SDK。
功能
列出、查看、创建、重命名和删除任务列表
使用 API 分页列出和筛选任务
创建、编辑、完成、重新打开、移动、重新排序和删除任务
使用
parent和previous创建和移动子任务清除已完成的任务
MCP 安全注释以及对破坏性操作的明确确认
OAuth 刷新令牌存储在仓库之外,并具有仅所有者权限
要求
Node.js 20 或更高版本
一个 Google 账户
一个启用了 Google Tasks API 的 Google Cloud 项目
1. 配置 Google Cloud
创建或选择一个项目。
在 APIs & Services → Library 下启用 Google Tasks API。
配置 OAuth 同意屏幕。
在 APIs & Services → Credentials 下,创建一个 OAuth 客户端 ID,应用程序类型为 Desktop app。
将 OAuth 桌面客户端 JSON 下载为
client_secret.json,并将其保护在此仓库之外。
2. 安装、构建和授权
npm install
npm run build
npm run auth -- --client-secret /secure/google/client_secret.jsonauth 命令仅接受包含顶层 installed 对象的 Google OAuth 桌面客户端 JSON。它会打开浏览器同意流程,并将 Tasks 刷新令牌保存到:
~/.config/google-tasks-mcp/token.json需要时覆盖生成的令牌位置:
GOOGLE_TOKEN_FILE=/secure/google/tasks-token.json \
npm run auth -- --client-secret /secure/google/client_secret.json对于已安装的包,运行:
google-tasks-mcp-auth --client-secret /secure/google/client_secret.json服务器请求完整的 https://www.googleapis.com/auth/tasks 范围,因为它同时提供读和写操作。后续的 MCP 服务器运行会使用存储的令牌并自动刷新访问权限;仅在授权或重新授权项目时再次提供 client_secret.json。切勿提交任一 JSON 文件。
3. 连接 MCP 主机
直接使用此检出中的构建服务器。将路径替换为您机器上的绝对路径。
Codex (~/.codex/config.toml)
[mcp_servers.google_tasks]
command = "node"
args = ["/absolute/path/google-task-mcp/dist/index.js"]
[mcp_servers.google_tasks.env]
GOOGLE_TOKEN_FILE = "/Users/you/.config/google-tasks-mcp/token.json"使用 JSON 配置的主机
{
"mcpServers": {
"google_tasks": {
"command": "node",
"args": ["/absolute/path/google-task-mcp/dist/index.js"],
"env": {
"GOOGLE_TOKEN_FILE": "/Users/you/.config/google-tasks-mcp/token.json"
}
}
}
}更改配置后重启 MCP 主机。
可用工具
Tool | Purpose |
| 列出任务列表 |
| 获取一个任务列表 |
| 创建一个任务列表 |
| 重命名一个任务列表 |
| 删除一个任务列表;需要 |
| 使用分页列出/筛选任务 |
| 获取一个任务 |
| 创建一个任务或子任务 |
| 修补标题、备注、截止日期或状态 |
| 将任务标记为已完成 |
| 将任务标记为需要操作 |
| 重新排序、重新设置父级或将任务移动到另一个列表 |
| 删除一个任务;需要 |
| 清除已完成的任务;需要 |
Google Tasks 仅存储截止时间戳的日期部分。通过 API 发送的当天时间会被丢弃。任务标题限制为 1,024 个字符,备注限制为 8,192 个字符。
使用 MCP Inspector 进行测试
npm run build
npm run inspectstdio 协议仅使用 stdout。因此,运行时诊断信息会写入 stderr。
打包以进行分发
创建可安装的 npm tarball:
npm pack发布包后,主机可以使用以下命令启动它:
{
"command": "npx",
"args": ["-y", "google-tasks-mcp@0.1.0"],
"env": {
"GOOGLE_TOKEN_FILE": "/secure/google/tasks-token.json"
}
}对于单用户单工作站,stdio 加本地令牌是最简单、最安全的部署方式。对于多用户或托管服务,请使用 MCP Streamable HTTP,并实现每用户 OAuth 会话和加密的服务器端令牌存储;不要在用户之间共享刷新令牌。
参考
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Calendar API for AI agents: events, availability, Google/Microsoft setup, scheduling, and iCal.
Task manager your agent can fully operate: boards, tasks, sprints, roles, worklogs, day planner.
Manage your MakeMeBetter AI tasks, habits, and goals from your AI assistant.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/phamviet86/google-task-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server