Google Forms MCP Server
Enables creation and management of Google Forms with support for all 12 question types, response collection, CSV export, and form publishing through OAuth-authenticated API access.
README
Google Forms MCP Server
Simple and reliable MCP server for Google Forms management. Optimized for HR managers creating feedback forms.
Features
✅ 15 essential tools (forms, questions, responses) ✅ All 12 Google Forms question types ✅ OAuth via .env (simple setup) ✅ Auto-publish forms ✅ CSV export for Excel ✅ ~640 lines of Python code ✅ One-command installation for Cursor IDE
🚀 Quick Start (Cursor IDE - Recommended)
Automated installation for non-technical users:
Linux/Mac:
git clone <repository-url>
cd google-forms-mcp
./install.sh
Windows:
git clone <repository-url>
cd google-forms-mcp
.\install.ps1
The installation script will:
- ✅ Install
uvpackage manager (if needed) - ✅ Install all Python dependencies
- ✅ Guide you through Google Cloud OAuth setup
- ✅ Generate and save your credentials automatically
- ✅ Configure Cursor IDE to use the MCP server
That's it! Restart Cursor and start using Google Forms tools in AI chat.
Test it:
Ask Cursor: "List my Google Forms" or "Create a feedback form"
Manual Installation (Advanced Users)
1. Install Dependencies
Option A: Using uv (recommended for Cursor):
# Install uv if not already installed
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install dependencies
uv sync
Option B: Using venv (traditional approach):
# Create virtual environment
python3 -m venv venv
# Activate virtual environment
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
2. Get OAuth Credentials
Create OAuth Client:
- Go to https://console.cloud.google.com
- Create project → Enable Forms API & Drive API
- Create OAuth client ID (Desktop app)
- Save client_id and client_secret
Get Refresh Token (Option A - Easiest):
- Go to https://developers.google.com/oauthplayground/
- Settings → Use your own OAuth credentials
- Select scopes:
https://www.googleapis.com/auth/forms.bodyhttps://www.googleapis.com/auth/forms.responses.readonlyhttps://www.googleapis.com/auth/drive.file
- Authorize → Exchange code → Copy refresh_token
Get Refresh Token (Option B - Script):
python get_token.py
# Browser opens → Login → Copy credentials
3. Create .env File
GOOGLE_CLIENT_ID=123456789-xxx.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=GOCSPX-xxxx
GOOGLE_REFRESH_TOKEN=1//0gxxxx
4. Run Server (for testing)
Using uv:
uv run python main.py
Using venv:
# Activate virtual environment first
source venv/bin/activate
# Run the server
python main.py
5. Configure Your IDE
For Cursor IDE (Recommended):
Location:
- Linux/Mac:
~/.cursor/mcp.json - Windows:
%APPDATA%\Cursor\User\globalStorage\mcp.json
Configuration (using uv):
{
"mcpServers": {
"google-forms": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/google-forms-mcp",
"run",
"python",
"main.py"
]
}
}
}
Configuration (using venv):
{
"mcpServers": {
"google-forms": {
"command": "/absolute/path/to/google-forms-mcp/.venv/bin/python",
"args": ["/absolute/path/to/google-forms-mcp/main.py"]
}
}
}
For Claude Code:
Location: ~/.config/claude/config.json
Configuration (using uv):
{
"mcpServers": {
"google-forms": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/google-forms-mcp",
"run",
"python",
"main.py"
]
}
}
}
Configuration (using venv):
{
"mcpServers": {
"google-forms": {
"command": "/absolute/path/to/google-forms-mcp/venv/bin/python",
"args": ["/absolute/path/to/google-forms-mcp/main.py"]
}
}
}
Important: Replace /absolute/path/to/google-forms-mcp with your actual project location.
Available Tools
Forms Management
forms_create- Create new formforms_list- List all formsforms_get- Get form detailsforms_update- Update formforms_delete- Delete form
Questions
questions_add- Add question (12 types)questions_update- Update questionquestions_delete- Delete questionquestions_move- Reorder question
Sections
sections_add- Add section/page break
Responses
responses_list- List all responsesresponses_get- Get specific responseresponses_export_csv- Export to CSV
Utilities
forms_duplicate- Copy formforms_get_link- Get public link
Question Types Supported
- SHORT_ANSWER - Short text
- PARAGRAPH - Long text
- MULTIPLE_CHOICE - Radio buttons
- CHECKBOXES - Multiple selection
- DROPDOWN - Dropdown menu
- LINEAR_SCALE - 1-5, 1-10 scale
- DATE - Date picker
- TIME - Time picker
- FILE_UPLOAD - File upload
- MULTIPLE_CHOICE_GRID - Radio grid
- CHECKBOX_GRID - Checkbox grid
- RATING - Star/heart rating
Usage Example
User: Create feedback form
Claude: [calls forms_create]
✅ Form created: "Feedback Form"
Link: https://docs.google.com/forms/d/e/.../viewform
User: Add questions: name, department (Engineering/HR/Sales),
satisfaction 1-5
Claude: [calls questions_add 3 times]
✅ Added 3 questions
User: Show link
Claude: [calls forms_get_link]
📎 https://docs.google.com/forms/d/e/.../viewform
User: After a week - export responses
Claude: [calls responses_export_csv]
✅ Exported 15 responses to CSV
Project Structure
google-forms-mcp/
├── main.py # MCP server entry point
├── auth.py # OAuth from .env
├── forms_api.py # Google Forms API wrapper
├── tools.py # 15 MCP tools
├── get_token.py # One-time token getter
├── requirements.txt # Dependencies
├── .env # OAuth credentials (gitignored)
├── .env.example # Template
├── README.md # This file
└── SPECIFICATION.md # Complete spec
Architecture
Claude Code
↓ MCP Protocol
MCP Tools (15 tools)
↓ API Translation
Google Forms API Client
↓ OAuth (.env)
Google Forms API v1
Troubleshooting
OAuth Errors:
- Check .env has all 3 credentials
- Verify scopes are correct
- Regenerate refresh_token if expired
API Errors:
- Enable Forms API in Cloud Console
- Enable Drive API in Cloud Console
- Check API quotas
MCP Connection:
- Verify python path in config
- Test with
python main.pydirectly - Check MCP SDK version >=0.9.0
Security
.envfile is gitignored- Refresh token gives full account access
- Token auto-refreshes every hour
- Revoke: https://myaccount.google.com/permissions
For AI Agents / Claude Code
⚠️ IMPORTANT: This MCP server provides direct access to Google Forms. When working with this project:
- ✅ DO: Call MCP tools directly (forms_create, questions_add, etc.)
- ❌ DON'T: Use Context7/WebSearch to research Google Forms API
- ❌ DON'T: Look up JSON schemas or API documentation
Why? The API wrapper is already implemented. Just use the tools!
Quick Test: Try forms_list with no parameters to verify MCP server is working.
Known Issues & Analysis
⚠️ questions_add: Code is correct (verified against official docs), but may fail in some test environments. See claudedocs/GOOGLE_FORMS_API_FIXES.md for:
- Root cause analysis with official Google documentation
- Evidence-based fix recommendations
- Troubleshooting steps
Development
See SPECIFICATION.md for complete implementation details.
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.