Shop MCP

Connect a module

Google Apps Script

ShopMCP uses the existing Google integrations OAuth client, with a separate Apps Script grant and encrypted refresh token.

1. Enable the API

In the Google Cloud project that owns GOOGLE_INTEGRATIONS_CLIENT_ID, enable the Google Apps Script API. No new OAuth redirect URI is required because ShopMCP uses the shared Google callback.

2. Add OAuth scopes

  • https://www.googleapis.com/auth/script.projects
  • https://www.googleapis.com/auth/script.deployments
  • https://www.googleapis.com/auth/script.processes
  • https://www.googleapis.com/auth/script.scriptapp
  • https://www.googleapis.com/auth/spreadsheets

Verification scope change

These scopes expand the Google verification package. Keep this module admin-gated until Google consent and API behavior have been tested end to end.

3. Connect in ShopMCP

Open Settings → Integrations, choose Google Apps Script, and approve the Google consent screen. After returning to ShopMCP, click Finish connection.

4. Use it with Sheets

To create a script bound to a Google Sheet, pass the Sheet's Drive file ID as parent_id to apps_script_create_project_with_files. For existing projects, use apps_script_list_files, apps_script_get_file, apps_script_upsert_file, and apps_script_append_to_file for normal file edits.

5. Copy projects safely

To copy files between Apps Script projects, use apps_script_copy_files. ShopMCP reads from the source project and writes to the target project server-side, so large script bodies do not need to be pasted through the model context.

Notes

  • apps_script_update_content is an advanced replace-all escape hatch. Prefer file-level tools for routine edits.
  • Apps Script stores server-side code as SERVER_JS / .gs; requested .ts files are saved as Apps Script JavaScript unless a separate local compile step is used.
  • Running functions requires an API executable deployment ID, not just the script ID.
  • Google Ads UI-managed scripts are not managed through this API.