Apps Script MCP

Apps Script MCP

Enables users to create, manage, and execute Google Apps Script projects through natural language. It provides comprehensive tools for code editing, function execution, deployment management, and monitoring script processes.

Category
Visit Server

README

Apps Script MCP

Tests

MCP server for Google Apps Script - create, manage, and execute Apps Script projects through natural language.

Features

  • Project Management: List, create, read, and update Apps Script projects
  • Code Editing: View and modify script files (JavaScript, HTML, JSON)
  • Execution: Run script functions with parameters
  • Deployments: Create, list, update, and delete deployments
  • Monitoring: View recent script executions and their status

Installation

# Clone the repository
git clone https://github.com/sam-ent/appscript-mcp.git
cd appscript-mcp

# Install with uv (recommended)
uv sync

# Or install with pip
pip install -e .

Prerequisites

1. Google Cloud Project Setup

Before using the MCP server, configure your Google Cloud project:

Enable Required APIs

Enable these APIs in your Google Cloud Console:

Create OAuth Credentials

  1. Go to APIs & Services > Credentials
  2. Click "Create Credentials" > "OAuth client ID"
  3. Select "Desktop application" as the application type
  4. Download the JSON file

Save Credentials

Save the downloaded JSON file to one of these locations:

  • ~/.appscript-mcp/client_secret.json (recommended)
  • ./client_secret.json (current directory)
  • ~/.secrets/client_secret.json

Or set the environment variable:

export GOOGLE_CLIENT_SECRET_PATH=/path/to/client_secret.json

Configure OAuth Consent Screen

  1. Go to OAuth consent screen
  2. Add yourself as a test user (required for unverified apps)

2. Configure MCP Client

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "appscript": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/appscript-mcp", "appscript-mcp"]
    }
  }
}

Claude Code

Add to ~/.mcp.json:

{
  "mcpServers": {
    "appscript": {
      "type": "stdio",
      "command": "/path/to/appscript-mcp/.venv/bin/python",
      "args": ["-m", "appscript_mcp.server"],
      "env": {
        "MCP_TIMEOUT": "30000",
        "MCP_TOOL_TIMEOUT": "90000"
      }
    }
  }
}

Authentication

On first use, authenticate with Google:

  1. Ask the assistant to "authenticate with Google" or use start_google_auth
  2. Open the provided URL in your browser
  3. Sign in and authorize the application
  4. Copy the redirect URL (the page will not load - that's expected)
  5. Provide the redirect URL to complete_google_auth

Credentials are cached in ~/.appscript-mcp/token.pickle for future sessions.

Available Tools

Authentication

Tool Description
start_google_auth Start OAuth flow, returns authorization URL
complete_google_auth Complete OAuth with redirect URL

Project Management

Tool Description
list_script_projects List all accessible Apps Script projects
get_script_project Get project details including all files
get_script_content Get content of a specific file
create_script_project Create a new project
update_script_content Update files in a project

Execution

Tool Description
run_script_function Execute a function in a script

Deployments

Tool Description
create_deployment Create a new deployment
list_deployments List all deployments
update_deployment Update deployment configuration
delete_deployment Delete a deployment

Monitoring

Tool Description
list_script_processes View recent script executions

Usage Examples

List Projects

"Show me my Apps Script projects"

Create a Project

"Create a new Apps Script project called 'Email Automation'"

Add Code to a Project

"Add a function to my Email Automation script that sends a daily summary email"

Execute a Function

"Run the sendDailySummary function in my Email Automation script"

Deploy

"Create a production deployment for my Email Automation script"

Limitations

run_script_function Requires API Executable Deployment

The run_script_function tool requires manual configuration in the Apps Script editor:

  1. Open the script in the Apps Script editor
  2. Go to Project Settings (gear icon)
  3. Under "Google Cloud Platform (GCP) Project", click "Change project"
  4. Enter your GCP project number
  5. Click "Deploy" > "New deployment"
  6. Select type: "API Executable"
  7. Set "Who has access" to "Anyone" or "Anyone with Google account"
  8. Click "Deploy"

All other tools work without this manual step.

API Quotas

Google enforces rate limits on the Apps Script API. If running many operations, you may encounter quota errors. See Apps Script Quotas for details.

Development

Run Tests

uv run pytest tests/ -v

Run Server Directly

uv run appscript-mcp

License

MIT License - see LICENSE file

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured