Skip to main content
Glama
Google Forms MCP Server

Google Forms MCP Server

by geoigarashi

Google Forms MCP Server

Local Model Context Protocol (stdio) server written in Python 3.12+ using the official mcp (MCPServer) SDK. It exposes 34 tools and 1 resource covering Google Forms API v1 and Google Drive API v3 form management.

Features

  • Form lifecycle: Create forms with initial items in one call, read schemas, update titles/descriptions, toggle quiz mode and email collection, and control publish/response state.

  • All supported item types: Short/paragraph text, radio/checkbox/dropdown choices (with "Other" and conditional section branching), linear scales, icon ratings, date, time/duration, choice/checkbox grids, sections, text blocks, public HTTPS images, and YouTube videos.

  • Quiz grading and analytics: Set point values, answer keys, and feedback; fetch paginated responses with question title enrichment; compute per-question counts and quiz score summaries locally.

  • Cloud Pub/Sub watches: Create, list, renew, and delete 7-day watches for SCHEMA or RESPONSES events.

  • Drive management: List, copy, rename, move, share, and trash or delete forms (drive.file scope).

Related MCP server: Google Forms MCP

Documentation

  • Setup Guide: Google Cloud Console setup, OAuth authorization, Antigravity 2.0 and MCP client configuration, and troubleshooting.

  • API Reference: Complete reference for all 34 tools, the google-forms://capabilities resource, scopes, error types, and API limits.

  • Examples: Practical prompts and JSON payloads for surveys, quizzes, section branching, response summaries, Drive operations, and watches.

  • Contributing: Local dev setup, linting, and test commands.

Quick Start

1. Install

git clone https://github.com/geoigarashi/google-forms-mcp.git
cd google-forms-mcp
python -m venv .venv
# Windows (PowerShell)
.\.venv\Scripts\python.exe -m pip install -e .
# macOS / Linux
source .venv/bin/activate
pip install -e .

2. Add Google OAuth Credentials and Authorize Once

  1. Create a Desktop App OAuth 2.0 client in Google Cloud Console with Google Forms API and Google Drive API enabled.

  2. Save the downloaded client JSON to secrets/credentials.json.

  3. Run the one-time interactive authorization from your terminal:

python -m google_forms_mcp --check-config
python -m google_forms_mcp --auth

See Setup Guide for full details, including adding Test users when sharing with another Google account.

3. Configure Your MCP Client

For Antigravity 2.0, add "google-forms" to your global config file (C:\Users\<YourUser>\.gemini\config\mcp_config.json on Windows, or ~/.gemini/config/mcp_config.json on macOS/Linux):

{
  "mcpServers": {
    "google-forms": {
      "command": "/path/to/google-forms-mcp/.venv/bin/python",
      "args": ["-m", "google_forms_mcp"],
      "env": {
        "GOOGLE_MCP_CREDENTIALS_PATH": "/path/to/google-forms-mcp/secrets/credentials.json",
        "GOOGLE_MCP_TOKEN_PATH": "/path/to/google-forms-mcp/secrets/token.json",
        "GOOGLE_MCP_LOG_LEVEL": "INFO"
      }
    }
  }
}

On Windows, use "C:\\path\\to\\google-forms-mcp\\.venv\\Scripts\\python.exe" and Windows-style escaped paths (\\). Restart your MCP client and open a new conversation.

Architecture

src/google_forms_mcp/
├── __init__.py       # Package version
├── __main__.py       # CLI entrypoint (--auth, --check-config, stdio MCP loop)
├── exceptions.py     # Error hierarchy (Config, Auth, Validation, FormsAPI, DriveAPI)
├── config.py         # .env and environment settings loader (pathlib.Path)
├── auth.py           # OAuth 2.0 credential manager (non-interactive stdio safety)
├── schemas.py        # Pydantic v2 schemas and domain validators
├── builders.py       # Pure Google Forms API v1 JSON payload builders
├── analytics.py      # Local response enrichment and summary statistics
├── forms_client.py   # Google Forms API v1 client
├── drive_client.py   # Google Drive API v3 client scoped to Forms files
└── server.py         # MCPServer tool and resource definitions

Development and Tests

ruff check .
ruff format --check .
pytest -v

License

MIT

Available Tools

34 tools
add_choice_questionC

Add a RADIO, CHECKBOX, or DROP_DOWN choice question (supports 'Other' and branching).

Inputs: title (required), form_id (required), options (required), choice_type (required), +6 more. Returns: object

add_date_questionB

Add a date question (optionally including year and/or time of day).

Inputs: title (required), form_id (required), image, index, +5 more. Returns: object

add_grid_questionC

Add a multiple-choice or checkbox grid matrix question.

Inputs: rows (required), title (required), columns (required), form_id (required), +5 more. Returns: object

add_image_itemC

Add a standalone image item from a public HTTPS source URI.

Inputs: image (required), form_id (required), index, title, +1 more. Returns: object

add_questionsC

Add one or more questions, grids, sections, or media items in one batch.

Inputs: items (required), form_id (required), start_index, include_form_in_response. Returns: object

add_rating_questionB

Add an icon-based rating question (STAR, HEART, or THUMB_UP, 3..10 levels).

Inputs: title (required), form_id (required), image, index, +5 more. Returns: object

add_scale_questionC

Add a linear numeric scale question (low 0..1, high 2..10).

