OpenPanel

MCP Server

Connect AI assistants to your OpenPanel analytics data using the Model Context Protocol.

OpenPanel exposes an MCP (Model Context Protocol) server that lets AI assistants — Claude, Cursor, Windsurf, and others — query your analytics data directly in conversation.

Endpoint

https://api.openpanel.dev/mcp

Authentication

The token can be passed as a query parameter or an Authorization header — both are equivalent:

https://api.openpanel.dev/mcp?token=YOUR_TOKEN
Authorization: Bearer YOUR_TOKEN

Token format

The token is a base64-encoded string of your client ID and client secret joined by a colon:

base64(clientId:clientSecret)

From the dashboard

The easiest way to get your MCP token is directly from the dashboard — no terminal needed:

  • New client — after creating a client via Settings → API Clients, the success screen shows the MCP Token field ready to copy.
  • Onboarding — the connect step in the onboarding flow shows the MCP Token alongside your client ID and secret. Use the Save button to download all three values as credentials.txt.

From the terminal

echo -n "YOUR_CLIENT_ID:YOUR_CLIENT_SECRET" | base64

Then append it to the MCP URL:

https://api.openpanel.dev/mcp?token=<base64-encoded-token>

Required client type

Only read and root clients can authenticate with MCP. Write-only clients are rejected.

Client typeAccess
readScoped to a single project (the one the client belongs to)
rootCan query any project in your organization

Use a read client if you want to limit the AI assistant to one project. Use a root client if you need cross-project access or want to list all projects.

Go to Settings → API Clients in your dashboard to create a client. See the Authentication guide for more details.

Connecting to Claude Desktop

Add the following to your claude_desktop_config.json:

{
  "mcpServers": {
    "openpanel": {
      "type": "streamable-http",
      "url": "https://api.openpanel.dev/mcp?token=YOUR_TOKEN"
    }
  }
}

Connecting with Claude Code CLI

With the Claude CLI you can use the --header flag to pass the token via Authorization: Bearer rather than embedding it in the URL:

claude mcp add --transport http openpanel https://api.openpanel.dev/mcp \
  --header "Authorization: Bearer YOUR_TOKEN"

Or with the token in the URL (equivalent):

claude mcp add --transport http openpanel "https://api.openpanel.dev/mcp?token=YOUR_TOKEN"

Available tools

Project access

ToolDescription
list_projectsList all projects accessible with your credentials. Root clients see all organization projects; read clients see only their own.
get_dashboard_urlsGet clickable dashboard links for the current project — overview, events, profiles, sessions, and deep-links to specific items.

Dashboards & reports

ToolDescription
list_dashboardsList all dashboards for a project.
list_reportsList all reports in a dashboard with their chart types and tracked events.
get_report_dataExecute a saved report and return its data (time-series, funnel, metric, etc.).

Discovery

ToolDescription
list_event_namesGet the top 50 most common event names in the project. Call this first if you don't know exact event names.
list_event_propertiesList all property keys tracked for an event (or across all events).
get_event_property_valuesGet all distinct values for a specific event property.

Events & sessions

ToolDescription
query_eventsQuery raw events with optional filters. Returns individual records with path, device, country, referrer, and custom properties.
query_sessionsQuery sessions with optional filters. Each session includes duration, entry/exit pages, bounce status, and attribution data.

Profiles (users)

ToolDescription
find_profilesSearch and filter user profiles by name, email, location, inactivity, session count, or whether they performed a specific event.
get_profileGet a specific user profile with their most recent events.
get_profile_sessionsGet all sessions for a user profile, ordered by most recent first.
get_profile_metricsGet computed lifetime metrics for a user: sessions, pageviews, bounce rate, revenue, and more.

Groups (B2B)

ToolDescription
list_group_typesList all group types defined in the project (e.g. company, team). Call this first before querying groups.
find_groupsSearch for groups by name, ID, or type.
get_groupGet a specific group with its properties and member profiles.

Aggregated metrics

ToolDescription
get_analytics_overviewKey metrics for a date range: visitors, pageviews, sessions, bounce rate, and avg session duration.
get_rolling_active_usersTime series of active users using a rolling window — DAU (1 day), WAU (7 days), or MAU (30 days).
get_top_pagesMost visited pages ranked by pageviews.
get_page_performancePer-page bounce rate, avg session duration, sessions, and pageviews.
get_page_conversionsPages ranked by how many visitors went on to convert after viewing them.
get_entry_exit_pagesMost common entry pages (session start) or exit pages (session end).
get_top_referrersTop traffic sources broken down by referrer name and type.
get_country_breakdownVisitor counts by country, region, or city.
get_device_breakdownVisitor counts by device type, browser, or OS.

User behavior

ToolDescription
get_funnelAnalyze a conversion funnel between 2+ events — sign-up flows, checkout, onboarding.
get_retention_cohortWeekly user retention cohort table showing long-term product stickiness.
get_weekly_retention_seriesWeek-over-week retention as a time series.
get_user_last_seen_distributionHistogram of user recency — useful for churn analysis.
get_user_flowVisualize user navigation flows as a Sankey diagram (before/after/between events).
get_engagement_metricsEngagement metrics over time.

Google Search Console

These tools require GSC to be connected for the project in your dashboard settings.

ToolDescription
gsc_get_overviewGSC performance over time: clicks, impressions, CTR, and avg position.
gsc_get_top_pagesTop-performing pages from GSC ranked by clicks.
gsc_get_page_detailsDetailed GSC performance for a specific page including all queries driving traffic to it.
gsc_get_top_queriesTop search queries ranked by clicks.
gsc_get_query_opportunitiesLow-hanging-fruit SEO opportunities: queries ranking 4–20 with meaningful search volume.
gsc_get_query_detailsDetailed GSC data for a specific search query with all pages that rank for it.
gsc_get_cannibalizationQueries where multiple pages on your site compete against each other in Google.

Rate limiting

60 requests per minute per client.

On this page