Umami MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PORT | No | HTTP port. Default 8787. Takes precedence over MCP_PORT when both are set. | 8787 |
| MCP_HOST | No | Bind address. Use 0.0.0.0 for HTTP or 127.0.0.1 for stdio's unused default. | |
| MCP_PORT | No | HTTP port. Default 8787. Used when PORT is not set. | 8787 |
| UMAMI_URL | No | Self-hosted site origin, such as https://analytics.example.com. Required for self-hosted authentication; not required for Cloud when UMAMI_API_KEY is set. | |
| MCP_TRANSPORT | No | Transport mode: 'stdio' (default) or 'http'. | stdio |
| UMAMI_API_KEY | No | Cloud API key or self-hosted API key. One of the supported authentication modes. | |
| MCP_AUTH_TOKEN | No | Bearer token clients must send. Required when MCP_TRANSPORT=http; the server will not listen without it. | |
| UMAMI_PASSWORD | No | Self-hosted login password. Used together with UMAMI_USERNAME when no API key is provided. | |
| UMAMI_TIMEZONE | No | Default timezone as an IANA name. Used for resolving date ranges. | America/New_York |
| UMAMI_USERNAME | No | Self-hosted login username. Used together with UMAMI_PASSWORD when no API key is provided. | |
| MCP_ALLOWED_HOSTS | No | Comma-separated Host values. Enables DNS-rebinding checks. | |
| UMAMI_CLOUD_REGION | No | Cloud region. Use 'us' or 'eu' to send Cloud calls to https://api.umami.is/v1/us or /eu. | |
| MCP_ALLOWED_ORIGINS | No | Comma-separated Origin values. Used with the allowed hosts list. | |
| UMAMI_API_KEY_HEADER | No | How to send the Umami API key: 'both' (default), 'bearer', or 'x-umami-api-key'. | both |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Read-only access to a Umami analytics account. Use list_websites when the site name or domain is unclear, then pass that id, name, or domain to the other tools.
Date ranges: today, yesterday, 24h, 7d, 30d, 90d, this week, last week, this month, last month, this year, last year, or ISO dates (2026-01-01 or 2026-01-01/2026-01-31). Times use the timezone argument. When it is omitted, the server default is used (America/New_York unless UMAMI_TIMEZONE is set).
get_stats includes pageviews, visitors, visits, bounces, and total time, each compared with the previous period of the same length. get_metrics ranks one dimension (path, referrer, browser, os, device, country, event, and others). Nothing here creates, edits, or deletes analytics data.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_websitesA | List websites this account can read. query matches a name or domain (exact match first, then a substring). Team websites are included. Pass an id from this list to the other tools when more than one site could match. |
| get_statsA | Pageviews, visitors, visits, bounces, and total time for a date range. Each number is compared with the previous period of the same length. website is an id, name, or domain. date_range accepts today, 7d, 30d, this month, or ISO dates. timezone is an IANA name; the default is America/New_York unless UMAMI_TIMEZONE is set. |
| get_pageviewsB | Pageviews and sessions over time. unit is minute, hour, day, month, or year. When omitted, a short range uses hours and a longer one uses days or months. See get_stats for website, date_range, and timezone. |
| get_metricsC | Rank one dimension: path, referrer, browser, os, device, country, event, and others. metric also accepts entry, exit, title, query, hostname, domain, channel, tag, screen, language, region, city, and UTM fields. url is an alias for path (older Umami servers called this dimension url). limit is 1 to 100. |
| get_active_visitorsB | How many visitors are on the website right now. This is Umami's active-visitor count (the last few minutes). |
| get_eventsA | Recent tracked events, newest first. kind is event (custom events, the default), pageview, or all. event filters by custom event name. search matches event details. limit is 1 to 100 and is one page, not every event in the range. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 6 tools
Each tool targets a distinct analytics need: real-time counts, site listing, aggregate summary numbers, time series, dimension ranking, and event streams. get_stats and get_pageviews overlap slightly since pageviews appear in both, but the descriptions clarify totals vs. over-time, and cross-references ('See get_stats for...') reduce misselection.
All six tools follow a clean get_/list_ verb_noun pattern in snake_case (get_active_visitors, list_websites, get_stats, get_pageviews, get_metrics, get_events). No mixing of conventions or camelCase.
Six tools is well-scoped for a read-only analytics server, with each tool mapping to a distinct reporting view (realtime, aggregate, trend, ranked dimension, events, site directory). No filler tools.
Covers the core read surface for analytics: site discovery, active visitors, aggregate stats, trends, dimension breakdowns, and events. Minor gaps remain (e.g., no session/journey or saved-report retrieval, no per-site metadata), but agents can accomplish standard reporting workflows.