redmorestudio/google-appscript-mcp-server-improved
3.1
If you are the rightful owner of google-appscript-mcp-server-improved and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
An enhanced Model Context Protocol (MCP) server for Google Apps Script with improvements for better functionality and reliability.
Google Apps Script MCP Server (Improved)
An enhanced Model Context Protocol (MCP) server for Google Apps Script with fixes for common issues.
What's Fixed in This Version
- ✅ Correct OAuth scopes for script execution
- ✅ Clean JSON output (no emoji pollution)
- ✅ Better error handling and debugging
- ✅ Support for scripts that use Sheets, Drive, and Gmail
Quick Start
1. Install Dependencies
npm install
2. Configure OAuth Credentials
Create .env
file:
GOOGLE_APP_SCRIPT_API_CLIENT_ID=your_client_id
GOOGLE_APP_SCRIPT_API_CLIENT_SECRET=your_client_secret
3. Authenticate
node oauth-setup.js
4. Configure Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json
:
{
"google-apps-script": {
"command": "node",
"args": ["/path/to/gas-mcp-improved/mcpServer.js"],
"env": {
"LOG_LEVEL": "error"
}
}
}
5. Configure Your Apps Script
CRITICAL: Your Google Apps Script must have a GCP project configured:
- Open script at https://script.google.com
- Click Settings (gear icon)
- Under "Google Cloud Platform (GCP) Project", add your project number
- Save and deploy as "API Executable"
Available Functions
script_projects_get
- Get script metadatascript_projects_get_content
- Get script codescript_projects_versions_create
- Create new versionscript_projects_deployments_create
- Deploy scriptscript_run
- Execute functions in your scriptupdate_script_content
- Update script code
Example Usage
// Execute a function in your script
await script_run({
scriptId: "your_script_id",
functionName: "myFunction",
parameters: [param1, param2]
});
// Get script content
await script_projects_get_content({
scriptId: "your_script_id"
});
Troubleshooting
"Requested entity was not found" Error
- Make sure GCP project is configured in script settings
- Verify Apps Script API is enabled in GCP
- Check script is deployed as "API Executable"
"Invalid scope" Error
- Re-run
node oauth-setup.js
to get new tokens with correct scopes - Clear old tokens:
rm -rf ~/.apps-script-mcp/tokens/
JSON Parse Errors
- This version fixes emoji logging issues
- Set
LOG_LEVEL=error
in Claude config
Changes from Original
See for detailed list of improvements.
License
MIT (same as original)