local-only server
The server can only run on the client’s local machine because it depends on local resources.
Integrations
Allows execution of custom Google Apps Script code through a bridge that forwards scripts from an MCP client to a GAS Interpreter endpoint, enabling AI agents to run custom scripts in the Google Apps Script environment.
Claude-GAS-Bridge
This is a bridge server that uses Node.js to connect MCP (Model Context Protocol) clients (e.g. Claude Desktop) and GAS Interpreter (Google Apps Script side).
In bridge.mjs
, start the MCP server of @modelcontextprotocol/sdk and provide the function to make HTTP POST to the GAS web endpoint.
Configuration overview
bridge.mjs
The MCP server itself defines a tool calledexecute-gas
, which transfers the GAS script received from the client to the specified WebApp (Apps Script) endpoint.
When calling the tool, the title, script text, and API key are sent in JSON format.
Requirements
- Node.js 18 and above
@modelcontextprotocol/sdk
recommends Node 18 and above - GAS Interpreter Deployed
Deploy the GAS Interpreter correctly in Google Apps Script and get the URL of the web app. - (Optional) MCP client such as Claude Desktop
set up
- Get SourceCopy
- Install dependent packages* Yarn is also acceptableCopy
- Set the GAS deployment URL
ReplaceGAS_ENDPOINT
inbridge.mjs
with the actual Apps Script URL.
example:Copy - Start the server with Node.jsWhen the console displaysCopy
"Bridge server started (Stdio). Waiting for requests..."
the server is in standby mode and will accept calls from MCP clients.
Integration with Claude Desktop (example)
If you are using Claude Desktop, add the following to claude_desktop_config.json
:
- Restart Claude Desktop
- You should see
execute-gas
in the list of tools (hammer icon) at the bottom of the chat screen. - When you give instructions such as "I want to run a GAS script through ChatGPT,"
bridge.mjs
receives the request and forwards it to the GAS Interpreter.
Managing API keys
- If the GAS Interpreter requires an API key, please specify
"apiKey": "..."
when calling the tool, or refer to the environment variable inbridge.mjs
and embed it as appropriate.
You must be authenticated.
Tools
A bridge server that connects MCP clients (like Claude Desktop) to Google Apps Script, allowing execution of GAS scripts through natural language interfaces.