Umami MCP
Provides read-only analytics tools for Umami Cloud and self-hosted Umami Analytics: verifies auth and lists websites, retrieves overview KPIs, metrics, series and ranked dimensions, realtime activity, sessions and session properties, events, revenue, session replays, segments and cohorts, boards/links/pixels, and Web Vitals/performance reports, plus funnel, journey, goal, retention, attribution and UTM reports. Mutations (creating/updating sites, segments, reports, boards, links, pixels, sending events) and destructive reset/delete operations are available only via explicit opt-in flags.
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., "@Umami MCPShow me this month's traffic compared to last month"
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.
ObsidianCorps Umami MCP
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.

Install
Requirements: Node.js 20 or newer and one configured authentication mode.
npx -y @obsidiancorps/umami-mcpTry asking:
“Compare website traffic with last month.”
“Which sources generated the most conversions?”
“Find pages with poor Web Vitals.”
Related MCP server: umami-mcp-server
Agent skill
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:
https://github.com/ObsidianCorps/umami-mcp/tree/main/skills/umami-analyticsThe 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
structuredContentplus 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.
Defense in depth: response byte limits, request timeouts, HTTPS enforcement, token refresh, DNS-rebinding protection, exact origin checks, and constant-time MCP bearer checks.
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.
npm install
npm run build
UMAMI_API_KEY=your-key node dist/cli.jsExample MCP client configuration:
{
"mcpServers": {
"umami": {
"command": "npx",
"args": ["-y", "@obsidiancorps/umami-mcp"],
"env": {
"UMAMI_API_KEY": "your-key",
"UMAMI_DEFAULT_WEBSITE_ID": "optional-website-uuid"
}
}
}
}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 |
| Defaults to |
Self-hosted token |
|
|
Self-hosted login |
|
|
Self-hosted login+2FA | Login variables plus |
|
One-off 2FA login | Login variables plus a current six-digit |
|
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 |
| Verify auth and inspect the current account |
| Discover and inspect sites |
| Aggregate KPIs, series, and ranked dimensions |
| Inspect the current 30-minute activity window |
| Browse sessions, activity, properties, and replay metadata |
| Query session properties, pivots, stats, weekly traffic, and typed series |
| Browse events, comparison stats, series, properties, values, and pivots |
| Fetch revenue stats, charts, dimensions, and sessions |
| List replays or retrieve a replay event stream |
| Run or discover funnel, journey, goal, retention, attribution, UTM, revenue, performance, breakdown, and heatmap reports |
| Discover segments and cohorts |
| 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, orlast_month; orboth
startAtandendAtas 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.
UMAMI_ENABLE_WRITE_TOOLS=trueThis adds tools for creating/updating websites, segments, reports, boards/links/pixels, and sending analytics events. To additionally expose permanent reset/delete operations:
UMAMI_ENABLE_WRITE_TOOLS=true
UMAMI_ENABLE_DESTRUCTIVE_TOOLS=trueDestructive 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.
Streamable HTTP
Loopback example:
MCP_TRANSPORT=http MCP_BEARER_TOKEN=replace-me npm start
# MCP: http://127.0.0.1:3000/mcp
# Health: http://127.0.0.1:3000/healthFor a container or non-loopback bind, both MCP_BEARER_TOKEN and MCP_ALLOWED_HOSTS are required:
docker build -t umami-mcp .
docker run --rm -p 3000:3000 \
-e UMAMI_API_KEY=your-key \
-e MCP_BEARER_TOKEN=long-random-secret \
-e MCP_ALLOWED_HOSTS=mcp.example.com \
umami-mcpSet 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.
Configuration reference
Variable | Default | Description |
| Cloud API for API-key auth | Umami root or full API base URL |
| — | Avoids site resolution for most calls |
|
| Upstream request timeout, 100–120000 ms |
|
| Maximum upstream response, 1 KB–10 MB |
|
| Registers non-destructive mutation tools |
|
| Registers reset/delete tools; requires write tools |
|
|
|
|
| HTTP bind address |
|
| HTTP port |
| — | Protects the HTTP MCP endpoint |
| — | Comma-separated hostnames for non-loopback HTTP |
| — | Comma-separated exact browser origins |
Development
npm install
npm test
npm run typecheck
npm run lint
npm run format:check
npm run build
npm run checkTests drive the server through real in-memory, stdio, and Streamable HTTP MCP clients. See CONTRIBUTING.md and SECURITY.md before opening a change.
Compatibility baseline
Umami: v3.3.1, with compatibility expected for late v3 releases exposing the documented routes.
MCP SDK: TypeScript SDK v2.0.0.
MCP protocol: 2026-07-28 plus the SDK's stateless compatibility path for 2025-era clients.
Node.js: 20, 22, and 24.
Umami is a trademark of its respective owner. This independent integration is not affiliated with or endorsed by Umami Software.
License
Apache-2.0. See LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Privacy-first product analytics. Your agent sets up tracking and answers questions about traffic.
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
Connect your ads, shop, analytics, social, CRM and finance platforms once, then let Claude, ChatGPT, Cursor or any MCP client read, join and explain your numbers. Public statistics from the World Bank, IMF, Eurostat, OECD, WHO and SEC filings come as context, searchable and chartable from the same tools. Read-only by design, every number carries its source.
Connect Google Analytics to ChatGPT. Query GA4 data in plain English and get instant insights.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceSelf-hosted web analytics platform that exposes analytics data via the Model Context Protocol, enabling natural language queries about traffic, page views, web vitals, and custom events.12MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for Umami Analytics that provides read-only tools to query website stats, events, sessions, reports, and more, enabling natural language analytics queries.18 npm3MIT
- AlicenseAqualityDmaintenanceA read-only MCP server for Umami analytics, enabling natural language queries of website stats, traffic trends, events, sessions, and analytics reports.1313 npm1Elastic 2.0
- AlicenseNot gradedqualityBmaintenanceA read-only Model Context Protocol server for self-hosted Umami analytics. Enables querying website analytics data such as pageviews, visitors, and metrics through natural language.1MIT