---
ref: tool:mixpanel/run-query
name: Run a query
company: company:mixpanel
workflows: [workflow:at-risk-customer-rescue]
access: [mcp]
tags: [capability:analyze-product-usage, category:product-analytics, has:mcp]
docs: https://docs.mixpanel.com/docs/mcp
updated: 2026-09-29
---

# Run a query

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

Note: Call `Get-Query-Schema` first for the full JSON schema of a query.

## 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.

```json
{ "mcpServers": { "mixpanel": { "url": "https://mcp.mixpanel.com/mcp" } } }
```

Call the MCP tool `Run-Query`.

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

Note: An organization admin enables MCP in Settings > Org > Overview first. EU and India projects use `https://mcp-eu.mixpanel.com/mcp` and `https://mcp-in.mixpanel.com/mcp`.

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.
