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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。