LabscoMCP early access ↗
whichguyMCP SERVER

MCP Google Apps Script Server

Google Apps Script from your editor: Unix-style file tools over a script project, real CommonJS modules with require(), ad-hoc code execution, and a dev-to-prod deployment path.

by whichguy ↗Office Suites & Cloud File StorageCommunity

LABSCO SUMMARY

Ad-hoc execution is what makes the loop tight.

Running a statement directly against the project — Math.PI * 2, a DriveApp call, a function from your own module — means no deploy step between writing code and seeing whether it works. The smart-versus-raw split is the other design decision worth understanding: the default tools wrap and unwrap CommonJS for you, and the raw variants exist for when you need the file exactly as stored. One limit is worth knowing before you start: on a script bound to a Sheet or Doc, log cannot retrieve historical logs — run the code through exec instead, which returns the Logger output alongside the result.

What it is

An MCP server that puts Google Apps Script projects under an assistant's control. It brings three things the online editor does not have: a module system with require() and module.exports, execution of arbitrary JavaScript without deploying a wrapper function, and bidirectional sync with local files under git.

What you get

  • Filesystem operations in familiar shapes — ls, cat, write, rm, mv, cp, mkdir
  • Search and edit across a project: multi-pattern search with case control and context lines, plain search, filename matching, and regex find-and-replace — ripgrep, grep, find, sed
  • Execution without a deployment step: run a JavaScript statement against the project, including calls into Google services and into your own modules — run, exec
  • Smart tools that handle CommonJS wrapping automatically, with raw counterparts that preserve exact file content — cat and write versus raw_cat and raw_write
  • Project handling and a deployment path covering promote, rollback, status and reset — project_create, project_set, project_list, deploy
  • Git integration: stateless pull and push with a dry-run mode, feature branch management, and a sync folder you can point at a local repository — rsync, git_feature, config
  • OAuth handling as a tool call rather than a setup ritual — auth

Requirements

A Google account, the Google Apps Script API enabled in a Cloud project, and OAuth 2.0 credentials of type Desktop app saved as oauth-config.json in the project root. Node.js 18 or newer and git. Run from inside a clone of the repository, the installer script ./install.sh installs, builds and configures detected IDEs — it is idempotent, backs up configs first, and has dry-run, interactive, auto and force modes. After building, the server binary is at dist/src/index.js, not in the source directory. The package is gas-server (1.0.0 in package.json).

Setup effort

Build from source — git clone https://github.com/whichguy/gas_mcp.git