mcp-google-tasks 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +301 -0
- package/README.ru.md +301 -0
- package/dist/client.js +333 -0
- package/dist/config.js +83 -0
- package/dist/index.js +119 -0
- package/dist/telemetry.js +120 -0
- package/dist/tools/completion.js +48 -0
- package/dist/tools/raw.js +33 -0
- package/dist/tools/tasklists.js +83 -0
- package/dist/tools/tasks.js +184 -0
- package/dist/tools/util.js +74 -0
- package/dist/types.js +44 -0
- package/package.json +60 -0
- package/test/dist-smoke.test.js +175 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 A1 x Tech
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
# <img src="./assets/a1-logo.svg" alt="A1" width="40"> Google Tasks MCP
|
|
2
|
+
|
|
3
|
+
**English** | [Русский](./README.ru.md)
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/mcp-google-tasks)
|
|
6
|
+
[](https://github.com/A1-x-Tech/mcp-google-tasks/actions/workflows/ci.yml)
|
|
7
|
+
[](https://glama.ai/mcp/servers/A1-x-Tech/mcp-google-tasks)
|
|
8
|
+
[](./LICENSE)
|
|
9
|
+
|
|
10
|
+
**A1 Google Tasks MCP** lets an AI app manage Google Tasks in plain language. Plan a project as a task list, break work into subtasks with due dates and notes, mark things done and keep everything in order.
|
|
11
|
+
|
|
12
|
+
It uses the Google Tasks API with your Google account. It separates reversible completion from permanent deletion and makes the limits of the Tasks API explicit instead of implying that every to-do feature is possible.
|
|
13
|
+
|
|
14
|
+
- **15 tools.** List, create and update task lists and tasks, move tasks, manage completion, sweep finished work and reach the raw API when a dedicated tool is missing.
|
|
15
|
+
- **Completion is reversible, deletion is not.** `complete_task` has an undo (`reopen_task`); the delete tools are separate and marked destructive.
|
|
16
|
+
- **Due dates are honest.** The API stores only the calendar date — the server never pretends to schedule a time of day; times belong in the notes.
|
|
17
|
+
- **Minimal Google scope.** A single `tasks` scope, without Drive, Calendar or Gmail access.
|
|
18
|
+
|
|
19
|
+
Start with a read-only question:
|
|
20
|
+
|
|
21
|
+
> Show me my task lists and everything due before Friday in my default list.
|
|
22
|
+
|
|
23
|
+
[Connect the server](#quick-start) · [Explore use cases](#what-you-can-ask-it-to-do) · [Open technical documentation](#technical-documentation)
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## See it work in a minute
|
|
28
|
+
|
|
29
|
+
> **You:** What's still open in the "Website launch" list, and what's due this week?
|
|
30
|
+
>
|
|
31
|
+
> **Assistant:** Shows the open tasks with their due dates, notes and subtasks. Nothing changes.
|
|
32
|
+
>
|
|
33
|
+
> **You:** Add a task "Send the launch announcement" due Friday as a subtask of "Marketing".
|
|
34
|
+
>
|
|
35
|
+
> **Assistant:** Shows the target list, the parent task and the proposed task, then asks for confirmation before creating it.
|
|
36
|
+
>
|
|
37
|
+
> **You:** Confirm.
|
|
38
|
+
>
|
|
39
|
+
> **Assistant:** Creates the subtask with a Friday due date. It does not complete or delete anything unless you ask separately.
|
|
40
|
+
|
|
41
|
+
## Contents
|
|
42
|
+
|
|
43
|
+
- [Quick start](#quick-start)
|
|
44
|
+
- [What you can ask it to do](#what-you-can-ask-it-to-do)
|
|
45
|
+
- [How a task changes](#how-a-task-changes)
|
|
46
|
+
- [What can change](#what-can-change)
|
|
47
|
+
- [Getting access](#getting-access)
|
|
48
|
+
- [Configuration](#configuration)
|
|
49
|
+
- [Data, limits and background work](#data-limits-and-background-work)
|
|
50
|
+
- [Technical documentation](#technical-documentation)
|
|
51
|
+
- [Support](#support)
|
|
52
|
+
|
|
53
|
+
## Quick start
|
|
54
|
+
|
|
55
|
+
You need Node.js 20+, a Google account and OAuth credentials from a Google Cloud project with the Google Tasks API enabled.
|
|
56
|
+
|
|
57
|
+
1. [Prepare Google OAuth access](#getting-access).
|
|
58
|
+
2. Add the server to your AI app.
|
|
59
|
+
3. Ask the read-only question above.
|
|
60
|
+
|
|
61
|
+
<details open>
|
|
62
|
+
<summary><strong>Codex</strong></summary>
|
|
63
|
+
|
|
64
|
+
<br>
|
|
65
|
+
|
|
66
|
+
**In the app:** open **Settings → Plugins → MCP servers**, select **Add server**, then add `npx -y mcp-google-tasks@latest` with `GOOGLE_TASKS_CLIENT_ID`, `GOOGLE_TASKS_CLIENT_SECRET` and `GOOGLE_TASKS_REFRESH_TOKEN`.
|
|
67
|
+
|
|
68
|
+
**From the command line:**
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
codex mcp add google-tasks \
|
|
72
|
+
--env GOOGLE_TASKS_CLIENT_ID=your_client_id \
|
|
73
|
+
--env GOOGLE_TASKS_CLIENT_SECRET=your_client_secret \
|
|
74
|
+
--env GOOGLE_TASKS_REFRESH_TOKEN=your_refresh_token \
|
|
75
|
+
-- npx -y mcp-google-tasks@latest
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
codex mcp list
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
[Codex MCP documentation](https://learn.chatgpt.com/docs/extend/mcp?surface=cli)
|
|
83
|
+
|
|
84
|
+
</details>
|
|
85
|
+
|
|
86
|
+
<details>
|
|
87
|
+
<summary><strong>Claude Code</strong></summary>
|
|
88
|
+
|
|
89
|
+
<br>
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
claude mcp add \
|
|
93
|
+
--env GOOGLE_TASKS_CLIENT_ID=your_client_id \
|
|
94
|
+
--env GOOGLE_TASKS_CLIENT_SECRET=your_client_secret \
|
|
95
|
+
--env GOOGLE_TASKS_REFRESH_TOKEN=your_refresh_token \
|
|
96
|
+
--transport stdio --scope user google-tasks \
|
|
97
|
+
-- npx -y mcp-google-tasks@latest
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
claude mcp list
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
[Claude Code MCP documentation](https://code.claude.com/docs/en/mcp)
|
|
105
|
+
|
|
106
|
+
</details>
|
|
107
|
+
|
|
108
|
+
<details>
|
|
109
|
+
<summary><strong>Claude Desktop</strong></summary>
|
|
110
|
+
|
|
111
|
+
<br>
|
|
112
|
+
|
|
113
|
+
Open **Settings → Developer → Edit Config** and add:
|
|
114
|
+
|
|
115
|
+
```json
|
|
116
|
+
{
|
|
117
|
+
"mcpServers": {
|
|
118
|
+
"google-tasks": {
|
|
119
|
+
"command": "npx",
|
|
120
|
+
"args": ["-y", "mcp-google-tasks@latest"],
|
|
121
|
+
"env": {
|
|
122
|
+
"GOOGLE_TASKS_CLIENT_ID": "your_client_id",
|
|
123
|
+
"GOOGLE_TASKS_CLIENT_SECRET": "your_client_secret",
|
|
124
|
+
"GOOGLE_TASKS_REFRESH_TOKEN": "your_refresh_token"
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
If **Edit Config** is unavailable, edit `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS or `%APPDATA%\Claude\claude_desktop_config.json` on Windows.
|
|
132
|
+
|
|
133
|
+
[Claude Desktop MCP documentation](https://support.claude.com/en/articles/10949351-getting-started-with-local-mcp-servers-on-claude-desktop)
|
|
134
|
+
|
|
135
|
+
</details>
|
|
136
|
+
|
|
137
|
+
<details>
|
|
138
|
+
<summary><strong>Cursor</strong></summary>
|
|
139
|
+
|
|
140
|
+
<br>
|
|
141
|
+
|
|
142
|
+
Add this to `~/.cursor/mcp.json` on macOS/Linux or `%USERPROFILE%\.cursor\mcp.json` on Windows:
|
|
143
|
+
|
|
144
|
+
```json
|
|
145
|
+
{
|
|
146
|
+
"mcpServers": {
|
|
147
|
+
"google-tasks": {
|
|
148
|
+
"type": "stdio",
|
|
149
|
+
"command": "npx",
|
|
150
|
+
"args": ["-y", "mcp-google-tasks@latest"],
|
|
151
|
+
"env": {
|
|
152
|
+
"GOOGLE_TASKS_CLIENT_ID": "your_client_id",
|
|
153
|
+
"GOOGLE_TASKS_CLIENT_SECRET": "your_client_secret",
|
|
154
|
+
"GOOGLE_TASKS_REFRESH_TOKEN": "your_refresh_token"
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
[Cursor MCP documentation](https://cursor.com/docs/mcp)
|
|
162
|
+
|
|
163
|
+
</details>
|
|
164
|
+
|
|
165
|
+
<details>
|
|
166
|
+
<summary><strong>VS Code</strong></summary>
|
|
167
|
+
|
|
168
|
+
<br>
|
|
169
|
+
|
|
170
|
+
Run **MCP: Open User Configuration** and add:
|
|
171
|
+
|
|
172
|
+
```json
|
|
173
|
+
{
|
|
174
|
+
"servers": {
|
|
175
|
+
"google-tasks": {
|
|
176
|
+
"type": "stdio",
|
|
177
|
+
"command": "npx",
|
|
178
|
+
"args": ["-y", "mcp-google-tasks@latest"],
|
|
179
|
+
"env": {
|
|
180
|
+
"GOOGLE_TASKS_CLIENT_ID": "${input:tasks_client_id}",
|
|
181
|
+
"GOOGLE_TASKS_CLIENT_SECRET": "${input:tasks_client_secret}",
|
|
182
|
+
"GOOGLE_TASKS_REFRESH_TOKEN": "${input:tasks_refresh_token}"
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"inputs": [
|
|
187
|
+
{ "type": "promptString", "id": "tasks_client_id", "description": "Google OAuth client ID" },
|
|
188
|
+
{ "type": "promptString", "id": "tasks_client_secret", "description": "Google OAuth client secret", "password": true },
|
|
189
|
+
{ "type": "promptString", "id": "tasks_refresh_token", "description": "Google OAuth refresh token", "password": true }
|
|
190
|
+
]
|
|
191
|
+
}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Check it with **MCP: List Servers**.
|
|
195
|
+
|
|
196
|
+
[VS Code MCP documentation](https://code.visualstudio.com/docs/agent-customization/mcp-servers)
|
|
197
|
+
|
|
198
|
+
</details>
|
|
199
|
+
|
|
200
|
+
## What you can ask it to do
|
|
201
|
+
|
|
202
|
+
### See your lists and plan the day
|
|
203
|
+
|
|
204
|
+
- Show my task lists and the open tasks in each one.
|
|
205
|
+
- What's due this week in the default list? Include subtasks.
|
|
206
|
+
- What changed since yesterday? Include completed and hidden tasks.
|
|
207
|
+
|
|
208
|
+
### Create and organize work
|
|
209
|
+
|
|
210
|
+
- Create a "Website launch" list with tasks for design, content and QA.
|
|
211
|
+
- Add a task due Friday with notes, nested under the "Marketing" task.
|
|
212
|
+
- Move a task to the top of the list, under another task, or into a different list.
|
|
213
|
+
|
|
214
|
+
### Track completion
|
|
215
|
+
|
|
216
|
+
- Mark the review task done — and reopen it if the work comes back.
|
|
217
|
+
- Sweep every completed task out of the list view in one go.
|
|
218
|
+
- Show the hidden tasks that were swept earlier.
|
|
219
|
+
|
|
220
|
+
## How a task changes
|
|
221
|
+
|
|
222
|
+
1. Tasks live in **task lists**. Every account has a built-in default list, addressed by the special id `@default`; `create_tasklist` adds more.
|
|
223
|
+
2. A task carries a title, notes and a **date-only** due date — the API discards the time portion, so a time of day belongs in the notes.
|
|
224
|
+
3. Ordering and nesting change only through `move_task`; the API's `position` field is read-only.
|
|
225
|
+
4. Completing a task is reversible: `reopen_task` brings it back. Deleting a task or a list is permanent, and deleting a list removes every task in it.
|
|
226
|
+
|
|
227
|
+
Recurring tasks cannot be created through the API. Tasks assigned from Google Docs or Chat can be read but not created or moved to another list, and deleting one also removes it in the originating document. There is no server-side search or sorting — the server lists tasks and the AI client filters them.
|
|
228
|
+
|
|
229
|
+
## What can change
|
|
230
|
+
|
|
231
|
+
| Operation | What happens | Confirmation boundary |
|
|
232
|
+
|---|---|---|
|
|
233
|
+
| Read task lists and tasks | Reads lists, tasks and their filters | No change |
|
|
234
|
+
| Create a task list or a task | Adds a list or an open task | Changes Google Tasks |
|
|
235
|
+
| Update a task or rename a list | Changes a title, notes or due date | Changes a task |
|
|
236
|
+
| Move a task | Changes order, nesting or the containing list | Changes a task |
|
|
237
|
+
| Complete or reopen a task | Toggles completion status | Reversible change |
|
|
238
|
+
| Clear completed tasks | Sweeps every completed task in a list out of view | Destructive |
|
|
239
|
+
| Delete a task or a task list | Removes the task, or the list with everything in it | Destructive |
|
|
240
|
+
| Raw API request | Can call API methods without a dedicated tool | Potentially destructive |
|
|
241
|
+
|
|
242
|
+
The AI client controls confirmation prompts. The server marks reads, writes and destructive tools so the client can distinguish an inspection from a live change.
|
|
243
|
+
|
|
244
|
+
## Getting access
|
|
245
|
+
|
|
246
|
+
Google Tasks requires OAuth 2.0; an API key is not enough.
|
|
247
|
+
|
|
248
|
+
1. Create or select a Google Cloud project and enable **Google Tasks API**.
|
|
249
|
+
2. Configure the OAuth consent screen and create a **Desktop app** OAuth client.
|
|
250
|
+
3. Authorize the Google account that owns the tasks. The [OAuth 2.0 Playground](https://developers.google.com/oauthplayground) can obtain the refresh token when **Use your own OAuth credentials** is enabled.
|
|
251
|
+
4. Request the scope:
|
|
252
|
+
|
|
253
|
+
```text
|
|
254
|
+
https://www.googleapis.com/auth/tasks
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
Testing-mode OAuth refresh tokens can expire after seven days. Publish the OAuth app, or use an Internal app in a Workspace domain, when you need long-lived access. Treat the client secret and refresh token as passwords.
|
|
258
|
+
|
|
259
|
+
## Configuration
|
|
260
|
+
|
|
261
|
+
| Variable | Required | Description |
|
|
262
|
+
|---|---|---|
|
|
263
|
+
| `GOOGLE_TASKS_CLIENT_ID` | Yes* | OAuth client ID. |
|
|
264
|
+
| `GOOGLE_TASKS_CLIENT_SECRET` | Yes* | OAuth client secret. |
|
|
265
|
+
| `GOOGLE_TASKS_REFRESH_TOKEN` | Yes* | OAuth refresh token. |
|
|
266
|
+
| `GOOGLE_TASKS_ACCESS_TOKEN` | Yes* | Short-lived alternative to the OAuth trio. |
|
|
267
|
+
| `GOOGLE_TASKS_API_BASE` | No | Google Tasks API base URL override. |
|
|
268
|
+
| `GOOGLE_TASKS_TIMEOUT_MS` | No | Per-request timeout; default `60000` ms. |
|
|
269
|
+
| `GOOGLE_TASKS_MAX_RETRIES` | No | Temporary-error retries; default `3`. |
|
|
270
|
+
|
|
271
|
+
\* Provide either the OAuth trio or an access token.
|
|
272
|
+
|
|
273
|
+
Without credentials the server still starts and completes the MCP handshake; the first tool call then fails with a message naming the variables to set and asking for a restart.
|
|
274
|
+
|
|
275
|
+
## Data, limits and background work
|
|
276
|
+
|
|
277
|
+
- **Requests go to Google Tasks.** The local server refreshes Google OAuth tokens and calls the Tasks API. Its anonymous telemetry contains an installation ID, package version, AI client and platform versions, and tool names — never OAuth tokens, task content, tool arguments or prompts. Set `ASKADS_TELEMETRY=0` to opt out.
|
|
278
|
+
- **Google applies a daily quota.** The Tasks API has a courtesy limit of 50,000 queries per day per project. On `429`, the server uses backoff; reads also retry after network and `5xx` errors, while writes are not replayed after an uncertain failure — check the outcome with `get_task` instead.
|
|
279
|
+
- **There is no background polling.** The server runs only when called. `list_tasks` supports incremental sync through the `updated_min` filter, so an AI app with scheduled tasks can check for changes periodically without re-reading everything.
|
|
280
|
+
|
|
281
|
+
## Technical documentation
|
|
282
|
+
|
|
283
|
+
- [MCP capability catalog](./docs/capabilities/index.md) — task-oriented pages for every tool.
|
|
284
|
+
- [All tools and inputs](./docs/TOOLS.md)
|
|
285
|
+
- [Development documentation](./docs/DEVELOPMENT.md)
|
|
286
|
+
- [Publishing documentation](./docs/PUBLISHING.md)
|
|
287
|
+
- [Google Tasks API reference](https://developers.google.com/tasks)
|
|
288
|
+
|
|
289
|
+
## Support
|
|
290
|
+
|
|
291
|
+
Found a bug or need a scenario? [Create an issue](https://github.com/A1-x-Tech/mcp-google-tasks/issues) or write in [Telegram](https://t.me/a1_mcp).
|
|
292
|
+
|
|
293
|
+
<br>
|
|
294
|
+
|
|
295
|
+
<p align="center">
|
|
296
|
+
<img src="https://github.com/ztemerbekov/a1-yandex-kit-skills/raw/main/assets/images/mona-hifive-yandex-kit-warm.gif" alt="Две Моны дают пять" width="256">
|
|
297
|
+
</p>
|
|
298
|
+
|
|
299
|
+
<p align="center">
|
|
300
|
+
You made it to the end!
|
|
301
|
+
</p>
|
package/README.ru.md
ADDED
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
# <img src="./assets/a1-logo.svg" alt="A1" width="40"> Google Tasks MCP
|
|
2
|
+
|
|
3
|
+
[English](./README.md) | **Русский**
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/mcp-google-tasks)
|
|
6
|
+
[](https://github.com/A1-x-Tech/mcp-google-tasks/actions/workflows/ci.yml)
|
|
7
|
+
[](https://glama.ai/mcp/servers/A1-x-Tech/mcp-google-tasks)
|
|
8
|
+
[](./LICENSE)
|
|
9
|
+
|
|
10
|
+
**A1 Google Tasks MCP** позволяет AI-приложению управлять Google Tasks на естественном языке. Можно спланировать проект как список задач, разбить работу на подзадачи со сроками и заметками, отмечать сделанное и поддерживать порядок.
|
|
11
|
+
|
|
12
|
+
Сервер работает с Google Tasks API через ваш Google-аккаунт. Он отделяет обратимое завершение от безвозвратного удаления и явно показывает ограничения Tasks API, а не создаёт впечатление, что планировщику доступно всё.
|
|
13
|
+
|
|
14
|
+
- **15 инструментов.** Просмотр, создание и изменение списков и задач, перемещение задач, управление завершением, массовая очистка сделанного и прямой вызов API, когда отдельного инструмента нет.
|
|
15
|
+
- **Завершение обратимо, удаление — нет.** У `complete_task` есть отмена (`reopen_task`); инструменты удаления отделены и помечены как разрушительные.
|
|
16
|
+
- **Честные сроки.** API хранит только календарную дату — сервер не изображает планирование по часам; время дня записывается в заметки.
|
|
17
|
+
- **Минимальный scope Google.** Единственный scope `tasks` — без доступа к Drive, Calendar и Gmail.
|
|
18
|
+
|
|
19
|
+
Начните с запроса, который только читает данные:
|
|
20
|
+
|
|
21
|
+
> Покажи мои списки задач и всё, что нужно сделать до пятницы в списке по умолчанию.
|
|
22
|
+
|
|
23
|
+
[Подключить сервер](#быстрый-старт) · [Посмотреть сценарии](#что-можно-поручить) · [Открыть техническую документацию](#техническая-документация)
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Увидеть работу за минуту
|
|
28
|
+
|
|
29
|
+
> **Вы:** Что ещё не сделано в списке «Запуск сайта» и какие сроки на этой неделе?
|
|
30
|
+
>
|
|
31
|
+
> **Ассистент:** Показывает открытые задачи со сроками, заметками и подзадачами. Ничего не меняется.
|
|
32
|
+
>
|
|
33
|
+
> **Вы:** Добавь задачу «Разослать анонс запуска» со сроком в пятницу как подзадачу «Маркетинга».
|
|
34
|
+
>
|
|
35
|
+
> **Ассистент:** Показывает целевой список, родительскую задачу и предлагаемую задачу, затем запрашивает подтверждение перед созданием.
|
|
36
|
+
>
|
|
37
|
+
> **Вы:** Подтверждаю.
|
|
38
|
+
>
|
|
39
|
+
> **Ассистент:** Создаёт подзадачу со сроком в пятницу. Он ничего не завершает и не удаляет, пока вы не попросите об этом отдельно.
|
|
40
|
+
|
|
41
|
+
## Содержание
|
|
42
|
+
|
|
43
|
+
- [Быстрый старт](#быстрый-старт)
|
|
44
|
+
- [Что можно поручить](#что-можно-поручить)
|
|
45
|
+
- [Как меняется задача](#как-меняется-задача)
|
|
46
|
+
- [Что может измениться](#что-может-измениться)
|
|
47
|
+
- [Как получить доступ](#как-получить-доступ)
|
|
48
|
+
- [Конфигурация](#конфигурация)
|
|
49
|
+
- [Данные, лимиты и работа в фоне](#данные-лимиты-и-работа-в-фоне)
|
|
50
|
+
- [Техническая документация](#техническая-документация)
|
|
51
|
+
- [Поддержка](#поддержка)
|
|
52
|
+
|
|
53
|
+
## Быстрый старт
|
|
54
|
+
|
|
55
|
+
Нужны Node.js 20+, Google-аккаунт и OAuth-данные из проекта Google Cloud с включённым Google Tasks API.
|
|
56
|
+
|
|
57
|
+
1. [Подготовьте Google OAuth-доступ](#как-получить-доступ).
|
|
58
|
+
2. Добавьте сервер в AI-приложение.
|
|
59
|
+
3. Отправьте запрос, который только читает данные.
|
|
60
|
+
|
|
61
|
+
<details open>
|
|
62
|
+
<summary><strong>Codex</strong></summary>
|
|
63
|
+
|
|
64
|
+
<br>
|
|
65
|
+
|
|
66
|
+
**В приложении:** откройте **Settings → Plugins → MCP servers**, нажмите **Add server**, затем добавьте `npx -y mcp-google-tasks@latest` с `GOOGLE_TASKS_CLIENT_ID`, `GOOGLE_TASKS_CLIENT_SECRET` и `GOOGLE_TASKS_REFRESH_TOKEN`.
|
|
67
|
+
|
|
68
|
+
**В командной строке:**
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
codex mcp add google-tasks \
|
|
72
|
+
--env GOOGLE_TASKS_CLIENT_ID=your_client_id \
|
|
73
|
+
--env GOOGLE_TASKS_CLIENT_SECRET=your_client_secret \
|
|
74
|
+
--env GOOGLE_TASKS_REFRESH_TOKEN=your_refresh_token \
|
|
75
|
+
-- npx -y mcp-google-tasks@latest
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
codex mcp list
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
[Документация Codex MCP](https://learn.chatgpt.com/docs/extend/mcp?surface=cli)
|
|
83
|
+
|
|
84
|
+
</details>
|
|
85
|
+
|
|
86
|
+
<details>
|
|
87
|
+
<summary><strong>Claude Code</strong></summary>
|
|
88
|
+
|
|
89
|
+
<br>
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
claude mcp add \
|
|
93
|
+
--env GOOGLE_TASKS_CLIENT_ID=your_client_id \
|
|
94
|
+
--env GOOGLE_TASKS_CLIENT_SECRET=your_client_secret \
|
|
95
|
+
--env GOOGLE_TASKS_REFRESH_TOKEN=your_refresh_token \
|
|
96
|
+
--transport stdio --scope user google-tasks \
|
|
97
|
+
-- npx -y mcp-google-tasks@latest
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
claude mcp list
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
[Документация Claude Code MCP](https://code.claude.com/docs/en/mcp)
|
|
105
|
+
|
|
106
|
+
</details>
|
|
107
|
+
|
|
108
|
+
<details>
|
|
109
|
+
<summary><strong>Claude Desktop</strong></summary>
|
|
110
|
+
|
|
111
|
+
<br>
|
|
112
|
+
|
|
113
|
+
Откройте **Settings → Developer → Edit Config** и добавьте:
|
|
114
|
+
|
|
115
|
+
```json
|
|
116
|
+
{
|
|
117
|
+
"mcpServers": {
|
|
118
|
+
"google-tasks": {
|
|
119
|
+
"command": "npx",
|
|
120
|
+
"args": ["-y", "mcp-google-tasks@latest"],
|
|
121
|
+
"env": {
|
|
122
|
+
"GOOGLE_TASKS_CLIENT_ID": "your_client_id",
|
|
123
|
+
"GOOGLE_TASKS_CLIENT_SECRET": "your_client_secret",
|
|
124
|
+
"GOOGLE_TASKS_REFRESH_TOKEN": "your_refresh_token"
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Если **Edit Config** недоступна, отредактируйте `~/Library/Application Support/Claude/claude_desktop_config.json` на macOS или `%APPDATA%\Claude\claude_desktop_config.json` на Windows.
|
|
132
|
+
|
|
133
|
+
[Документация Claude Desktop MCP](https://support.claude.com/en/articles/10949351-getting-started-with-local-mcp-servers-on-claude-desktop)
|
|
134
|
+
|
|
135
|
+
</details>
|
|
136
|
+
|
|
137
|
+
<details>
|
|
138
|
+
<summary><strong>Cursor</strong></summary>
|
|
139
|
+
|
|
140
|
+
<br>
|
|
141
|
+
|
|
142
|
+
Добавьте в `~/.cursor/mcp.json` на macOS/Linux или `%USERPROFILE%\.cursor\mcp.json` на Windows:
|
|
143
|
+
|
|
144
|
+
```json
|
|
145
|
+
{
|
|
146
|
+
"mcpServers": {
|
|
147
|
+
"google-tasks": {
|
|
148
|
+
"type": "stdio",
|
|
149
|
+
"command": "npx",
|
|
150
|
+
"args": ["-y", "mcp-google-tasks@latest"],
|
|
151
|
+
"env": {
|
|
152
|
+
"GOOGLE_TASKS_CLIENT_ID": "your_client_id",
|
|
153
|
+
"GOOGLE_TASKS_CLIENT_SECRET": "your_client_secret",
|
|
154
|
+
"GOOGLE_TASKS_REFRESH_TOKEN": "your_refresh_token"
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
[Документация Cursor MCP](https://cursor.com/docs/mcp)
|
|
162
|
+
|
|
163
|
+
</details>
|
|
164
|
+
|
|
165
|
+
<details>
|
|
166
|
+
<summary><strong>VS Code</strong></summary>
|
|
167
|
+
|
|
168
|
+
<br>
|
|
169
|
+
|
|
170
|
+
Запустите **MCP: Open User Configuration** и добавьте:
|
|
171
|
+
|
|
172
|
+
```json
|
|
173
|
+
{
|
|
174
|
+
"servers": {
|
|
175
|
+
"google-tasks": {
|
|
176
|
+
"type": "stdio",
|
|
177
|
+
"command": "npx",
|
|
178
|
+
"args": ["-y", "mcp-google-tasks@latest"],
|
|
179
|
+
"env": {
|
|
180
|
+
"GOOGLE_TASKS_CLIENT_ID": "${input:tasks_client_id}",
|
|
181
|
+
"GOOGLE_TASKS_CLIENT_SECRET": "${input:tasks_client_secret}",
|
|
182
|
+
"GOOGLE_TASKS_REFRESH_TOKEN": "${input:tasks_refresh_token}"
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"inputs": [
|
|
187
|
+
{ "type": "promptString", "id": "tasks_client_id", "description": "Google OAuth client ID" },
|
|
188
|
+
{ "type": "promptString", "id": "tasks_client_secret", "description": "Google OAuth client secret", "password": true },
|
|
189
|
+
{ "type": "promptString", "id": "tasks_refresh_token", "description": "Google OAuth refresh token", "password": true }
|
|
190
|
+
]
|
|
191
|
+
}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Проверьте сервер командой **MCP: List Servers**.
|
|
195
|
+
|
|
196
|
+
[Документация VS Code MCP](https://code.visualstudio.com/docs/agent-customization/mcp-servers)
|
|
197
|
+
|
|
198
|
+
</details>
|
|
199
|
+
|
|
200
|
+
## Что можно поручить
|
|
201
|
+
|
|
202
|
+
### Посмотреть списки и спланировать день
|
|
203
|
+
|
|
204
|
+
- Покажи мои списки задач и открытые задачи в каждом из них.
|
|
205
|
+
- Что нужно сделать на этой неделе в списке по умолчанию? Вместе с подзадачами.
|
|
206
|
+
- Что изменилось со вчерашнего дня? Включая завершённые и скрытые задачи.
|
|
207
|
+
|
|
208
|
+
### Создать и организовать работу
|
|
209
|
+
|
|
210
|
+
- Создай список «Запуск сайта» с задачами по дизайну, контенту и QA.
|
|
211
|
+
- Добавь задачу со сроком в пятницу и заметками — как подзадачу «Маркетинга».
|
|
212
|
+
- Перемести задачу в начало списка, под другую задачу или в другой список.
|
|
213
|
+
|
|
214
|
+
### Отслеживать завершение
|
|
215
|
+
|
|
216
|
+
- Отметь задачу по ревью сделанной — и переоткрой, если работа вернётся.
|
|
217
|
+
- Убери все завершённые задачи из списка одним действием.
|
|
218
|
+
- Покажи скрытые задачи, которые убрали раньше.
|
|
219
|
+
|
|
220
|
+
## Как меняется задача
|
|
221
|
+
|
|
222
|
+
1. Задачи живут в **списках задач**. У каждого аккаунта есть встроенный список по умолчанию со специальным id `@default`; `create_tasklist` добавляет новые.
|
|
223
|
+
2. У задачи есть название, заметки и срок — **только дата**: API отбрасывает время, поэтому время дня записывается в заметки.
|
|
224
|
+
3. Порядок и вложенность меняются только через `move_task` — поле `position` в API доступно только на чтение.
|
|
225
|
+
4. Завершение задачи обратимо: `reopen_task` возвращает её. Удаление задачи или списка безвозвратно, а удаление списка уносит все задачи в нём.
|
|
226
|
+
|
|
227
|
+
Повторяющиеся задачи через API создать нельзя. Задачи, назначенные из Google Docs или Chat, можно читать, но нельзя создавать и переносить в другой список, а удаление такой задачи убирает её и в исходном документе. Серверного поиска и сортировки нет — сервер выдаёт задачи списком, а фильтрует их AI-приложение.
|
|
228
|
+
|
|
229
|
+
## Что может измениться
|
|
230
|
+
|
|
231
|
+
| Операция | Что происходит | Граница подтверждения |
|
|
232
|
+
|---|---|---|
|
|
233
|
+
| Чтение списков и задач | Читает списки, задачи и их фильтры | Ничего не меняет |
|
|
234
|
+
| Создание списка или задачи | Добавляет список или открытую задачу | Меняет Google Tasks |
|
|
235
|
+
| Обновление задачи или переименование списка | Меняет название, заметки или срок | Меняет задачу |
|
|
236
|
+
| Перемещение задачи | Меняет порядок, вложенность или список | Меняет задачу |
|
|
237
|
+
| Завершение или переоткрытие задачи | Переключает статус завершения | Обратимое изменение |
|
|
238
|
+
| Очистка завершённых задач | Убирает все завершённые задачи списка из вида | Разрушительно |
|
|
239
|
+
| Удаление задачи или списка | Удаляет задачу — или список со всем содержимым | Разрушительно |
|
|
240
|
+
| Технический запрос API | Может вызвать метод API без отдельного инструмента | Потенциально разрушительно |
|
|
241
|
+
|
|
242
|
+
Как AI-приложение просит подтверждение, определяет само приложение. Сервер помечает операции чтения, записи и удаления, чтобы оно отличило проверку от рабочего изменения.
|
|
243
|
+
|
|
244
|
+
## Как получить доступ
|
|
245
|
+
|
|
246
|
+
Google Tasks требует OAuth 2.0: одного API-ключа недостаточно.
|
|
247
|
+
|
|
248
|
+
1. Создайте или выберите проект Google Cloud и включите **Google Tasks API**.
|
|
249
|
+
2. Настройте OAuth consent screen и создайте OAuth-клиент типа **Desktop app**.
|
|
250
|
+
3. Авторизуйте Google-аккаунт, которому принадлежат задачи. [OAuth 2.0 Playground](https://developers.google.com/oauthplayground) поможет получить refresh token, если включить **Use your own OAuth credentials**.
|
|
251
|
+
4. Запросите scope:
|
|
252
|
+
|
|
253
|
+
```text
|
|
254
|
+
https://www.googleapis.com/auth/tasks
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
Refresh token OAuth-приложения в режиме Testing может истечь через семь дней. Для долгого доступа опубликуйте OAuth-приложение или используйте Internal-приложение в домене Workspace. Храните client secret и refresh token как пароли.
|
|
258
|
+
|
|
259
|
+
## Конфигурация
|
|
260
|
+
|
|
261
|
+
| Переменная | Обязательна | Описание |
|
|
262
|
+
|---|---|---|
|
|
263
|
+
| `GOOGLE_TASKS_CLIENT_ID` | Да* | OAuth client ID. |
|
|
264
|
+
| `GOOGLE_TASKS_CLIENT_SECRET` | Да* | OAuth client secret. |
|
|
265
|
+
| `GOOGLE_TASKS_REFRESH_TOKEN` | Да* | OAuth refresh token. |
|
|
266
|
+
| `GOOGLE_TASKS_ACCESS_TOKEN` | Да* | Короткоживущая альтернатива OAuth-тройке. |
|
|
267
|
+
| `GOOGLE_TASKS_API_BASE` | Нет | Переопределяет базовый URL Google Tasks API. |
|
|
268
|
+
| `GOOGLE_TASKS_TIMEOUT_MS` | Нет | Тайм-аут одного запроса; по умолчанию `60000` мс. |
|
|
269
|
+
| `GOOGLE_TASKS_MAX_RETRIES` | Нет | Повторы временных ошибок; по умолчанию `3`. |
|
|
270
|
+
|
|
271
|
+
\* Передайте OAuth-тройку или access token.
|
|
272
|
+
|
|
273
|
+
Без учётных данных сервер всё равно запускается и завершает MCP-рукопожатие; первый вызов инструмента вернёт ошибку, которая назовёт нужные переменные и попросит перезапуск.
|
|
274
|
+
|
|
275
|
+
## Данные, лимиты и работа в фоне
|
|
276
|
+
|
|
277
|
+
- **Запросы идут в Google Tasks.** Локальный сервер обновляет OAuth-токены Google и вызывает Tasks API. Анонимная телеметрия содержит ID установки, версию пакета, версии AI-клиента и платформы и имена инструментов — но не OAuth-токены, содержимое задач, аргументы или промпты. Чтобы отключить её, задайте `ASKADS_TELEMETRY=0`.
|
|
278
|
+
- **У Google есть дневная квота.** Лимит Tasks API — 50 000 запросов в день на проект. При `429` сервер использует задержку; чтение также повторяется после сетевых и `5xx` ошибок, а запись после неопределённой ошибки не повторяется — вместо этого проверьте результат через `get_task`.
|
|
279
|
+
- **Постоянного опроса нет.** Сервер работает только при вызове. `list_tasks` поддерживает инкрементальную синхронизацию через фильтр `updated_min`, поэтому AI-приложение с заданиями по расписанию может периодически проверять изменения, не перечитывая всё.
|
|
280
|
+
|
|
281
|
+
## Техническая документация
|
|
282
|
+
|
|
283
|
+
- [Каталог MCP-возможностей](./docs/capabilities/index.md) — страницы по пользовательским задачам для каждого инструмента.
|
|
284
|
+
- [Все инструменты и параметры](./docs/TOOLS.md)
|
|
285
|
+
- [Документация по разработке](./docs/DEVELOPMENT.md)
|
|
286
|
+
- [Документация по публикации](./docs/PUBLISHING.md)
|
|
287
|
+
- [Справочник Google Tasks API](https://developers.google.com/tasks)
|
|
288
|
+
|
|
289
|
+
## Поддержка
|
|
290
|
+
|
|
291
|
+
Нашли ошибку или не хватает сценария? [Создайте issue](https://github.com/A1-x-Tech/mcp-google-tasks/issues) или напишите в [Telegram](https://t.me/a1_mcp).
|
|
292
|
+
|
|
293
|
+
<br>
|
|
294
|
+
|
|
295
|
+
<p align="center">
|
|
296
|
+
<img src="https://github.com/ztemerbekov/a1-yandex-kit-skills/raw/main/assets/images/mona-hifive-yandex-kit-warm.gif" alt="Две Моны дают пять" width="256">
|
|
297
|
+
</p>
|
|
298
|
+
|
|
299
|
+
<p align="center">
|
|
300
|
+
Вы дочитали до конца!
|
|
301
|
+
</p>
|