使用说明
任务mcp
用于Google任务的MCP服务器。使用JSON-RPC 2.0在stdio上运行。
特性
- list_task_lists --显示所有任务列表
- list_tasks --列表中的任务(可选已完成)
- 创建任务 --带有可选截止日期/时间和注释的新任务
- update_task --修改任务字段
- 完成任务 --标记为已完成
- 删除任务 --删除任务
需求
- 转到1.24+
- 启用了任务API的谷歌云项目
- OAuth2桌面应用凭据
设置
1.谷歌证书
跟随 docs/google-oauth-setup.md 创建OAuth凭据并授权。
2.安装
go install github.com/cherya/google-tasks-mcp@latest
或者从源代码构建:
git clone https://github.com/cherya/google-tasks-mcp.git
cd google-tasks-mcp
go build -o google-tasks-mcp .
3.授权
# Get the authorization URL
GOOGLE_OAUTH_CREDENTIALS=/path/to/oauth-client.json google-tasks-mcp --auth
# Open the URL in a browser, authorize, copy the code
# Exchange the code for a token
GOOGLE_OAUTH_CREDENTIALS=/path/to/oauth-client.json google-tasks-mcp --token <CODE>
4.环境变量
GOOGLE_OAUTH_CREDENTIALS--OAuth客户端JSON的路径(必需)GOOGLE_TOKEN_FILE--令牌存储路径(可选,默认为tasks-token.json凭证旁边)TIMEZONE--到期日的IANA时区,例如。Asia/Tbilisi(可选,默认为UTC)
使用Claude Desktop
添加到您的 claude_desktop_config.json:
{
"mcpServers": {
"google-tasks": {
"command": "google-tasks-mcp",
"env": {
"GOOGLE_OAUTH_CREDENTIALS": "/path/to/oauth-client.json",
"GOOGLE_TOKEN_FILE": "/path/to/tasks-token.json",
"TIMEZONE": "Asia/Tbilisi"
}
}
}
}