Skip to main content
Glama
Umami MCP

Umami MCP

by kennethreitz

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PORTNoHTTP port. Default 8787. Takes precedence over MCP_PORT when both are set.8787
MCP_HOSTNoBind address. Use 0.0.0.0 for HTTP or 127.0.0.1 for stdio's unused default.
MCP_PORTNoHTTP port. Default 8787. Used when PORT is not set.8787
UMAMI_URLNoSelf-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_TRANSPORTNoTransport mode: 'stdio' (default) or 'http'.stdio
UMAMI_API_KEYNoCloud API key or self-hosted API key. One of the supported authentication modes.
MCP_AUTH_TOKENNoBearer token clients must send. Required when MCP_TRANSPORT=http; the server will not listen without it.
UMAMI_PASSWORDNoSelf-hosted login password. Used together with UMAMI_USERNAME when no API key is provided.
UMAMI_TIMEZONENoDefault timezone as an IANA name. Used for resolving date ranges.America/New_York
UMAMI_USERNAMENoSelf-hosted login username. Used together with UMAMI_PASSWORD when no API key is provided.
MCP_ALLOWED_HOSTSNoComma-separated Host values. Enables DNS-rebinding checks.
UMAMI_CLOUD_REGIONNoCloud region. Use 'us' or 'eu' to send Cloud calls to https://api.umami.is/v1/us or /eu.
MCP_ALLOWED_ORIGINSNoComma-separated Origin values. Used with the allowed hosts list.
UMAMI_API_KEY_HEADERNoHow 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

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.4/5.0

Scored across 6 tools

Disambiguation4/5

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.

Naming Consistency5/5

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.

Tool Count5/5

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.

Completeness4/5

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.

Maintenance

ActivityMaintained
ResponsivenessOutdated data