How I created a comprehensive clasp MCP server and adapted another for Google Apps Script development
What is Google Apps Script?
For those unfamiliar, Google Apps Script is Google’s cloud-based JavaScript platform that lets you extend and automate Google Workspace applications like Sheets, Docs, Gmail, and Drive. Think of it as “VBA for Google” – you can write scripts that automatically process spreadsheets, send emails, create documents, and build web apps, all running on Google’s servers without needing your own hosting.
The best part? Google provides generous free quotas that let you run thousands of automation tasks daily at zero cost. You can schedule scripts to run every minute, process hundreds of emails, manipulate large spreadsheets, and serve web applications – all within the free tier. For small businesses and individual developers, it’s essentially unlimited free compute power for automation.
It’s incredibly powerful for automation and building internal tools, but the development experience has traditionally been limited to Google’s online editor. That’s where tools like clasp (Command Line Apps Script) come in, enabling local development with modern tools.
The Starting Point
If you’ve worked with AI assistants on Google Apps Script projects, you know the friction point: they can write great code, but then what? How do you get that code deployed? How do you manage versions? How do you handle the authentication that Google requires?
MCP (Model Context Protocol) provides a way to give AI assistants access to real tools. But when I started looking for MCP servers for Google Apps Script development, the options were limited.
Two Approaches, Two Servers
I ended up with two MCP servers, each taking a different approach:
1. Building clasp-enhanced-mcp from Scratch
I built this one from the ground up because I wanted AI assistants to have the same local development workflow that I use:
- Local files that work with any IDE
- Git integration for version control
- TypeScript support and modern JavaScript
- Full deployment capabilities
With 18 tools covering the complete clasp CLI, this server has been thoroughly tested in production. It powers an AI monitoring system that tracks 52 companies, and it’s been rock solid.
2. Adapting google-apps-script-mcp
This server is based on mohalmah’s google-apps-script-mcp-server. It takes a different approach, using Google’s Apps Script API directly with OAuth 2.0 authentication.
I adapted it to work with our system, adding some enhancements for error handling and logging. While it offers powerful capabilities like metrics and process monitoring, I’ll be honest: we primarily use the clasp server in production. The API server is included for completeness and for use cases that need direct API access, but it hasn’t seen the same level of battle testing.
Why Clasp Won for Our Use Case
After trying both approaches, we found clasp-enhanced-mcp better suited our needs:
- Simplicity: One login, and you’re done. No OAuth tokens to manage.
- Reliability: The CLI has been around for years and is well-maintained by Google.
- Workflow: It fits naturally into a Git-based development process.
- Testing: Local files mean you can test before deploying.
The Technical Implementation
Building clasp-enhanced-mcp involved:
- Wrapping every clasp command with proper error handling
- Parsing CLI output into structured JSON
- Adding features like version-specific cloning
- Ensuring compatibility with MCP’s JSON-RPC protocol
The result is 694 lines of JavaScript that makes the entire clasp workflow available to AI assistants.
Tools Enable Intelligence
One key insight from this project: tools don’t replace intelligence, they amplify it. By giving AI assistants access to the same tools developers use, we enable them to apply their capabilities in practical ways. An AI that can deploy and manage code is far more useful than one that can only write it.
Real-World Usage
These servers aren’t theoretical. The clasp server is the backbone of our AI competitive monitoring system. Every six hours, it:
- Deploys updated Google Apps Script code
- Manages versions and deployments
- Handles the entire development lifecycle
The system has been running for months without intervention.
Open Source and Available
Both servers are available on GitHub:
- clasp-enhanced-mcp – My from-scratch implementation for local development
- google-apps-script-mcp – Adapted from mohalmah’s work for direct API access
If you’re working with Google Apps Script and AI assistants, I’d recommend starting with clasp-enhanced-mcp. It’s thoroughly tested and provides a familiar development workflow.
What’s Next?
The MCP ecosystem is growing. These servers solve one specific problem, but there are countless opportunities to build tools that help AI assistants work with other platforms and services.
The goal isn’t to automate developers away—it’s to give AI assistants the tools they need to be genuinely helpful partners in the development process.
Have questions or want to contribute? Both repositories are open for issues and pull requests. Let’s build better tools together.

