v1.2.0

Janus Client SDK

A lightweight JavaScript library for tracking events from web applications. Automatically handles batching, retries, rate limiting, and persistence.

Lightweight (~3KB)Auto RetryBatchingPersistence

MCP Server

Overview#

The Janus MCP server lets AI coding agents query your analytics directly. It connects to your Janus account using an API key and exposes six read-only tools. Works with Claude Code, Claude Desktop, Cursor, Windsurf, and any MCP-compatible client. The MCP server reads data, so it needs a key with **Full access** scope. Generate a separate one for it in Settings — do not reuse the Ingest key from your website, and do not put this key anywhere a browser can download it.

Setup#

Claude Code#

One command:
bash
claude mcp add janus -e JANUS_API_KEY=jns_your_key -- npx -y @janus-analytics/mcp-server

Claude Desktop / Cursor / Windsurf#

Add to your MCP config file:
MCP config
{
"mcpServers": {
"janus": {
"command": "npx",
"args": ["-y", "@janus-analytics/mcp-server"],
"env": {
"JANUS_API_KEY": "jns_your_key_here"
}
}
}
}

Config File Locations#

ClientLocation
Claude Desktop (Mac)~/Library/Application Support/Claude/claude_desktop_config.json
Claude Desktop (Windows)%APPDATA%\Claude\claude_desktop_config.json
CursorSettings > MCP Servers
Windsurf~/.windsurf/mcp.json

Available Tools#

All tools are read-only. Your agent can view data but cannot create events, delete records, or change settings.
ToolDescription
get_dashboard_statsEvent counts, unique visitors, top pages, referrers, countries, bounce rate, and daily trends. Optional apiKeyId filter.
query_eventsSearch and filter the event log by type, tags, date range, API key, and pagination.
get_usageCurrent month event usage vs. tier cap, API key count, and per-key breakdown.
list_journeysAll funnels with step definitions, match scope, and conversion windows.
get_journey_resultsPer-step conversion rates, drop-off counts, and median time between steps. Requires journey ID.
list_api_keysYour keys with names, prefixes, allowed origins, and last-used dates.

Example Prompts#

Once connected, ask your agent: - "How's my traffic looking this week?" - "What are my top pages from the last 7 days?" - "Am I close to my usage limit this month?" - "What's my signup funnel conversion rate?" - "Which API key is getting the most events?"

Limits#

MCP tool calls share your API rate limits (Free: 100 requests/min). Read queries do not count toward your monthly event cap. Data access follows your tier: journey results require Pro, event caps still apply. Higher rate limits are coming with paid tiers.

Need Help?

If you have questions or run into issues, check out our troubleshooting guide or reach out to our support team.

Troubleshooting Guide