All tools

Run a query

Runs an ad-hoc insights, funnels, flows or retention query on the project's events and returns the results.

View on GitHub
Updated Sep 27, 2026Available asMCP

Description

Call `Get-Query-Schema` first for the full JSON schema of a query. An organization admin must enable MCP in Settings → Org → Overview before anyone can connect, except on free and growth accounts created after August 1, 2026, where it is on by default.

run-query.md

Run a query

Runs an ad-hoc insights, funnels, flows or retention query on the project's events and returns the results.

Call Get-Query-Schema first for the full JSON schema of a query. An organization admin must enable MCP in Settings → Org → Overview before anyone can connect, except on free and growth accounts created after August 1, 2026, where it is on by default.

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": { "mixpanel": { "url": "https://mcp.mixpanel.com/mcp" } } }

Call the MCP tool Run-Query.

Server URL: https://mcp.mixpanel.com/mcp

Before doing anything else, make one read-only call to confirm access.

Rules

  • Ask the user before anything that sends messages, costs money, or changes data.
  • Never print API keys.

Built from these files in the repository

The layout and the rules come from lib/catalog/render-markdown.ts, the set-up wording from lib/catalog/render-access.ts.

Ways in

RouteSourceCallRequiredDocs
MCPOfficial · remoteRun-QueryOAuthDocs

Workflows using Run a query