MCP Ecommerce

Installation guide

How to install Google Analytics MCP Server

In Claude Desktop, ChatGPT, Cursor and Claude Code, with what to check before you start and the first prompts to run.

This is a local, open-source server from Google that you run yourself. There is no hosted URL and no vendor sign-in page. You enable two Google APIs in a Google Cloud project, create Application Default Credentials with the read-only Analytics scope, then point your AI tool at the server so it launches through pipx. The README labels the server experimental, and it only reads data.

A technical person should do this, such as an agency developer or an in-house analyst comfortable with a terminal. Use a Google account that already has read access to the GA4 properties in question, or a service account that has been given that access. The server will see whatever that identity can see, so avoid using an owner or admin account when a viewer account will do.

Google Analytics MCP Server setup guide: Google's MCP documentation page on github.com, shown in a browser frame (analytics MCP server for e-commerce)
Google Analytics MCP Server setup guide preview: Google’s documentation on github.com, captured Oct 13, 2026. The page may have changed since; the link opens the live version.

Before you start

  • A Google Cloud project where you can enable the Google Analytics Admin API and the Google Analytics Data API.
  • A Google user (or service account) with read access to the GA4 accounts or properties you want to query.
  • pipx installed on the computer that will run the server, as the README requires.
  • The gcloud command line tool, since the README's credential steps use gcloud auth application-default login, plus an OAuth client JSON file if you sign in as a user.
  • Credentials that include the scope https://www.googleapis.com/auth/analytics.readonly.
How it runs
Local, runs on your machine
Access
Read-only
Server address
Copy it from the vendor documentation

Google Analytics MCP Server in Claude Desktop

  1. The vendor README does not cover Claude Desktop, so this follows the standard local-server method. Complete the shared setup first: enable both APIs in your Google Cloud project and create Application Default Credentials with the analytics.readonly scope.
  2. Copy the credentials file path that gcloud prints after the line 'Credentials saved to file'.
  3. Open Claude Desktop settings and find the developer or MCP servers area, where you can edit its MCP configuration file.
  4. Add a local server entry named analytics-mcp. Set the command to pipx and the arguments to run analytics-mcp, the same values the README uses for Gemini.
  5. In that entry's environment, set GOOGLE_APPLICATION_CREDENTIALS to your credentials file path and add your project ID. Take the exact project variable name from the README.
  6. Save the file, fully quit and reopen Claude Desktop, then check that analytics-mcp appears in the tools list.

Google Analytics MCP Server in ChatGPT

  1. The vendor README does not mention ChatGPT. This server runs on your own computer over a local command, not at a hosted URL.
  2. ChatGPT normally adds MCP servers through its connectors or integrations settings by entering a remote server URL. The documentation gives no such URL for this server.
  3. Do not expose the local server to the internet just to make it fit. The documentation describes no safe way to do that.
  4. Check the current ChatGPT connector options in your plan to see whether local servers are supported. If they are not, use Claude Code, Cursor or another client that can launch a local command.
  5. If you need ChatGPT specifically, ask an agency developer to assess a hosted setup, and keep the Google credentials read-only.

Google Analytics MCP Server in Cursor

  1. The vendor README does not cover Cursor, so this follows Cursor's standard local-server method. Complete the shared setup first: enable both APIs and create Application Default Credentials with the analytics.readonly scope.
  2. Copy the credentials file path that gcloud prints after the line 'Credentials saved to file'.
  3. Open Cursor settings and go to the MCP section, then choose to add a new server or edit the MCP configuration file.
  4. Add a local server named analytics-mcp with the command pipx and the arguments run analytics-mcp, matching the README's Gemini example.
  5. Set the environment values GOOGLE_APPLICATION_CREDENTIALS (your credentials file path) and your Google Cloud project ID. Take the exact project variable name from the README.
  6. Save, then confirm in the MCP settings that analytics-mcp shows as enabled with its tools listed.

Google Analytics MCP Server in Claude Code

  1. Enable the Google Analytics Admin API and the Google Analytics Data API in your Google Cloud project, and install pipx.
  2. Create Application Default Credentials with the analytics.readonly scope, using gcloud auth application-default login as the README shows. Choose user credentials with an OAuth client file, or service account impersonation.
  3. Copy the credentials file path that gcloud prints after the line 'Credentials saved to file'.
  4. In a terminal, run the README command, replacing the two placeholders: claude mcp add analytics-mcp --scope user -e "GOOGLE_APPLICATION_CREDENTIALS=PATH_TO_CREDENTIALS_JSON" -e "GOOGLE_PROJECT_ID=YOUR_PROJECT_ID" -- pipx run analytics-mcp
  5. Start Claude Code and check that analytics-mcp is listed among your MCP servers.
  6. Run the first read-only prompt below to confirm it can see your GA4 properties.

Check that it works

Start with questions that only read data. If these answer from your real account, the connection is good.

  • What can the analytics-mcp server do?
  • List the Google Analytics accounts and properties you can see.
  • What are the most popular events in my Google Analytics property in the last 30 days?

Troubleshooting

+The server does not appear in my client's tool list. What should I check?

Confirm pipx is installed and works in a terminal, since the client launches the server with it. Check the command and arguments for typos, then fully restart the client. Gemini users can type /mcp to list servers. Other clients have their own MCP status screen. Use the exact entry from the README.

+The server starts but returns permission or authentication errors. Why?

The credentials probably lack access or the right scope. Check that the Google user or service account has read access to the GA4 property, that both APIs are enabled in the project, and that the credentials include https://www.googleapis.com/auth/analytics.readonly. Also check that GOOGLE_APPLICATION_CREDENTIALS points to the saved file path.

+The assistant sees no properties, or the numbers look low. Is something broken?

An empty list usually means the credentials belong to an identity without access to those properties. Re-run the credential step with the correct Google account. Low numbers are often a tracking issue, not a server fault, because consent loss and ad blockers leave gaps in GA4 data. Compare against the GA4 interface before acting.

Written Oct 13, 2026 from the vendor documentation. Exact menus, addresses and commands change; the official documentation is the source of truth.