by Amplitude
Query a saved chart
Returns the computed results of a saved event segmentation, sessions, funnel or retention chart for a time range.
Updated Sep 26, 2026
query-chart.md
Query a saved chart
Returns the computed results of a saved event segmentation, sessions, funnel or retention chart for a time range.
Note: Other chart types return 422 with unsupported_chart_type. Without a time range it uses the chart's saved range, or the last 30 days. On the CLI and the API the token needs the analytics:read scope.
Set up
Use the first option your agent supports.
MCP (official, remote)
Add this server to your agent's MCP settings, then sign in when asked.
{ "mcpServers": { "amplitude": { "url": "https://mcp.amplitude.com/mcp" } } }
Call the MCP tool get_amplitude_charts.
Server URL: https://mcp.amplitude.com/mcp
CLI (official)
Install the command and sign in with it, then confirm it runs.
npm install -g @amplitude/developer-cli
amp --version
Run amp charts query.
API (official)
- Base URL: https://developer-api.amplitude.com
- Endpoint:
POST /v1/projects/{project_id}/charts/{chart_id}/query - Auth: an OAuth access token, sent as
Authorization: Bearer <token> - Docs: https://amplitude.com/docs/apis/developer
Before anything else, confirm access with the cheapest read-only call, like a list or a search. Never send or change anything to test access.
Rules
- Ask the user before anything that sends messages, costs money, or changes data, and say how many records it touches. One approval covers a batch the user has seen.
- Never print API keys.