Umami v3 MCP for Cloud or self-hosted analytics, with read-only, privacy-conscious defaults.
io.github.ObsidianCorps/umami-mcp: Umami v3 Model Context Protocol (MCP) Server
This MCP server connects to Umami analytics for Cloud or self-hosted deployments, providing a secure, model-friendly Model Context Protocol interface. It is designed with read-only, privacy-conscious defaults and focuses on answering questions about self-hosted Umami analytics without sending data to another analytics SaaS.
🛠️ Key Features
Umami v3 MCP integration for Cloud and self-hosted Umami Analytics
Read-only, privacy-conscious defaults
Targets Umami v3.3.1 and the 2026-07-28 MCP protocol
Retains compatibility with 2025-era MCP clients
TypeScript-based project (implied by repository topics)
🚀 Use Cases
Ask questions about self-hosted Umami analytics
Use MCP clients to query analytics context for a model
⚡ Developer Benefits
Aligns with Model Context Protocol (MCP) conventions
Supports both Umami Cloud and self-hosted Umami Analytics
Protocol compatibility across 2025-era and 2026-07-28 MCP clients
⚠️ Limitations
Intended for read-only access only
Specific compatibility scope: Umami v3.3.1 and targeted MCP protocol dates
Ask questions about your self-hosted Umami analytics without sending the data to another analytics SaaS.
A secure, model-friendly Model Context Protocol server for Umami Cloud and self-hosted Umami Analytics. It targets Umami v3.3.1 and the 2026-07-28 MCP protocol, while retaining compatibility with 2025-era MCP clients.
This repository also includes the Umami Analytics skill.
The MCP server provides access to Umami; the skill guides an agent through traffic
comparisons, conversion analysis, revenue, and performance investigations using those tools.
It follows the Agent Skills format.
For MCP Market's Import from GitHub, use the skill folder URL:
The URL must point to the folder containing SKILL.md. For a public repository, select
Public repo. The folder must be pushed to main before the marketplace can import it.
For manual installation, copy skills/umami-analytics into your agent's skills directory
(for example, .claude/skills/umami-analytics in a project). Configure and authenticate
the MCP server separately; importing the skill does not install the server
or grant access to analytics.
Why this implementation
Current Umami v3 coverage: revenue APIs, session replay, heatmaps, event/session property pivots and typed series, segments, cohorts, boards, links, pixels, Web Vitals reports, and the established analytics APIs.
Compact model surface: 17 read tools organize the API around analytical workflows instead of advertising dozens of near-duplicate endpoint tools.
Model-friendly inputs: website names/domains resolve automatically, one accessible website is selected automatically, and date ranges accept presets or exact ISO/epoch timestamps.
Structured MCP results: every tool advertises an output schema and returns structuredContent plus readable JSON.
Safe defaults: mutations are absent by default; destructive tools need a second opt-in and an exact target-specific confirmation string.
Two modern transports: local stdio and stateless Streamable HTTP. Legacy HTTP+SSE is intentionally not carried forward.
Cloud and self-hosted auth: Umami Cloud API keys, pre-issued self-hosted tokens, or lazy username/password login—including Umami v3.3+ two-factor verification—with a single refresh after 401.
Configure
From source
Requirements: Node.js 20 or newer.
bash
npm install
npm run build
UMAMI_API_KEY=your-key node dist/cli.js
For a source checkout, replace the command with node and the arguments with the absolute path to dist/cli.js.
Authentication
Choose exactly one mode:
Mode
Variables
API base
Umami Cloud
UMAMI_API_KEY
Defaults to https://api.umami.is/v1
Self-hosted token
UMAMI_BASE_URL, UMAMI_TOKEN
/api is added to a root URL
Self-hosted login
UMAMI_BASE_URL, UMAMI_USERNAME, UMAMI_PASSWORD
/api is added to a root URL
Self-hosted login+2FA
Login variables plus UMAMI_TWO_FACTOR_SECRET
/api is added to a root URL
One-off 2FA login
Login variables plus a current six-digit UMAMI_TWO_FACTOR_CODE
/api is added to a root URL
UMAMI_TWO_FACTOR_SECRET is the Base32 setup seed shown when enrolling an authenticator. The MCP generates a six-digit SHA-1 TOTP just-in-time and never logs or returns it. Because storing the password and TOTP seed together removes the separation between factors, use a dedicated least-privilege Umami account and protect its environment. A pre-issued UMAMI_TOKEN avoids retaining either credential.
UMAMI_TWO_FACTOR_CODE is only a one-off fallback; it expires quickly and is unsuitable for normal MCP startup. Configure only one two-factor variable.
Non-local plain HTTP Umami URLs are rejected. For an explicitly trusted private network only, set UMAMI_ALLOW_INSECURE_HTTP=true.
Tools
The default read-only set is:
Tool
Purpose
umami_check_connection
Verify auth and inspect the current account
umami_list_websites, umami_get_website
Discover and inspect sites
umami_get_overview, umami_get_metrics
Aggregate KPIs, series, and ranked dimensions
umami_get_realtime
Inspect the current 30-minute activity window
umami_list_sessions, umami_inspect_session
Browse sessions, activity, properties, and replay metadata
umami_query_session_data
Query session properties, pivots, stats, weekly traffic, and typed series
umami_list_events, umami_query_event_data
Browse events, comparison stats, series, properties, values, and pivots
umami_get_revenue
Fetch revenue stats, charts, dimensions, and sessions
umami_list_replays
List replays or retrieve a replay event stream
umami_run_report, umami_list_reports
Run or discover funnel, journey, goal, retention, attribution, UTM, revenue, performance, breakdown, and heatmap reports
umami_list_segments
Discover segments and cohorts
umami_list_assets
Discover boards, tracked links, and pixels
Resources expose umami://capabilities and the live umami://websites list. Reusable prompts cover analytics review, conversion review, and realtime triage.
Time ranges
Most analytical tools accept either:
period: last_24_hours, last_7_days, last_30_days, last_90_days, today, yesterday, this_week, last_week, this_month, or last_month; or
both startAt and endAt as epoch milliseconds or ISO 8601 timestamps with an offset.
Calendar periods honor the supplied IANA timezone. Rolling periods retain the most recent data instead of rounding to midnight.
Mutations and destructive operations
No mutation tool is registered by default.
bash
UMAMI_ENABLE_WRITE_TOOLS=true
This adds tools for creating/updating websites, segments, reports, boards/links/pixels, and sending analytics events. To additionally expose permanent reset/delete operations:
Destructive calls require confirmation strings such as RESET <website-id> or DELETE reports <report-id>. MCP annotations also identify these tools as destructive so supporting hosts can require approval.
Set MCP_ALLOWED_ORIGINS to a comma-separated list of exact browser origins if browser-based MCP clients connect. Requests without an Origin header remain valid for native clients. Terminate TLS at a trusted reverse proxy; the built-in static bearer gate is suitable behind that boundary, not a replacement for OAuth on a public multi-user service.