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.
README
Apps Script MCP
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
- Go to APIs & Services > Credentials
- Click "Create Credentials" > "OAuth client ID"
- Select "Desktop application" as the application type
- 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
- Go to OAuth consent screen
- 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:
- Ask the assistant to "authenticate with Google" or use
start_google_auth - Open the provided URL in your browser
- Sign in and authorize the application
- Copy the redirect URL (the page will not load - that's expected)
- 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:
- Open the script in the Apps Script editor
- Go to Project Settings (gear icon)
- Under "Google Cloud Platform (GCP) Project", click "Change project"
- Enter your GCP project number
- Click "Deploy" > "New deployment"
- Select type: "API Executable"
- Set "Who has access" to "Anyone" or "Anyone with Google account"
- 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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。