Google Apps Script MCP Server

The escape hatch: write, deploy, and execute custom code across Workspace.

Apps Script is the escape hatch for everything the other eleven services don’t cover. An assistant can create a script project with manage_script_project, write or update its source with manage_script_content, and execute deployed functions with arguments via run_script_function: custom automation authored and invoked in the same conversation.

The operational tools matter just as much: manage_script_version, get_script_version, and manage_deployment handle the versioning lifecycle, generate_trigger_code scaffolds time-driven and event triggers while manage_script_trigger lists and deletes existing ones, and get_script_activity shows what ran, what failed, and how often.

What you can ask

  • “Write a script that snapshots the on-call sheet every Friday and deploy it”
  • “Run the syncInventory function against the staging spreadsheet”
  • “Which script executions failed this week, and why?”

All 11 Google Apps Script MCP tools

Expand any tool for its full parameter list. Tiers control how many tools the server registers: start lean with --tool-tier core and step up to extended or complete when a workflow needs more.

get_script_project Core List script projects, or read one project's structure or a single source file. 5
ParameterDescription
action required"list" (projects you can access) or "get" (one project).
script_id The script project ID (required for get).
file_name Return this complete source file instead of the project overview (get only).
page_size Number of results per page for list (default: 50).
page_token Token for pagination (list only).
manage_script_project Core Create standalone or bound script projects, or permanently delete one. 4
ParameterDescription
action required"create" or "delete". Delete cannot be undone.
script_id The script project ID (required for delete).
title Project title (required for create).
parent_id Optional Drive folder ID or bound container ID (create only).
manage_script_content Core Create or update script files. 4
ParameterDescription
action required"update".
script_id requiredThe script project ID.
files List of file objects with name, type, and source (required for update).
merge Overlay files onto the project (default). False replaces the whole file set, deleting any file left out.
run_script_function Core Execute deployed script functions with args. 5
ParameterDescription
script_id requiredThe script project ID.
function_name requiredName of function to execute.
parameters Optional list of parameters to pass.
dev_mode Whether to run latest code vs deployed version.
deployment_id API Executable deployment ID; defaults to the highest-versioned one.
generate_trigger_code Core Generate Apps Script code for time-driven and event triggers. 3
ParameterDescription
trigger_type requiredThe kind of trigger to generate code for.
function_name requiredFunction the trigger should invoke.
schedule Schedule expression for time-driven triggers.
list_script_deployments Extended List deployments for a project. 1
ParameterDescription
script_id requiredThe script project ID.
manage_deployment Extended Create, update, or delete deployments. 6
ParameterDescription
action requiredAction to perform - "create", "update", or "delete".
script_id requiredThe script project ID.
deployment_id The deployment ID (required for update and delete).
description Deployment description (required for create; optional for update when version_number is set).
version_description Optional version description (for create only).
version_number Version to point the deployment at (update only).
get_script_version Extended List saved versions of a script project, or retrieve one. 3
ParameterDescription
action required"list" or "get".
script_id requiredThe script project ID.
version_number The version number to retrieve (required for get).
manage_script_version Extended Create an immutable version from the current project state. 3
ParameterDescription
action required"create".
script_id requiredThe script project ID.
description Optional version description.
get_script_activity Extended Inspect recent executions, or aggregate execution metrics for a script. 4
ParameterDescription
action required"processes" (recent runs) or "metrics" (active users, total and failed executions).
script_id Required for metrics. For processes, lists every run of that script visible to you, including runs by other users.
page_size Number of results for processes (default: 50).
metrics_granularity Granularity of metrics data: "DAILY" (default) or "WEEKLY".
manage_script_trigger Extended List or delete your installable triggers on a project, via a small helper file run through the Execution API. 6
ParameterDescription
action required"list" or "delete".
script_id requiredThe script project ID.
trigger_id Unique ID of one trigger to delete (from list).
handler_function Delete every trigger calling this function.
dev_mode Run against the latest saved code (default; owner only) vs the deployed version.
deployment_id API Executable deployment ID; defaults to the highest-versioned one.

Every service in one reference: full API documentation →

OAuth scopes

The server requests only the scopes for the services you enable. In read-only mode it requests just the readonly variants and skips registering write tools entirely.

  • script.projects create and edit script projects
  • script.deployments manage deployments and versions
  • script.processes inspect executions and status

Google Apps Script MCP questions

Can an assistant write a script and run it in the same session?
Yes, with one Apps Script platform caveat: run_script_function executes functions through a versioned API Executable deployment, so the flow is create or update the source, create a deployment with manage_deployment, then invoke. All three steps are tool calls the assistant can chain, as long as the script manifest defines executionApi and the script shares a standard Google Cloud project with the caller; otherwise create the API Executable deployment once in the Apps Script editor.
What are bound scripts, and are they supported?
manage_script_project creates both standalone projects and scripts bound to a specific Doc, Sheet, or Form. Bound scripts are how you add custom behavior to one particular document.
When should I reach for Apps Script instead of a native service?
When the other services don’t expose what you need: custom triggers, Workspace APIs the server doesn’t wrap, or multi-step server-side logic that should run on Google’s infrastructure rather than through a dozen round trips.