# Google Apps Script MCP

> Google Apps Script MCP is an open-source MCP server for developer tools. Write, version, deploy and run Google Apps Script projects from an AI assistant. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Linux, macOS, Windows
- **Repository:** https://github.com/a1-x-tech/mcp-google-apps-script
- **MCP Registry name:** io.github.A1-x-Tech/mcp-google-apps-script
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-18

## About

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.

## Features

- **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

## Install

### Claude Code (Terminal)

```sh
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
```

### Claude Desktop (claude_desktop_config.json)

```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>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```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>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```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>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```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>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```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>"
      }
    }
  }
}
```

## Tools

- `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.

## 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.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/google-apps-script-mcp
