Skip to content

Remote MCP server

Google Apps Script MCP server for Claude, Cursor, and Copilot

For people who have Copilot, Claude, or Cursor write Apps Script: the myFunction MCP server's gas_diagnostics tool type-checks the assistant's output against declarations generated from the Apps Script runtime and returns each error with its file and line, plus a ready-to-apply edit when myFunction has a fix for it, so the assistant can fix it before you run the code.

How it fits

Your assistant calls the check before it answers.

myFunction does not replace Copilot, Claude, or Cursor. The assistant writes the code, calls gas_diagnostics with the project files, reads the diagnostics, and fixes them before it hands the code to you.

When a diagnostic has a quick fix in the editor, the tool returns that fix with it: a description, the text edits with their file and positions, and a safety of safe or review. A review fix changes what the script does, such as adding an OAuth scope to the manifest, so the assistant should confirm it fits. Some fixes carry written guidance instead of an edit. TypeScript's own fixes, such as correcting a misspelled Loger to Logger, come back the same way.

Service calls

Unknown methods, wrong argument counts, and wrong argument types on SpreadsheetApp, GmailApp, DriveApp, and the other built-in services.

Advanced services

Drive, Sheets, Gmail, Calendar, and the other advanced services, whether enabled by their default global name or in the appsscript.json manifest.

Project scope

Functions and globals declared in one file and used in another. Apps Script resolves them in one shared scope, and so does the check.

Apps Script rules

The same checks the Chrome extension shows in the editor, including a service call inside a loop and a malformed literal value.

Connect

Add the server to your client.

The server URL is https://api.myfunction.dev/mcp. Any client that supports remote MCP servers over HTTP with OAuth can connect. The first connection opens a Google sign-in page.

Claude Code

Run in your terminal, then run /mcp in Claude Code to sign in.

claude mcp add --transport http myfunction https://api.myfunction.dev/mcp

VS Code with GitHub Copilot

Add to .vscode/mcp.json, then start the server from the file and use Copilot agent mode.

{
  "servers": {
    "myfunction": {
      "type": "http",
      "url": "https://api.myfunction.dev/mcp"
    }
  }
}

Cursor

Add to ~/.cursor/mcp.json or the project's .cursor/mcp.json.

{
  "mcpServers": {
    "myfunction": {
      "url": "https://api.myfunction.dev/mcp"
    }
  }
}

Claude apps

In Settings, open Connectors, add a custom connector, and paste the server URL.

https://api.myfunction.dev/mcp

Project instructions

Tell the assistant when to check.

The server already asks clients to check Apps Script before returning it. To make that a standing rule, add this line to your project instructions, such as AGENTS.md, CLAUDE.md, or .github/copilot-instructions.md.

When you write or edit Google Apps Script (.gs) code, call the gas_diagnostics tool with every file in the project before you show me the result. Fix each reported error, using the fixes the tool attaches where it has one, and call it again until no errors remain.

Limits and data

Limits, data, and pricing.

The check is static. It does not run your script, so it cannot catch authorization prompts, quota limits, or errors that depend on the data in a spreadsheet. A project can hold up to 100 files, 200 KB per file, and 1 MB in total. A Google account can have 1 check running at a time, or 4 at once with myFunction Pro. A check started over that limit is turned away, is not counted as a tool call, and can be retried when a running check finishes. Finding fixes re-reads each file, so a large project gets fixes on its first diagnostics only, and the rest come back without them.

The tool reads only the files the assistant sends with each call. It never connects to your Apps Script projects or your Google Drive. The files are type-checked in memory on api.myfunction.dev and are not written to storage. myFunction stores your Google account identifier, email address, and name for the sign-in, and a monthly count of tool calls. When a call fails with an unexpected error, the error message is logged with your account identifier.

Each Google account gets 50 free tool calls per month. myFunction Pro at $5.99/month includes 10,000 tool calls per month. When the free calls run out, the tool returns a checkout link instead of diagnostics.

Questions

Questions about the Apps Script MCP server.

How is the myFunction MCP server different from clasp or deployment MCP servers?
myFunction focuses on static type-checking and diagnostics rather than deploying or running scripts. Your AI assistant sends the project's .gs files and appsscript.json to the gas_diagnostics tool, receives type errors, Apps Script rule warnings, and quick-fix edits against runtime-faithful declarations, and fixes the code before you push or run it.
Does the Apps Script MCP server access my Google Drive or deploy my scripts?
No. The gas_diagnostics tool reads only the files your AI client sends in each call and checks them in memory on api.myfunction.dev without writing them to storage. It never connects to your Google Drive, Gmail, or Apps Script projects and never runs or deploys code.
Which AI coding assistants work with the myFunction Apps Script MCP server?
Any client that supports remote MCP servers over HTTP with OAuth can connect to https://api.myfunction.dev/mcp, including Claude Code, Claude apps, Cursor, and VS Code with GitHub Copilot agent mode.
How much does the Google Apps Script MCP server cost?
Each Google account includes 50 free gas_diagnostics tool calls per month. myFunction Pro ($5.99/month) includes 10,000 tool calls per month.

Same rules in the editor

See the diagnostics the tool returns.

The MCP server and the Chrome extension share one language service, including its quick fixes. If you edit directly at script.google.com instead of a local AI client, the same checks and rule-based quick fixes are free without an account in myFunction (published as Error Checker for Google Apps Script on the Chrome Web Store).