openpanel-mcp-server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@openpanel-mcp-server Show me page views for the last 7 days broken down by country."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
openpanel-mcp-server
MCP server for OpenPanel — the open-source analytics platform. Enables LLMs to track events, manage user profiles, and query analytics data.
Works with self-hosted and cloud OpenPanel instances.
Quick Start
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"openpanel": {
"command": "npx",
"args": ["-y", "openpanel-mcp-server"],
"env": {
"OPENPANEL_CLIENT_ID": "your-client-id",
"OPENPANEL_CLIENT_SECRET": "your-client-secret",
"OPENPANEL_API_URL": "https://your-domain.com/api"
}
}
}
}Claude Code
claude mcp add openpanel \
-e OPENPANEL_CLIENT_ID=your-client-id \
-e OPENPANEL_CLIENT_SECRET=your-client-secret \
-e OPENPANEL_API_URL=https://your-domain.com/api \
-- npx -y openpanel-mcp-serverOther MCP Clients
npx openpanel-mcp-serverRelated MCP server: posthog-mcp
Configuration
Environment Variable | Required | Default | Description |
| Yes | — | Client ID from your OpenPanel project |
| Yes | — | Client secret from your OpenPanel project |
| No |
| API URL (set for self-hosted instances) |
Get credentials from your OpenPanel dashboard: Settings → Projects → Select project → Create client (Root type).
Tools
Write Operations
Tool | Description |
| Track a custom analytics event with properties |
| Create or update a user profile |
| Increment a numeric profile property |
| Decrement a numeric profile property |
| Link two profile IDs (e.g. anonymous → authenticated) |
Read Operations
Tool | Description |
| Query events with filters, date ranges, and pagination |
| Aggregated analytics: metrics, trends, breakdowns, comparisons |
| Verify OpenPanel instance connectivity |
Usage Examples
Track events:
"Track a purchase event for user-123 with amount 99.99 and currency USD"
Query analytics:
"Show me page views for the last 7 days broken down by country"
Get raw events:
"Get the last 20 signup events from this month"
Chart with filters:
"Compare screen_view counts this week vs last week, broken down by browser"
Development
git clone https://github.com/ubeytd/open-panel-mcp.git
cd open-panel-mcp
npm install
npm test # 42 tests
npm run build # compile TypeScript
npm run dev # watch modeArchitecture
src/
├── index.ts # Entry point (stdio transport)
├── constants.ts # Config constants
├── types.ts # TypeScript interfaces
├── schemas/index.ts # Zod input validation
├── services/api-client.ts # OpenPanel HTTP client
├── tools/register.ts # MCP tool definitions
└── __tests__/ # Unit testsTransport: stdio
Auth:
openpanel-client-id+openpanel-client-secretheadersAPI: OpenPanel public REST API (
/track,/export/events,/export/charts,/healthcheck)Validation: Zod schemas with descriptive errors
Zero deps: Uses native
fetch(Node 18+), no axios/node-fetch
License
MIT
Available Tools
8 toolsopenpanel_alias_profileAlias ProfileIdempotent
Link two profile IDs together. Useful for merging anonymous and authenticated profiles.
Args:
profile_id (string, required): The primary profile ID
project_id (string, required): OpenPanel project ID
alias (string, required): The alias profile ID to link (e.g. anonymous session ID)
Returns: Confirmation that the profiles were linked.
Example: Link an anonymous session to a logged-in user.
Inputs: alias (required), profile_id (required), project_id (required).
openpanel_decrement_propertyDecrement Profile Property
Decrement a numeric property on a user profile.
Args:
profile_id (string, required): User profile ID
project_id (string, required): OpenPanel project ID
property (string, required): Property name to decrement (e.g. 'credits')
value (number, optional): Amount to decrement by (default: 1)
Returns: Confirmation that the property was decremented.
Inputs: property (required), profile_id (required), project_id (required), value.
openpanel_get_chartGet Chart / Analytics DataRead-onlyIdempotent
Query aggregated analytics data from OpenPanel. Use this for metrics, trends, and breakdowns.
Args:
project_id (string, optional): OpenPanel project ID. If omitted, uses the project linked to your client credentials.
events (array, required): Events to analyze. Each: { name, segment?, filters? }
name (string): Event name (e.g. 'page_view', 'purchase')
segment (string, optional): 'event' | 'user' | 'session' | 'property_sum' | 'property_average'
filters (array, optional): [{ name, operator, value[] }]
operator: 'is' | 'isNot' | 'contains' | 'doesNotContain' | 'gt' | 'gte' | 'lt' | 'lte' | 'regex'
breakdowns (array, optional): [{ name }] - Properties to break down by (e.g. 'browser', 'country')
interval (string, optional): 'minute' | 'hour' | 'day' | 'week' | 'month' (default: 'day')
range (string, optional): Time range, e.g. '7d', '30d', '90d', '1y' (default: '30d')
start_date (string, optional): Custom start date (ISO). Overrides range.
end_date (string, optional): Custom end date (ISO). Overrides range.
previous (boolean, optional): Include previous period comparison (default: false)
Returns: Chart data with time series, aggregated values, and breakdowns.
Examples:
Page views last 7 days: events=[{name:"page_view"}], range="7d"
Signups by country: events=[{name:"signup"}], breakdowns=[{name:"country"}]
Unique users per week: events=[{name:"session_start", segment:"user"}], interval="week"
Inputs: events (required), range, end_date, interval, +4 more.
openpanel_get_eventsGet EventsRead-onlyIdempotent
Query tracked events from OpenPanel with filtering and pagination.
Args:
project_id (string, optional): OpenPanel project ID. If omitted, uses the project linked to your client credentials.
event (string | string[], optional): Event name(s) to filter by
profile_id (string, optional): Filter events by user profile ID
start (string, optional): Start date in ISO format (e.g. '2025-01-01')
end (string, optional): End date in ISO format (e.g. '2025-01-31')
page (number, optional): Page number (default: 1)
limit (number, optional): Events per page (default: 50, max: 200)
Returns JSON: { "meta": { "count": number, "totalCount": number, "pages": number, "current": number }, "data": [{ "id", "name", "profileId", "properties", "createdAt", "country", "browser", ... }] }
Use 'page' to paginate through large result sets.
Inputs: end, page, event, limit, +3 more.
openpanel_health_checkCheck OpenPanel HealthRead-onlyIdempotent
Check if the OpenPanel instance is healthy and responding.
Returns: { "status": "ok" } if the instance is running.
Use this to verify connectivity before running other tools.
Inputs: no named parameters.
openpanel_identify_profileIdentify User ProfileIdempotent
Create or update a user profile in OpenPanel.
Args:
profile_id (string, required): Unique user identifier
project_id (string, required): OpenPanel project ID
first_name (string, optional): User's first name
last_name (string, optional): User's last name
email (string, optional): User's email address
avatar (string, optional): URL to user's avatar image
properties (object, optional): Custom profile properties
Returns: Confirmation that the profile was updated.
Inputs: profile_id (required), project_id (required), email, avatar, +3 more.
openpanel_increment_propertyIncrement Profile Property
Increment a numeric property on a user profile.
Args:
profile_id (string, required): User profile ID
project_id (string, required): OpenPanel project ID
property (string, required): Property name to increment (e.g. 'login_count')
value (number, optional): Amount to increment by (default: 1)
Returns: Confirmation that the property was incremented.
Inputs: property (required), profile_id (required), project_id (required), value.
openpanel_track_eventTrack Event
Track a custom analytics event in OpenPanel.
Args:
name (string, required): Event name (e.g. 'button_click', 'purchase', 'signup')
project_id (string, required): OpenPanel project ID
profile_id (string, optional): User profile ID to associate this event with
properties (object, optional): Custom key-value properties for the event
Returns: Confirmation that the event was accepted (202 Accepted).
Example: Track a purchase event with amount and currency properties.
Inputs: name (required), project_id (required), profile_id, properties.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Query your Betterlytics web analytics from AI agents: traffic, funnels, journeys, errors, uptime.
Agent-Native Amplitude/Mixpanel - connect data sources, prompt for charts
Lets AI agents analyze API metrics, request logs, and traces, and manage apps and alerts.
Analytics, tag manager, email inboxes and session replay an AI agent sets up itself. Open source.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceEnables ChatGPT to query and analyze Mixpanel analytics data in real-time. Provides live access to event segmentation and detailed analytics data from your Mixpanel project through natural language.-
- AlicenseBqualityDmaintenanceEnables AI agents to query PostHog analytics data directly via tool calls, including insights, events, feature flags, trends, and persons.5MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to query Mixpanel event data, funnel conversion rates, and retention cohorts via MCP tools or natural language.297 npmMIT
- AlicenseBqualityBmaintenanceEnables AI agents to query self-hosted product analytics, investigate changes with evidence and coverage checks, and use optional management tools for saved reports, goals, and keys.201MIT