Claude-GAS-Bridge

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

claude-gas-bridge/ ├─ bridge.mjs # メインのMCPサーバーコード ├─ package.json ├─ package-lock.json └─ ... (その他ファイル)
  • bridge.mjs
    The MCP server itself defines a tool called execute-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

  1. Get Source
    git clone <このリポジトリのURL> cd claude-gas-bridge
  2. Install dependent packages
    npm install
    * Yarn is also acceptable
  3. Set the GAS deployment URL
    Replace GAS_ENDPOINT in bridge.mjs with the actual Apps Script URL.
    example:
    const GAS_ENDPOINT = "https://script.google.com/macros/s/AKfycbxxxxx/exec";
  4. Start the server with Node.js
    node bridge.mjs
    When the console displays "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 :

{ "mcpServers": { "gas-bridge": { "command": "node", "args": [ "/絶対パス/claude-gas-bridge/bridge.mjs" ] } } }
  1. Restart Claude Desktop
  2. You should see execute-gas in the list of tools (hammer icon) at the bottom of the chat screen.
  3. 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 in bridge.mjs and embed it as appropriate.

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

A bridge server that connects MCP clients (like Claude Desktop) to Google Apps Script, allowing execution of GAS scripts through natural language interfaces.

  1. 構成概要
    1. 必要環境
      1. セットアップ
        1. Claude Desktop との連携 (例)
          1. APIキーの管理について
            ID: mfqd2f9akw