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

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

```json
{ "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.
