mcp-google-forms 1.3.2 → 1.4.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/README.md +15 -7
- package/README.ru.md +16 -8
- package/dist/tools/auth.js +3 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -56,7 +56,7 @@ Start with a read-only question:
|
|
|
56
56
|
You need Node.js 20+ and a Google account. Credentials are not required at install time — the server connects from the conversation.
|
|
57
57
|
|
|
58
58
|
1. Add the server to your AI app.
|
|
59
|
-
2. Say "connect Google Forms": the assistant
|
|
59
|
+
2. Say "connect Google Forms": the assistant gives you a Google sign-in link — [no Google Cloud project or OAuth client to create](#getting-access).
|
|
60
60
|
3. Ask the read-only question above.
|
|
61
61
|
|
|
62
62
|
<details open>
|
|
@@ -64,7 +64,7 @@ You need Node.js 20+ and a Google account. Credentials are not required at insta
|
|
|
64
64
|
|
|
65
65
|
<br>
|
|
66
66
|
|
|
67
|
-
**In the app:** open **Settings → MCP servers**, select **Add server**, choose **STDIO**, enter the command `npx -y mcp-google-forms@latest
|
|
67
|
+
**In the app:** open **Settings → MCP servers**, select **Add server**, choose **STDIO**, enter the command `npx -y mcp-google-forms@latest`, then select **Save** and **Restart**.
|
|
68
68
|
|
|
69
69
|
**From the command line:**
|
|
70
70
|
|
|
@@ -224,12 +224,20 @@ Google Forms requires OAuth 2.0; an API key is not enough. There are two ways in
|
|
|
224
224
|
|
|
225
225
|
### Connect from the chat (recommended)
|
|
226
226
|
|
|
227
|
-
Say "connect Google Forms"
|
|
227
|
+
Say "connect Google Forms". The server ships with a built-in OAuth client, so there is no Google Cloud project or OAuth client to create:
|
|
228
|
+
|
|
229
|
+
1. `start_login` returns a Google consent link. Open it **on this machine** and approve; the code comes back to a one-shot listener on `127.0.0.1` (PKCE), never through the chat.
|
|
230
|
+
2. `finish_login` exchanges the code and saves the tokens to `~/.config/mcp-google-forms/credentials.json` (mode 0600).
|
|
231
|
+
|
|
232
|
+
Google may show a **"Google hasn't verified this app"** screen while the app's verification is in progress: choose **Advanced → Go to A1 MCP**. The built-in client only identifies the app to Google — the tokens are issued to and stored on your machine, and A1 never receives them.
|
|
233
|
+
|
|
234
|
+
#### Use your own OAuth client
|
|
235
|
+
|
|
236
|
+
The built-in client and its Google API quota are shared by everyone who uses it. Bring your own client to get a quota of your own, or when a Google Workspace admin blocks third-party apps:
|
|
228
237
|
|
|
229
238
|
1. `setup_instructions` prints the checklist: create or select a Google Cloud project, enable **Google Forms API**, configure the consent screen and create a **Desktop app** OAuth client.
|
|
230
|
-
2. Download that client's JSON ("Download JSON") and give the assistant its **path** — `set_client` stores it owner-only. The secret never goes through the conversation.
|
|
231
|
-
3. `start_login`
|
|
232
|
-
4. `finish_login` exchanges the code and saves the tokens to `~/.config/mcp-google-forms/credentials.json` (mode 0600).
|
|
239
|
+
2. Download that client's JSON ("Download JSON") and give the assistant its **path** — `set_client` stores it owner-only. The secret never goes through the conversation. From then on it takes priority over the built-in client.
|
|
240
|
+
3. Run `start_login` and `finish_login` again.
|
|
233
241
|
|
|
234
242
|
The tokens are re-read on every call, so the connection works immediately — no restart of the AI app. `auth_status` shows what is connected, `logout` revokes and deletes it.
|
|
235
243
|
|
|
@@ -262,7 +270,7 @@ Every variable is optional — with none of them the server connects [from the c
|
|
|
262
270
|
| `GOOGLE_FORMS_TIMEOUT_MS` | No | Per-request timeout; default `60000` ms. |
|
|
263
271
|
| `GOOGLE_FORMS_MAX_RETRIES` | No | Temporary-error retries; default `3`. |
|
|
264
272
|
|
|
265
|
-
\*
|
|
273
|
+
\* Only for a setup without the in-chat login: provide either the OAuth trio or an access token.
|
|
266
274
|
|
|
267
275
|
## Data, limits and background work
|
|
268
276
|
|
package/README.ru.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
Сервер работает с Google Forms API через ваш Google-аккаунт. Он отличает черновую форму от опубликованной и явно показывает ограничения API, а не создаёт впечатление, что через форму можно сделать всё.
|
|
13
13
|
|
|
14
14
|
- **19 инструментов.** Проверка структуры формы и ответов, создание и редактирование форм и вопросов, управление публикацией и Pub/Sub watches.
|
|
15
|
-
- **Подключение из диалога.** Скажите «подключи Google Формы»: сервер
|
|
15
|
+
- **Подключение из диалога.** Скажите «подключи Google Формы»: встроенный OAuth-клиент уже есть — сервер даст ссылку на согласие Google, поймает редирект Google на `127.0.0.1` с PKCE и сам сохранит токены — без конфигов и перезапуска.
|
|
16
16
|
- **Осознанная публикация.** Формы, созданные через API, по умолчанию не опубликованы и не принимают ответы, пока вы их не опубликуете.
|
|
17
17
|
- **Ответы сохраняются как есть.** API умеет читать ответы, но не создавать и не редактировать их; инструмента отправки ответов у сервера нет.
|
|
18
18
|
- **Минимальные scope Google.** Используются `forms.body` и `forms.responses.readonly` без широкого доступа к Drive.
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
Нужны Node.js 20+ и Google-аккаунт. Учётные данные при установке не нужны: сервер подключается прямо в диалоге.
|
|
57
57
|
|
|
58
58
|
1. Добавьте сервер в AI-приложение.
|
|
59
|
-
2. Скажите «подключи Google Формы» — ассистент
|
|
59
|
+
2. Скажите «подключи Google Формы» — ассистент даст ссылку на согласие Google и [подключит аккаунт](#как-получить-доступ) — без проекта Google Cloud и без правки конфигов.
|
|
60
60
|
3. Отправьте запрос, который только читает данные.
|
|
61
61
|
|
|
62
62
|
<details open>
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
|
|
65
65
|
<br>
|
|
66
66
|
|
|
67
|
-
**В приложении:** откройте **Settings → MCP servers**, нажмите **Add server**, выберите **STDIO**, укажите команду `npx -y mcp-google-forms@latest
|
|
67
|
+
**В приложении:** откройте **Settings → MCP servers**, нажмите **Add server**, выберите **STDIO**, укажите команду `npx -y mcp-google-forms@latest`, затем нажмите **Save**, потом **Restart**.
|
|
68
68
|
|
|
69
69
|
**В командной строке:**
|
|
70
70
|
|
|
@@ -224,12 +224,20 @@ Google Forms требует OAuth 2.0: одного API-ключа недост
|
|
|
224
224
|
|
|
225
225
|
### Подключение из диалога (рекомендуемый путь)
|
|
226
226
|
|
|
227
|
-
Скажите «подключи Google
|
|
227
|
+
Скажите «подключи Google Формы». У сервера есть встроенный OAuth-клиент, поэтому создавать проект Google Cloud и OAuth-клиент не нужно:
|
|
228
|
+
|
|
229
|
+
1. `start_login` возвращает ссылку на согласие Google. Откройте её **на этой же машине** и подтвердите доступ: код возвращается на одноразовый слушатель `127.0.0.1` (PKCE), а не в чат.
|
|
230
|
+
2. `finish_login` меняет код на токены и кладёт их в `~/.config/mcp-google-forms/credentials.json` (права 0600).
|
|
231
|
+
|
|
232
|
+
Пока приложение проходит проверку Google, на шаге согласия может появиться экран **«Google hasn't verified this app»**: выберите **Advanced → Go to A1 MCP**. Встроенный клиент только называет приложение для Google — токены выдаются вашей машине и хранятся на ней, A1 их не получает.
|
|
233
|
+
|
|
234
|
+
#### Свой OAuth-клиент
|
|
235
|
+
|
|
236
|
+
Встроенный клиент и его квоту Google API делят все, кто им пользуется. Свой клиент даёт собственную квоту и нужен, если администратор Google Workspace блокирует сторонние приложения:
|
|
228
237
|
|
|
229
238
|
1. `setup_instructions` выдаёт чек-лист: создать или выбрать проект Google Cloud, включить **Google Forms API**, настроить consent screen и создать OAuth-клиент типа **Desktop app**.
|
|
230
|
-
2. Скачайте JSON этого клиента («Download JSON») и передайте ассистенту **путь** к файлу — `set_client` сохранит его с правами только для владельца. Секрет через переписку не проходит.
|
|
231
|
-
3. `start_login`
|
|
232
|
-
4. `finish_login` меняет код на токены и кладёт их в `~/.config/mcp-google-forms/credentials.json` (права 0600).
|
|
239
|
+
2. Скачайте JSON этого клиента («Download JSON») и передайте ассистенту **путь** к файлу — `set_client` сохранит его с правами только для владельца. Секрет через переписку не проходит. С этого момента он имеет приоритет над встроенным.
|
|
240
|
+
3. Снова выполните `start_login` и `finish_login`.
|
|
233
241
|
|
|
234
242
|
Токены перечитываются на каждый вызов, поэтому подключение действует немедленно — перезапускать AI-приложение не нужно. `auth_status` показывает состояние, `logout` отзывает токен и удаляет его.
|
|
235
243
|
|
|
@@ -262,7 +270,7 @@ Refresh token OAuth-приложения в режиме Testing может ис
|
|
|
262
270
|
| `GOOGLE_FORMS_TIMEOUT_MS` | Нет | Тайм-аут одного запроса; по умолчанию `60000` мс. |
|
|
263
271
|
| `GOOGLE_FORMS_MAX_RETRIES` | Нет | Повторы временных ошибок; по умолчанию `3`. |
|
|
264
272
|
|
|
265
|
-
\*
|
|
273
|
+
\* Нужны только для установки без входа из диалога: передайте OAuth-тройку или access token.
|
|
266
274
|
|
|
267
275
|
## Данные, лимиты и работа в фоне
|
|
268
276
|
|
package/dist/tools/auth.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { registerGoogleAuth, TokenProvider, unconfiguredPrefix, } from "@a1-x-tech/mcp-google-auth";
|
|
1
|
+
import { A1_DEFAULT_CLIENT, registerGoogleAuth, TokenProvider, unconfiguredPrefix, } from "@a1-x-tech/mcp-google-auth";
|
|
2
2
|
import { fail } from "./util.js";
|
|
3
3
|
/**
|
|
4
4
|
* The scopes an in-chat login requests (the per-task table lives in
|
|
@@ -19,6 +19,8 @@ export const AUTH_OPTIONS = {
|
|
|
19
19
|
serverName: "forms",
|
|
20
20
|
envPrefix: "GOOGLE_FORMS",
|
|
21
21
|
scopes: LOGIN_SCOPES,
|
|
22
|
+
// Built-in A1 OAuth client: login without a Google Cloud project. Env and set_client still win.
|
|
23
|
+
defaultClient: A1_DEFAULT_CLIENT,
|
|
22
24
|
// Login-tool failures go through the server's own renderer, so telemetry gets their origin.
|
|
23
25
|
fail,
|
|
24
26
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-google-forms",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "MCP server for the Google Forms API — create forms, manage questions, publish, read responses and watch for new submissions. For Claude, Cursor, Codex and other AI clients.",
|
|
5
5
|
"mcpName": "io.github.A1-x-Tech/mcp-google-forms",
|
|
6
6
|
"type": "module",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"url": "https://github.com/A1-x-Tech/mcp-google-forms/issues"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@a1-x-tech/mcp-google-auth": "^0.1.
|
|
52
|
+
"@a1-x-tech/mcp-google-auth": "^0.1.3",
|
|
53
53
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
54
54
|
"zod": "^3.25.0"
|
|
55
55
|
},
|