Inputs: title (required), form_id (required), low, high, +7 more. Returns: object

add_sectionC

Add a section / page break divider to split a form into multiple pages.

Inputs: title (required), form_id (required), index, description. Returns: object

add_text_blockC

Add a non-interactive title and description block to a form.

Inputs: title (required), form_id (required), index, description. Returns: object

add_text_questionC

Add a short-answer or paragraph text question to a form.

Inputs: title (required), form_id (required), image, index, +4 more. Returns: object

add_time_questionC

Add a time-of-day or elapsed duration question.

Inputs: title (required), form_id (required), image, index, +4 more. Returns: object

add_video_itemC

Add a standalone YouTube video item to a form.

Inputs: video (required), form_id (required), index, title, +2 more. Returns: object

batch_update_formC

Execute raw Google Forms API batchUpdate requests atomically.

Inputs: form_id (required), requests (required), write_control, include_form_in_response. Returns: object

copy_formC

Duplicate an existing Google Form (template cloning) in Drive.

Inputs: form_id (required), new_name (required), folder_id. Returns: object

create_formA

Create a new Google Form and optionally configure settings and initial items.

Args: title: Visible title shown to respondents at the top of the form. document_title: Filename shown in Google Drive (defaults to title). description: Optional form instructions or subtitle. unpublished: Create in unpublished state (requires set_publish_settings later). is_quiz: Enable quiz grading mode before adding graded items. email_collection_type: DO_NOT_COLLECT, VERIFIED, or RESPONDER_INPUT. items: Optional ordered list of questions, sections, text blocks, or media.

Returns: Created Form resource including formId, responderUri, and editUri.

Inputs: title (required), items, is_quiz, description, +3 more. Returns: object

create_watchC

Create a 7-day Cloud Pub/Sub watch for SCHEMA or RESPONSES events.

Inputs: form_id (required), event_type (required), topic_name (required), watch_id. Returns: object

delete_formA

Move a form to Google Drive trash (default) or permanently delete it.

Inputs: form_id (required), permanent. Returns: object

delete_itemC

Remove the item at index from a form.

Inputs: index (required), form_id (required), required_revision_id. Returns: object

delete_watchC

Delete a watch subscription from a form.

Inputs: form_id (required), watch_id (required). Returns: object

get_formB

Retrieve the full schema, settings, publish state, and items of a Google Form.

Inputs: form_id (required). Returns: object

get_responseC

Retrieve a single form response by its responseId.

Inputs: form_id (required), response_id (required), include_question_titles. Returns: object

list_formsC

List Google Forms files in Drive filtered by optional name substring.

Inputs: query, page_size, page_token, include_trashed. Returns: object

list_responsesC

List submitted responses with optional RFC3339 timestamp filter and pagination.

Inputs: form_id (required), fetch_all, page_size, page_token, +2 more. Returns: object

list_watchesB

List all Cloud Pub/Sub watches registered on a form.

Inputs: form_id (required). Returns: object

move_form_to_folderC

Move a Google Form file to a target Google Drive folder.

Inputs: form_id (required), folder_id (required). Returns: object

move_itemC

Move an item from original_index to new_index within a form.

Inputs: form_id (required), new_index (required), original_index (required), required_revision_id. Returns: object

rename_form_documentC

Rename a form's Google Drive document title (documentTitle).

Inputs: form_id (required), document_title (required). Returns: object

renew_watchB

Renew an expiring watch for another 7 days.

Inputs: form_id (required), watch_id (required). Returns: object

set_publish_settingsB

Publish, unpublish, or open/close response collection on a form.

Inputs: form_id (required), is_published (required), is_accepting_responses (required). Returns: object

share_formC

Share a Google Form in Drive with a user, group, domain, or anyone.

Inputs: role (required), form_id (required), share_type (required), domain, +2 more. Returns: object

summarize_responsesA

Aggregate all form responses into per-question counts and quiz score metrics.

Inputs: form_id (required), filter_expr. Returns: object

update_form_infoC

Update the respondent-visible title and/or description of a form.

Inputs: form_id (required), title, description, required_revision_id. Returns: object

update_form_settingsC

Update quiz mode and/or respondent email collection policy on a form.

Inputs: form_id (required), is_quiz, required_revision_id, email_collection_type. Returns: object

update_itemC

Update or replace an existing item at the specified zero-based index.

Inputs: item (required), index (required), form_id (required), update_mask, +1 more. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 34 tools

    Disambiguation4/5

    Most tools target clearly distinct resources or actions: question-type adders, response readers, watch management, and Drive operations are separable. Some overlap remains between the granular add_* tools, the batch add_questions tool, and the raw batch_update_form escape hatch, which could make an agent hesitate between them.

    Naming Consistency5/5

    Names consistently use snake_case verb_noun patterns such as create_form, get_form, add_text_question, list_responses, and delete_watch. Minor plural/singular variation (add_questions vs add_text_question) does not break the predictable convention.

    Tool Count2/5

    At 34 tools, the surface is heavy, and many granular add_* tools duplicate capabilities already available through add_questions and batch_update_form. The domain is broad, but several tools could be consolidated without losing functionality.

    Completeness5/5

    The set covers form lifecycle (create/get/update/delete/copy), item authoring and reordering, settings and publishing, response listing/retrieval/summarization, watches, and Drive sharing/folder operations. No obvious workflow dead end appears for the stated Google Forms domain.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers