← Back to directory
C

clasp

Official
Command-line tool for developing Google Apps Script projects locally
GitHub source repository ↗
★ 5.8k Stars Category · Dev Tools Very popular
63FMRS · C
Reliability
8/20
Security and permissions
13/20
Maintenance
15/20
Documentation
15/20
Setup experience
12/20

clasp is a command-line tool maintained in Google's own GitHub org for local Apps Script development, with an experimental clasp mcp subcommand exposing it over STDIO to coding agents using the CLI's existing credentials. It covers project push/pull, deployments, versions, logs, and API management, but the MCP tool surface is limited and still evolving, OAuth scopes are broad, and push performs a full overwrite of the remote project — credentials and push operations should be handled carefully.

Read the FMRS scoring method →

clasp (Command Line Apps Script Projects) is a command-line tool maintained in Google's own GitHub org for developing Google Apps Script projects locally: pushing/pulling code, managing deployments and versions, running script functions remotely, tailing Stackdriver logs, and enabling/disabling Google APIs. Version 3.x adds an experimental clasp mcp mode that runs clasp as a local MCP server over STDIO transport for use by coding agents such as Claude Code and Gemini CLI, reusing the same credentials as the CLI (requires a prior clasp login). The README explicitly states this is 'not an officially supported Google product,' and the MCP mode currently offers only a limited subset of tools.

Tools

The tool list has not been reviewed yet.

Setup

1) Install globally: npm install -g @google/clasp; 2) Enable the Google Apps Script API at https://script.google.com/home/usersettings; 3) Run clasp login to authorize (the MCP server reuses these saved credentials); 4) Wire it into a coding agent — in Claude Code either run /plugin install @google/clasp, or manually run claude mcp add clasp -- npx -y @google/clasp mcp (or claude mcp add-json clasp "$(cat claude-mcp.json)" using the repo's config file); in Gemini CLI run gemini extensions install https://github.com/google/clasp.

claude_desktop_config.json
{"mcpServers":{"clasp":{"command":"npx","args":["-y","@google/clasp","mcp"]}}}

Fit and risk

Best for

  • Developers who want to develop Google Apps Script locally with their own editor and Git workflow
  • Teams that need version control and collaboration for Apps Script projects
  • Users who want an AI coding agent (Claude Code, Gemini CLI) to manage Apps Script projects directly

Not for

  • General cloud storage or database integrations unrelated to Apps Script
  • Scenarios requiring vendor-backed official support SLAs (the README explicitly states it is not an officially supported Google product)
  • Projects relying on clasp 2.x's built-in TypeScript transpilation (removed in 3.x — use a bundler like Rollup instead)
  • Non-interactive service-account authentication (README marks this as experimental/not currently working)

Required permissions

  • Google OAuth access to read/write the user's Apps Script projects (script.projects, script.deployments, script.webapp.deploy, etc.)
  • Google Drive read-only metadata and file access (drive.metadata.readonly, drive.file) to list and create bound scripts
  • Google Cloud Service Usage API access to list/enable/disable advanced services
  • Cloud Logging read access to fetch script execution logs
  • Local credential storage in `.clasprc.json` (containing OAuth tokens) in the home or working directory

Risks and side effects

  • `clasp push` always replaces the entire remote project content (the Apps Script API has no atomic or per-file operations), so mistakes can overwrite remote code
  • OAuth scopes are broad — covering scripts, Drive files, logging, and API management — so leaked credentials (especially custom ones saved via `--creds`) carry meaningful exposure
  • MCP mode is explicitly experimental; the README states it currently offers only a limited tool subset and behavior may change
  • Service-account / application-default-credentials support is explicitly marked experimental and 'NOT WORKING,' and should not be relied on for production automation

Troubleshooting

  1. Verify Node.js >= 22.0.0 with `node -v`; upgrade via `npx n latest` if needed
  2. Confirm the Apps Script API is enabled and `clasp login` has completed successfully
  3. If the MCP server fails to authenticate, check that the relevant `.clasprc.json` credentials are valid, and re-run `clasp login --user <name>` for the specific account if needed
  4. Set the environment variable `DEBUG=clasp:*` for verbose debug logs when troubleshooting
  5. For push/pull issues, check `scriptId` and `rootDir` in `.clasp.json` and confirm `.claspignore` isn't excluding needed files

Use cases

Check Apps Script project code into version control and collaborate with a team
Push/pull script files and manage deployments and versions from the command line
Remotely execute Apps Script functions and view logs
Let an AI coding agent read, push, and deploy Apps Script projects directly via MCP

Supported clients

Claude CodeFull support
Gemini CLIFull support