Get the FREE Ultimate OpenClaw Setup Guide →

google-appscript

MCP server from mohalmah/google-appscript-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio mohalmah-google-appscript-mcp-server npx -y google-appscript-mcp-server

How to use

This MCP server provides a bridge to Google Apps Script via the MCP protocol, enabling clients to manage script projects, deployments, versions, file content, and executions through a consistent API. The server exposes a suite of tools that cover core script operations such as creating and updating projects, deploying and listing script deployments, managing versions, retrieving and updating script contents, monitoring execution processes, and running Google Apps Script functions remotely. It includes OAuth 2.0 authentication with automatic token refresh and secure token storage, so clients can authenticate once and reuse tokens securely without manual intervention. You can connect to this MCP server from any MCP-compatible client (for example Claude Desktop or VS Code with an MCP extension) and issue requests using the standard MCP tooling conventions.

To use the server, start it via the recommended command (for Node-based deployment this is typically through npm start or running the server script via npx as outlined in this README). Once running, you can invoke the available tools to perform common Google Apps Script operations. Each tool corresponds to a specific API surface, such as creating a new script project, listing existing deployments, uploading or editing content, or executing a function within a deployed script. Authentication is handled through OAuth 2.0, with tokens securely stored and refreshed automatically so clients don’t need to manage credentials manually.

How to install

Prerequisites:

  • Node.js v18+ (v20+ recommended)
  • npm (bundled with Node.js)
  • A Google Cloud project with API access configured for Google Apps Script API and related services
  • Git (optional, for cloning)

Step 1: Clone the repository (or install via npm if published)

git clone https://github.com/mohalmah/google-apps-script-mcp-server.git
cd google-apps-script-mcp-server

Step 2: Install dependencies

npm install

Step 3: Prepare Google Cloud OAuth credentials

  • Create or select a Google Cloud project
  • Enable Google Apps Script API and any recommended APIs (Drive API, Cloud Resource Manager API)
  • Configure OAuth consent screen and create OAuth 2.0 Client IDs with redirect URI (for local testing, something like http://localhost:3001/oauth/callback)

Step 4: Configure environment variables Create a .env file in the project root and populate credentials, for example:

# Google Apps Script API OAuth Configuration
GOOGLE_APP_SCRIPT_API_CLIENT_ID=your_client_id_here
GOOGLE_APP_SCRIPT_API_CLIENT_SECRET=your_client_secret_here

# Optional logging level
LOG_LEVEL=info

Step 5: Run the OAuth setup (if provided by the project)

npm run setup-oauth

Step 6: Start the MCP server

npm start

Optional: If you prefer to run via npx without cloning locally equals the recommended approach in the mcp_config section:

npx -y google-appscript-mcp-server

Additional notes

Tips and common issues:

  • Ensure the OAuth redirect URI matches exactly in Google Cloud Console (for local testing it may be http://localhost:3001/oauth/callback).
  • Store refresh tokens securely; the server uses OS credential storage for refresh tokens.
  • If you update Google Apps Script API scopes, re-run the OAuth setup to refresh permissions.
  • The server is designed to automatically refresh access tokens, so you generally don’t need to re-authenticate frequently.
  • If you encounter API quota or permission errors, verify that the Google Cloud project has the correct APIs enabled and that the OAuth client you created corresponds to the project used by the server.
  • Logs: enable verbose logging via LOG_LEVEL in the environment to troubleshoot integration issues.

Related MCP Servers

Sponsor this space

Reach thousands of developers