PipedreamHQ / PipedreamHQ/pipedream
[BUG] GA4 Integration Error -32602: Dimensions Parameter Type Mismatch in Claude Desktop MCP
- Dominant language
- JavaScript
- Stars
- 11.7k
- Forks
- 5.8k
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 102
Description
When using the google_analytics-run-report-in-ga4 component within Claude Desktop via Model Context Protocol (MCP), there is a consistent error when passing array parameters. Specifically, the dimensions parameter is always interpreted as a string instead of an array, resulting in an MCP error -32602 with the message "Expected array, received string".
To Reproduce
Steps to reproduce the behavior:
Configure a workflow with the google_analytics-run-report-in-ga4 component
Attempt to call this component from Claude Desktop with the following parameters:
{
"property": "properties/384059648",
"startDate": "2025-04-04",
"endDate": "2025-05-04",
"metrics": ["screenPageViews", "sessions", "engagementRate", "bounceRate"],
"dimensions": ["pageTitle", "pagePath"]
}
Execute the call
Receive error: MCP error -32602: "Expected array, received string" for the dimensions parameter
This error persists regardless of how the dimensions parameter is formatted:
As a JSON array: ["pageTitle", "pagePath"]
As a comma-separated string: pageTitle,pagePath
Without quotes: [pageTitle, pagePath]
Expected behavior
The dimensions parameter should be properly recognized as an array of strings, as defined in the component's props configuration (type: "string[]"). The report should execute successfully with the provided dimensions.
Screenshots

Additional context
The source code of the component shows that both metrics and dimensions are defined as type: "string[]" in the props:
javascriptdimensions: {
type: "string[]",
label: "Dimensions",
description: "Dimension attributes for your data...",
optional: true,
},
However, while the metrics parameter seems to work correctly, the dimensions parameter is consistently interpreted as a string. This suggests there might be an issue with how array parameters are being passed or processed between Claude Desktop and the Pipedream MCP endpoint.
The specific MCP endpoint being used is:
https://mcp.pipedream.net/CENSURED/google_analytics
This appears to be an integration issue between Claude Desktop and Pipedream-hosted MCP tools, specifically related to how certain array parameters are handled.
Contributor guide
Assessment
This issue has not been assessed yet.