Skip to main content
Glama

Unified Apps Script MCP

One production-oriented MCP server for the full Google Apps Script lifecycle plus an allowlisted Google Workspace REST gateway. It synthesizes the strongest patterns found across the public Apps Script MCP ecosystem without copying their source.

What it combines

  • Apps Script project creation, metadata, HEAD content, merge-safe updates, immutable versions, deployments, rollback, execution, process history and metrics.

  • Drive-based Apps Script project discovery, which fills the Apps Script API's project-listing gap.

  • Google Workspace coverage through a guarded REST gateway for Sheets, Docs, Drive, Gmail, Calendar, Tasks, Forms and Slides.

  • Automatic OAuth discovery, browser launch, PKCE, one-shot loopback callback, secure token refresh and revocation.

  • MCP safety annotations plus explicit confirm=true boundaries for deployment deletion, function execution and generic non-GET requests.

  • Automatic pagination for list tools.

Related MCP server: MCP Google Apps Script (GAS) Server

OAuth behavior

  1. Call auth_status.

  2. Call auth_setup. It searches environment variables, GOOGLE_OAUTH_CLIENT_JSON, the private config directory, project-root credential files and the newest client_secret_*.json in Downloads.

  3. If no Desktop OAuth client exists, the server opens Google Auth Platform's Clients page. Google does not expose a general public API that can create a Desktop OAuth client, so this one console action cannot be safely automated.

  4. Create a Desktop app client and download its JSON. No path is normally needed because Downloads is auto-detected.

  5. Call auth_login. The system browser opens immediately; the server uses PKCE and receives the callback on a random 127.0.0.1 port.

Tokens and imported client configuration are stored under ~/.config/unified-appscript-mcp/ with owner-only permissions.

Install

npm install
npm run build

Claude Code

claude mcp add --transport stdio --scope user unified-appscript -- node /absolute/path/unified-appscript-mcp/dist/index.js

Cursor / Claude Desktop

{
  "mcpServers": {
    "unified-appscript": {
      "command": "node",
      "args": ["/absolute/path/unified-appscript-mcp/dist/index.js"]
    }
  }
}

Tool catalog

Group

Tools

Authentication

auth_status, auth_setup, auth_login, auth_logout

Projects and code

apps_script_create_project, apps_script_get_project, apps_script_get_content, apps_script_update_content, apps_script_open_editor

Versions

apps_script_create_version, apps_script_list_versions, apps_script_get_version

Deployments

apps_script_list_deployments, apps_script_get_deployment, apps_script_create_deployment, apps_script_update_deployment, apps_script_delete_deployment

Runtime

apps_script_run_function, apps_script_list_processes, apps_script_list_script_processes, apps_script_get_metrics

Workspace

drive_list_apps_script_projects, google_workspace_request

Security model

  • Google API calls use HTTPS and an explicit host allowlist.

  • OAuth state and PKCE protect the local authorization flow.

  • Secrets never appear in tool responses.

  • Credential files use mode 0600; their directory uses 0700.

  • Project writes preserve unmentioned files by default and refuse to lose appsscript.json.

  • Writes are not automatically retried, preventing duplicate versions, deployments or executions.

  • Destructive operations require an explicit confirmation parameter and remain subject to the MCP client's approval UI.

Validation

npm run check

CI runs type checking, compilation and tests on Node.js 20 and 22.

Research

See docs/ECOSYSTEM.md for the repository inventory and the capability synthesis used in this implementation.

License

MIT. See LICENSE.

Available Tools

23 tools
apps_script_create_deploymentC

Deploy an immutable version with a manifest entry point.

Inputs: scriptId (required), versionNumber (required), description, manifestFileName.

apps_script_create_projectA

Create a standalone or container-bound Apps Script project. Preserve the returned scriptId.

Inputs: title (required), parentId.

apps_script_create_versionA

Create an immutable version snapshot of HEAD.

Inputs: scriptId (required), description.

apps_script_delete_deploymentA
Destructive

Permanently delete a deployment and break its live URL.

Inputs: confirm (required), scriptId (required), deploymentId (required).

apps_script_get_contentB
Read-onlyIdempotent

Read HEAD or an immutable version of all Apps Script project files.

Inputs: scriptId (required), versionNumber.

