apps-script-mcp
Enables writing and running Google Apps Script, managing standalone Apps Script projects (creating, listing, reading, writing, and deleting files), and running saved functions through a bridge deployed in the user's Google account.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@apps-script-mcp create an Apps Script project that logs all my Google Drive files"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
apps-script-mcp
An MCP server that lets Claude write and run Google Apps Script in your Google account, with no Google Cloud Console setup.
It works through a small "bridge" script that you deploy once as a web app in your own account. The local server calls it with a secret key, and the bridge runs as you.
Setup
Requires uv. The server is published on PyPI, so uvx downloads and runs it; you only need this repository for the two bridge files.
Create a new project at https://script.google.com and paste in bridge/Code.gs.
Click + next to Services and add Drive API.
In Project Settings, tick Show "appsscript.json" manifest file in editor, then paste in bridge/appsscript.json.
Run the
setupfunction, approve all permissions, and copy the key from the execution log.Click Deploy > New deployment > Web app, with Execute as: Me and Who has access: Anyone. Copy the
/execURL.Add the server to your MCP client:
{
"mcpServers": {
"apps-script": {
"command": "uvx",
"args": ["apps-script-mcp"],
"env": {
"APPS_SCRIPT_BRIDGE_URL": "https://script.google.com/macros/s/.../exec",
"APPS_SCRIPT_BRIDGE_KEY": "your key"
}
}
}
}Ask Claude to call bridge_status to check that it works.
Related MCP server: Google Workspace MCP Server
Tools
Tool | What it does |
| Checks the bridge and the account it runs as |
| Runs a snippet as you and returns its result and logs |
| Lists standalone script projects in your Drive |
| Creates a standalone project |
| Reads all files of a project |
| Creates or replaces one file |
| Deletes one file |
| Runs a function from a project's saved code |
Security
Anyone with both the URL and the key can do everything the manifest scopes allow, including reading your mail and files. Treat the key like a password.
Remove scopes you do not need from
appsscript.json.Run
rotateKeyin the bridge editor to replace the key.Archive the deployment to turn the bridge off.
Limits
Only standalone projects can be edited, not scripts bound to a Sheet, Doc or Form.
run_functionruns inside the bridge, so there is no active document and the project's own libraries, properties and triggers are unavailable.There is no deploy tool; publish from the Apps Script editor.
Each call stops after 6 minutes.
Development
uv sync
uv run pytestLicense
Available Tools
8 toolsbridge_statusBridge StatusA
Check the bridge: its version, the Google account it runs as, and whether the Drive service is enabled (needed to create and edit projects).
Inputs: no named parameters. Returns: object
create_projectCreate ProjectB
Create a standalone Apps Script project with an empty Code file.
Inputs: title (required). Returns: object
delete_fileDelete FileB
Delete one file from a project (the appsscript manifest cannot be deleted).
Inputs: name (required), script_id (required). Returns: object
get_projectGet ProjectA
Get a standalone project's title and every file with its full source.
script_id is the ID in the editor URL (script.google.com/d//edit).
Inputs: script_id (required). Returns: object
list_projectsList ProjectsA
List standalone Apps Script projects in the user's Drive, optionally filtered by a title substring. Scripts bound to a Sheet/Doc/Form are not listed, but work with the other tools when you pass their script ID.
Inputs: limit, query. Returns: result
run_codeRun CodeA
Run Apps Script (JavaScript, V8) as the user and return the result and logs.
code is a function body: use return to send back a JSON-serializable
value. All built-in services are available (SpreadsheetApp, DocumentApp,
DriveApp, GmailApp, CalendarApp, UrlFetchApp, ...). console.log and
Logger.log output is returned in logs. There is no active document, so
open files by ID or URL. Executions stop after 6 minutes.
Inputs: code (required). Returns: object
run_functionRun FunctionA
Run a top-level function from a project's saved code and return its result and logs.
The project's .gs files are loaded into the bridge and executed there, so
it runs as the user but outside the real project: there is no active
document (getActiveSpreadsheet() returns null), and the project's own
libraries, advanced services, script properties and triggers are not
available. Only standalone projects can be loaded. args must be JSON-serializable.
Inputs: script_id (required), function_name (required), args. Returns: object
write_fileWrite FileA
Create or fully replace one file in a project; other files are kept.
name has no extension ("Code", not "Code.gs"). type defaults to
SERVER_JS, or JSON for the "appsscript" manifest; use HTML for HtmlService
templates.
Inputs: name (required), source (required), script_id (required), type. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Most tools map to distinct resources/actions (list/create/get project, write/delete file, bridge_status). The only real overlap is run_code vs run_function, both of which execute code, but the descriptions clearly separate ad-hoc bridge execution from invoking a saved top-level function in a project.
Seven of eight tools follow a clean verb_noun snake_case pattern (run_code, list_projects, create_project, get_project, write_file, delete_file, run_function). bridge_status deviates as a noun-first status query, a minor inconsistency but still readable.
Eight tools is well within the sweet spot and each earns its place: bridge health, raw execution, project lifecycle, file lifecycle, and saved-function invocation. Nothing feels padded or missing at the count level.
The project/file lifecycle is largely covered (list, create, get, write, delete file) plus execution paths. The notable gap is delete_project (and project rename/metadata), though the run_code escape hatch with DriveApp access lets an agent work around it.
Maintenance
Related MCP Connectors
Multiple Google accounts (Gmail, Calendar, Drive, Contacts, Tasks) in one Claude connector.
Multiple Google accounts (Gmail, Calendar, Drive, Contacts, Tasks) in one Claude connector.
Give Claude only the Google Drive files you choose. Every action logged.
Read-only Google Ads, GA4 and Search Console data for Claude, with no Google Cloud setup.
Related MCP Servers
- AlicenseBqualityDmaintenanceProvides integration with the Google Apps Script API, allowing management of script projects, deployments, versions, and executions through any MCP-compatible client like Claude Desktop or VS Code.1660MIT
- AlicenseNot gradedqualityDmaintenanceEnables Claude Code to interact with Google Workspace services (Drive, Docs, Sheets, Slides, Forms, Gmail) via OAuth 2.0 authentication and natural language commands.1MIT
- FlicenseNot gradedqualityDmaintenanceEnables Claude to read, write, append, create, and clear Google Sheets data using natural language.-
- AlicenseNot gradedqualityDmaintenanceEnables automation of Google Workspace tasks, including reading/writing sheets, generating Apps Script code, and creating webhook senders, with AI assistance via Claude.528 npmMIT