Key takeaways:
After you set up the MCP Server (MCP Server for Google Analytics 4), you can enter any request directly into your AI app (such as the Claude app). That request is then passed to the MCP Server through the MCP Protocol, the standard communication protocol for AI tools. Once the server receives the requests, it processes them, executing actions, running commands, or returning the requested data.
Once the server receives the requests, it processes them, executing actions, running commands, or returning the requested data. Available tools include querying dimensions and metrics, allowing users to analyze user behavior and traffic sources.

The requests can cover nearly all GA4 reporting and administrative operations, including (but not limited to):
To configure the GA4 MCP server, you will need an AI app or agent (in our case, it is the Claude app).
1. Open Claude Desktop and go to Settings → Developer → Edit Config.

2. Open the configuration file that controls what MCP servers Claude can access and add the following configuration:
{
"mcpServers": {
"ga4-mcp-server": {
"command": "npx",
"args": [
"-y",
"mcp-remote@0.1.30",
"https://mcp-ga.stape.ai/mcp"
]
}
}
}Save the changes (Command + S).

3. Restart Claude Desktop.
4. Once restarted, a browser window will be open. Select the Google account that has access to the Google Analytics property you want to modify with the MCP server. Complete the authentication flow to grant Claude access to your MCP server.

Once access is granted, the tool will be available for your use.

In Settings → Developer, you will see the status Running next to ga4-mcp-server. In case of problems with the setup, refer to the troubleshooting section below in this guide.

Some MCP clients (such as Cursor AI) have a 60-character limit on the combined length of the MCP server name and the tool name. If your configuration uses a long server name (for example, ga4-mcp-server-your-additional-long-name), some tools can be hidden or filtered out.
To prevent this: use shorter MCP server names in your configuration (e.g., ga4-mcp-server).
mcp-remote stores credential data in ~/.mcp-auth (or in the directory defined by your MCP_REMOTE_CONFIG_DIR). If you encounter persistent issues, try clearing the cached state and tokens.
To clear the cache, run the following command:
rm -rf ~/.mcp-authAfterward, restart your MCP client.
Comments