apps_script_get_deploymentB
Read-onlyIdempotent

Get one Apps Script deployment.

Inputs: scriptId (required), deploymentId (required).

apps_script_get_metricsB
Read-onlyIdempotent

Get execution, user and failure metrics for an Apps Script project.

Inputs: scriptId (required), deploymentId, metricsGranularity.

apps_script_get_projectB
Read-onlyIdempotent

Get Apps Script project metadata.

Inputs: scriptId (required).

apps_script_get_versionA
Read-onlyIdempotent

Get one immutable Apps Script version.

Inputs: scriptId (required), versionNumber (required).

apps_script_list_deploymentsA
Read-onlyIdempotent

List deployments and entry points, automatically following pagination.

Inputs: scriptId (required), maxPages, pageSize.

apps_script_list_processesC
Read-onlyIdempotent

List the authenticated user's Apps Script executions with filters.

Inputs: maxPages, pageSize, userProcessFilter.

apps_script_list_script_processesB
Read-onlyIdempotent

List executions for one script with optional API filter syntax.

Inputs: scriptId (required), maxPages, pageSize, scriptProcessFilter.

apps_script_list_versionsC
Read-onlyIdempotent

List immutable versions, automatically following pagination.

Inputs: scriptId (required), maxPages, pageSize.

apps_script_open_editorB

Open an Apps Script project in the system browser.

Inputs: scriptId (required).

apps_script_run_functionB
Destructive

Execute a function through an API-executable deployment. The function may cause real external side effects.

Inputs: confirm (required), scriptId (required), functionName (required), devMode, +1 more.

apps_script_update_contentA
Destructive

Update Apps Script HEAD. Merge mode preserves unmentioned files and the manifest; replace mode requires appsscript JSON explicitly.

Inputs: files (required), scriptId (required), mode.

apps_script_update_deploymentA
Destructive

Repoint an existing deployment to another immutable version while keeping its deployment ID/URL.

Inputs: scriptId (required), deploymentId (required), versionNumber (required), description, +1 more.

auth_loginB

Open the system browser, run Google OAuth with PKCE and a one-shot loopback callback, then store owner-only refresh credentials.

Inputs: profile, timeoutSeconds.

auth_logoutA
Destructive

Revoke stored Google authorization and delete local tokens. Environment-provided tokens cannot be deleted.

Inputs: no named parameters.

auth_setupA

Auto-detect a Desktop OAuth client. If absent, open the Google Auth Platform Clients page; downloaded client JSON is auto-detected from Downloads.

Inputs: clientFile, openBrowser.

auth_statusA
Read-onlyIdempotent

Detect OAuth client and token state; refreshes credentials to verify the connection.

Inputs: no named parameters.

drive_list_apps_script_projectsA
Read-onlyIdempotent

Discover Apps Script project files in Google Drive; unlike Apps Script API, Drive can list projects.

Inputs: query, maxPages, pageSize.

google_workspace_requestA
Destructive

Escape hatch for Google Workspace REST APIs not covered by a dedicated tool. Hosts are allowlisted; Authorization headers are injected. Destructive methods require confirm=true.

Inputs: url (required), body, query, method, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 23 tools

    Disambiguation4/5

    Most tools cleanly map to a distinct resource and action, but apps_script_list_processes and apps_script_list_script_processes could be confused at first glance; their descriptions clarify all-user vs per-script scope. The auth, project, version, and deployment tools are otherwise clearly separated.

    Naming Consistency4/5

    The dominant pattern is apps_script_<verb>_<noun>, with auth_* tools following a similar lifecycle convention. drive_list_apps_script_projects and google_workspace_request deviate slightly, but the naming remains predictable and readable overall.

    Tool Count3/5

    At 23 tools, the set is on the heavy side and spans several sub-domains: auth, Drive discovery, execution, versions, deployments, and metrics. Each tool has a legitimate purpose, but the count is borderline for easy agent navigation.

    Completeness5/5

    The toolset mirrors the Apps Script API surface well, covering project creation, content read/write, versioning, deployment lifecycle, execution, processes, and metrics. Auth management, Drive-based project discovery, and a Google Workspace escape hatch fill the remaining workflow gaps.

    Related MCP Connectors

    Related MCP Servers