Includes version control capabilities for managing Google Apps Script projects, supporting feature branch management and safe merging of local and cloud code.
Allows for the automation of Gmail tasks, including processing incoming emails, sending bulk messages, and managing drafts via Google Apps Script.
Provides a bridge for automating various Google Workspace services including Google Drive for file organization and Google Calendar for event management.
Enables AI assistants to create, manage, and deploy Google Apps Script projects with features like local development support, automatic cloud synchronization, and production deployment pipelines.
Integrates with Google Cloud for project configuration, enabling the Google Apps Script API, and managing OAuth 2.0 credentials.
Supports the creation of custom spreadsheet functions, data processing automation, and custom user interface menus within Google Sheets.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Google Apps Script (GAS) ServerCreate a custom menu in Sheets to highlight duplicates and remove empty rows"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Google Apps Script Server
π€ + π = β‘
Let AI assistants build and manage Google Apps Script projects for you
π Quick Start β’ π‘ Use Cases β’ π οΈ Features β’ π Docs
π― Why MCP GAS Server?
The Problem
Google Apps Script is powerful for automating Google Workspace, but developing GAS projects traditionally requires:
Switching between local development and the online editor
Manual copy-pasting of code
No proper module system or version control
Limited tooling for testing and deployment
The Solution
MCP GAS Server bridges AI assistants with Google Apps Script, enabling:
AI-Driven Development: Tell Claude/Cursor what to build, and it handles the implementation
Full CommonJS Modules:
require(),module.exports, automatic dependency resolution - write GAS like Node.jsAd-hoc Execution: Run any JavaScript expression instantly - no deployment, no wrapper functions needed
Production Deployment Pipeline: dev β staging β prod workflow with version control, promotion, and rollback
Unix-inspired Interface: Familiar commands (
cat,grep,ls,find,sed) for intuitive GAS project managementLocal Development: Write code locally with full IDE support
Automatic Sync: Bidirectional sync between local files and Google's cloud
Git Integration: Version control for your GAS projects with safe merging
Who Is This For?
Developers who want AI to handle Google Apps Script boilerplate
Teams automating Google Workspace workflows
Non-programmers who need custom Google Sheets functions or automation
Anyone tired of the limitations of Google's online script editor
π‘ Use Cases
What You Can Build
π Custom Spreadsheet Functions: Complex calculations, data processing, API integrations
π§ Email Automation: Process Gmail, send bulk emails, manage drafts
π Calendar Management: Schedule events, sync calendars, automate meeting creation
ποΈ Drive Automation: File organization, backup systems, document generation
π Document Processing: Generate reports, merge documents, extract data
π API Integrations: Connect Google Workspace to external services
π€ Chatbots & Add-ons: Build custom tools for Sheets, Docs, and Forms
Real Examples
π Quick Start
β‘ 30-Second Installation
π― Fully Automated (Recommended)
This single command: downloads β installs dependencies β builds β configures all IDEs
β OR β
π§ Manual Installation
Clone first, then run installer with more control
Prerequisites
Requirement | Why Needed | How to Get | Auto-Checked? |
Git | Clones repository | β Yes | |
Node.js 18+ | Runs the MCP server | β Yes | |
Google Account | Access Google Apps Script | β Manual | |
AI Assistant | Sends commands to server | β Detected |
π― First Project in 2 Minutes
Install (if not already done)
Tell your AI assistant:
"Create a Google Apps Script project that adds a custom menu to Google Sheets with options to highlight duplicate values and remove empty rows"
AI handles everything:
β Creates the project
β Writes the code
β Sets up the menu
β Deploys to Google
β Tests the functionality
βοΈ Installation Details
What the Installer Does
The install.sh script handles everything automatically:
π Downloads Repository (if using curl)
π¦ Installs Dependencies (
npm install)π¨ Builds Project (
npm run build)π Detects Your IDEs (checks for 10+ IDEs)
βοΈ Configures Each IDE (updates MCP settings)
π Links to (production build)
Features:
β Idempotent - Safe to run multiple times
πΎ Creates Backups - Before any modifications
π Checks OAuth - Guides you through Google setup
Command-line Options
Manual Build (Advanced)
If the installer fails or you need custom setup:
Note: The server binary is at dist/src/index.js after building, not in the source directory.
Uninstallation
π Google Cloud Setup
One-Time Configuration
Enable Google Apps Script API:
Visit Google Cloud Console
Create or select a project
Search for "Google Apps Script API" and enable it
Create OAuth 2.0 Credentials:
Navigate to APIs & Services β Credentials
Click "Create Credentials" β "OAuth client ID"
Application type: Desktop app
Download JSON and save as
oauth-config.jsonin project root
π₯οΈ Supported IDEs
The MCP GAS Server works with any MCP-compatible client:
IDE/Editor | Platform Support | Configuration File | Notes |
Claude Desktop | macOS, Windows |
| Official Anthropic desktop app |
Claude Code | macOS, Linux |
| Claude's code editor |
Cursor IDE | All platforms |
| AI-powered IDE |
VS Code | All platforms |
| Microsoft's editor |
VS Code Insiders | All platforms |
| Preview version |
VSCodium | All platforms |
| Open-source VS Code |
Zed Editor | macOS, Linux |
| Uses |
Windsurf IDE | All platforms |
| Codeium's AI IDE |
Neovim MCPHub | All platforms |
| Neovim plugin |
Codex CLI | All platforms |
| Uses TOML format |
Claude Desktop
VS Code
Zed Editor (uses context_servers)
Codex CLI (uses TOML)
π¦ What's Included
π οΈ 50 Specialized Tools
π File Management
ls- List filescat- Read fileswrite- Write filesrm- Delete filesmv- Move filescp- Copy filesmkdir- Create folders
π Search & Edit
grep- Search textfind- Find filesripgrep- Fast searchsed- Find & replace
β‘ Execution
run- Run codeexec- Execute functions
π Git Integration
rsync- Two-phase sync (planβexecute)git_feature- Feature branch managementconfig- Manage sync folder
π Deployment
deploy- Unified deployment management (promote/rollback/status/reset)
π Projects
project_create- New projectproject_set- Set currentproject_list- List all
Smart vs Raw Tools
Smart tools (
cat,write): Automatically handle CommonJS module wrappingRaw tools (
raw_cat,raw_write): Preserve exact file contentChoose based on whether you want automatic module management or full control
π When to Use MCP GAS Server
β Perfect For
Automation Projects: Gmail, Calendar, Drive, Sheets automation
Custom Functions: Complex spreadsheet formulas and data processing
API Integrations: Connecting Google Workspace to external services
Rapid Prototyping: Quick proof-of-concepts and MVPs
Learning GAS: Let AI teach by example
β Not Ideal For
Large Applications: Consider App Engine or Cloud Functions for complex apps
Real-time Systems: GAS has execution time limits (6 minutes)
Heavy Computing: Limited CPU/memory compared to dedicated servers
Sensitive Data: Evaluate security requirements carefully
π οΈ Advanced Features
Git Workflow Integration
Module System
First Project Example
π Quick Command Reference
Filesystem Operations (Unix-inspired)
Ad-hoc Code Execution
CommonJS Module Development
Git Integration
π§ Troubleshooting
Common Issues
Problem | Solution |
"Not authenticated" | Run |
"Script not found" | Check scriptId in gas-config.json |
"Module not found" | Ensure proper require() paths and file exists |
"Quota exceeded" | Wait or upgrade Google Cloud quotas |
"Permission denied" | Check OAuth scopes and project permissions |
Debug Mode
π Project Structure
π§ͺ Development
Setup
Testing
Architecture
The MCP GAS Server uses a layered architecture:
MCP Protocol Layer: Handles communication with AI assistants
Tool Layer: ~50 specialized tools for GAS operations
Authentication Layer: OAuth 2.0 PKCE flow with token management
API Client Layer: Google Apps Script API v1 client with rate limiting
File System Layer: Local caching and synchronization
π Documentation
Complete Tool Reference
docs/REFERENCE.md - Complete reference for all 63 tools with capabilities, limitations, and compatibility matrix
Developer Guides
docs/CROSS_TOOL_REFERENCES.md - Strategy for cross-tool references and workflow chaining
docs/SCHEMA_ENHANCEMENTS_SUMMARY.md - Progress tracking for schema improvements
Architecture Guide - System design and internals
Git Integration - Version control workflows
API Documentation - TypeScript API reference
Examples - Sample projects and use cases
Enhanced Tool Schemas
All tools now include:
Script Type Compatibility - Clear indication of standalone vs container-bound support
Limitations - Specific constraints, quotas, and API restrictions
Cross-Tool References - Prerequisites, next steps, alternatives, and error recovery guidance
β‘ Search Tool Preference - ripgrep is STRONGLY RECOMMENDED over grep for all searches (multi-pattern, smart case, context control, better performance)
π€ Contributing
We welcome contributions! See CONTRIBUTING.md for guidelines.
π Report bugs
π‘ Request features
π§ Submit pull requests
π License
MIT - See LICENSE for details.
π Acknowledgments
Built on:
Model Context Protocol by Anthropic
TypeScript, Node.js, and the amazing open-source community
π Ready to supercharge your Google Apps Script development?
Made with β€οΈ by the MCP GAS community