MCP Hub
Back to servers

openpanel-mcp-server

MCP server for OpenPanel analytics - track events, query analytics, manage profiles. Works with self-hosted and cloud instances.

npm111/wk
Updated
Feb 25, 2026

Quick Install

npx -y openpanel-mcp-server

openpanel-mcp-server

npm version License: MIT

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-server

Other MCP Clients

npx openpanel-mcp-server

Configuration

Environment VariableRequiredDefaultDescription
OPENPANEL_CLIENT_IDYesClient ID from your OpenPanel project
OPENPANEL_CLIENT_SECRETYesClient secret from your OpenPanel project
OPENPANEL_API_URLNohttps://api.openpanel.devAPI URL (set for self-hosted instances)

Get credentials from your OpenPanel dashboard: Settings → Projects → Select project → Create client (Root type).

Tools

Write Operations

ToolDescription
openpanel_track_eventTrack a custom analytics event with properties
openpanel_identify_profileCreate or update a user profile
openpanel_increment_propertyIncrement a numeric profile property
openpanel_decrement_propertyDecrement a numeric profile property
openpanel_alias_profileLink two profile IDs (e.g. anonymous → authenticated)

Read Operations

ToolDescription
openpanel_get_eventsQuery events with filters, date ranges, and pagination
openpanel_get_chartAggregated analytics: metrics, trends, breakdowns, comparisons
openpanel_health_checkVerify 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 mode

Architecture

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 tests
  • Transport: stdio
  • Auth: openpanel-client-id + openpanel-client-secret headers
  • API: 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

Reviews

No reviews yet

Sign in to write a review