Google Apps Script MCP
Write, version, deploy and run Google Apps Script projects from an AI assistant
- Pricing
- Open source
- Platforms
- CLI, Linux, macOS
- Runs
- Locally
- Version
- 1.1.2
- Listing updated
- today
Similar MCP servers
About Google Apps Script MCP
Google Apps Script MCP is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.
This server wraps the Google Apps Script API so an assistant can work on script projects with your Google account. It can create standalone or bound projects (attached to a Doc, Sheet, Slides or Form), read and edit code files, snapshot immutable versions, manage deployments, run functions and show execution history and metrics. The README lists 19 tools.
It is careful about what the underlying API cannot do. The API cannot list or delete projects, so the scriptId returned when a project is created is the only handle to keep. Updates merge by default, keeping the manifest and files you did not mention, while replace mode refuses a file set without the manifest. Versions are snapshots of the editable HEAD and can never be edited or deleted, and deployments point at versions so you can roll back without changing a URL. Running a function needs an API-executable deployment, and Apps Script stops any execution after 6 minutes.
Setup happens in the conversation: say you want to connect, and the server walks you through the OAuth client, catching Google's redirect on 127.0.0.1 with PKCE and storing the tokens itself. Each operation requests its own narrow scope. It needs Node.js 20 or later.
Install
Run in a terminal
claude mcp add mcp-google-apps-script --env GOOGLE_APPS_SCRIPT_CLIENT_SECRET='<GOOGLE_APPS_SCRIPT_CLIENT_SECRET>' --env GOOGLE_APPS_SCRIPT_REFRESH_TOKEN='<GOOGLE_APPS_SCRIPT_REFRESH_TOKEN>' --env GOOGLE_APPS_SCRIPT_ACCESS_TOKEN='<GOOGLE_APPS_SCRIPT_ACCESS_TOKEN>' -- npx -y mcp-google-apps-scriptAdd to claude_desktop_config.json
{
"mcpServers": {
"mcp-google-apps-script": {
"command": "npx",
"args": [
"-y",
"mcp-google-apps-script"
],
"env": {
"GOOGLE_APPS_SCRIPT_CLIENT_SECRET": "<GOOGLE_APPS_SCRIPT_CLIENT_SECRET>",
"GOOGLE_APPS_SCRIPT_REFRESH_TOKEN": "<GOOGLE_APPS_SCRIPT_REFRESH_TOKEN>",
"GOOGLE_APPS_SCRIPT_ACCESS_TOKEN": "<GOOGLE_APPS_SCRIPT_ACCESS_TOKEN>"
}
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"mcp-google-apps-script": {
"command": "npx",
"args": [
"-y",
"mcp-google-apps-script"
],
"env": {
"GOOGLE_APPS_SCRIPT_CLIENT_SECRET": "<GOOGLE_APPS_SCRIPT_CLIENT_SECRET>",
"GOOGLE_APPS_SCRIPT_REFRESH_TOKEN": "<GOOGLE_APPS_SCRIPT_REFRESH_TOKEN>",
"GOOGLE_APPS_SCRIPT_ACCESS_TOKEN": "<GOOGLE_APPS_SCRIPT_ACCESS_TOKEN>"
}
}
}
}Add to .vscode/mcp.json
{
"servers": {
"mcp-google-apps-script": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-google-apps-script"
],
"env": {
"GOOGLE_APPS_SCRIPT_CLIENT_SECRET": "<GOOGLE_APPS_SCRIPT_CLIENT_SECRET>",
"GOOGLE_APPS_SCRIPT_REFRESH_TOKEN": "<GOOGLE_APPS_SCRIPT_REFRESH_TOKEN>",
"GOOGLE_APPS_SCRIPT_ACCESS_TOKEN": "<GOOGLE_APPS_SCRIPT_ACCESS_TOKEN>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"mcp-google-apps-script": {
"command": "npx",
"args": [
"-y",
"mcp-google-apps-script"
],
"env": {
"GOOGLE_APPS_SCRIPT_CLIENT_SECRET": "<GOOGLE_APPS_SCRIPT_CLIENT_SECRET>",
"GOOGLE_APPS_SCRIPT_REFRESH_TOKEN": "<GOOGLE_APPS_SCRIPT_REFRESH_TOKEN>",
"GOOGLE_APPS_SCRIPT_ACCESS_TOKEN": "<GOOGLE_APPS_SCRIPT_ACCESS_TOKEN>"
}
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"mcp-google-apps-script": {
"command": "npx",
"args": [
"-y",
"mcp-google-apps-script"
],
"env": {
"GOOGLE_APPS_SCRIPT_CLIENT_SECRET": "<GOOGLE_APPS_SCRIPT_CLIENT_SECRET>",
"GOOGLE_APPS_SCRIPT_REFRESH_TOKEN": "<GOOGLE_APPS_SCRIPT_REFRESH_TOKEN>",
"GOOGLE_APPS_SCRIPT_ACCESS_TOKEN": "<GOOGLE_APPS_SCRIPT_ACCESS_TOKEN>"
}
}
}
}Using several servers? Build one config file with the MCP config generator.
Configuration
GOOGLE_APPS_SCRIPT_CLIENT_IDGoogle OAuth2 client id (refresh-token flow).GOOGLE_APPS_SCRIPT_CLIENT_SECRETGoogle OAuth2 client secret (refresh-token flow). Treat it as a secret.GOOGLE_APPS_SCRIPT_REFRESH_TOKENGoogle OAuth2 refresh token, exchanged for access tokens automatically. Treat it as a secret.GOOGLE_APPS_SCRIPT_ACCESS_TOKENStatic OAuth2 access token (~1h lifetime) — alternative to the refresh-token trio, mostly for testing.GOOGLE_APPS_SCRIPT_OAUTH_PORTFixed port for the loopback listener of the in-chat login (127.0.0.1 + PKCE). Set it when the client runs over SSH port forwarding; otherwise a free port is picked per login.GOOGLE_APPS_SCRIPT_API_BASEAPI root override.GOOGLE_APPS_SCRIPT_TIMEOUT_MSPer-request timeout in milliseconds.GOOGLE_APPS_SCRIPT_MAX_RETRIESRetries on transient errors (429 always; 5xx/network for reads).
Tools this server provides (4)
Taken from the project documentation; the running server may differ.
- create_project
- Creates a standalone or bound Apps Script project and returns its scriptId.
- update_project_content
- Merges or replaces code files for a project.
- create_version
- Snapshots HEAD as an immutable version.
- run_function
- Runs a function from an API-executable deployment.
What it does
- Project creation
- Make standalone scripts or ones bound to a Doc, Sheet, Slides or Form.
- Safe code updates
- Merge mode keeps the manifest and untouched files.
- Immutable versions
- Snapshot HEAD into versions that can't be edited.
- Deployments
- Expose versions as web apps or API executables and repoint them.
- Function runs
- Run a function and see the result or stack trace.
- Execution history
- Inspect runs, failures and usage metrics.
Good for
- Find which script functions failed this week
- Add a helper to one file without touching the rest
- Snapshot code before a refactor
- Deploy a version and roll it back to an earlier one
- Create a Sheet-bound automation script from a description
Pricing
Open source
Open-source npm package; Google API quotas apply
Google Apps Script MCP FAQ
Can it list my projects?
No. The Apps Script API can't list projects, so keep the scriptId returned by create_project.
Can it delete a project?
No. The API cannot delete projects; that means deleting the Drive file, which this server does not cover.
How does authentication work?
Google OAuth with PKCE in the chat, or a refresh-token or access-token environment variable.
Does it run unrequested code?
The README says writes need confirmation and that nothing is created, redeployed or run unless you ask separately.
What does it need?
Node.js 20 or later and a Google account.
Is Google Apps Script MCP free?
Yes. Google Apps Script MCP is open source, so you can use and self-host it for free.
How do I add Google Apps Script MCP to Claude Code?
Run this command in your terminal: claude mcp add mcp-google-apps-script --env GOOGLE_APPS_SCRIPT_CLIENT_SECRET='<GOOGLE_APPS_SCRIPT_CLIENT_SECRET>' --env GOOGLE_APPS_SCRIPT_REFRESH_TOKEN='<GOOGLE_APPS_SCRIPT_REFRESH_TOKEN>' --env GOOGLE_APPS_SCRIPT_ACCESS_TOKEN='<GOOGLE_APPS_SCRIPT_ACCESS_TOKEN>' -- npx -y mcp-google-apps-script
What are the best alternatives to Google Apps Script MCP?
The closest alternatives to Google Apps Script MCP are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.
Where this comes from
- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.


