Provides tools to interact with Umami Cloud and self-hosted analytics, allowing for listing websites, retrieving visitor statistics, tracking page traffic over time, analyzing device and geographic metrics, and monitoring real-time active visitors.
Umami MCP Server
MCP server that exposes Umami Cloud analytics via tools.
Tools
get_websites- List all your websitesget_stats- Get visitor statisticsget_pageviews- View page traffic over timeget_metrics- See browsers, countries, devices, and moreget_active- Current active visitors
Requirements
Python 3.13+
uv
Configure
Umami Cloud API base URL: https://api.umami.is/v1
Environment variables:
UMAMI_API_KEY- Umami Cloud API key (required for Umami Cloud)UMAMI_USERNAME- Umami username (self-hosted only)UMAMI_PASSWORD- Umami password (self-hosted only)UMAMI_API_BASE(optional) - defaults tohttps://api.umami.is/v1
Auth rules:
Umami Cloud: only
UMAMI_API_KEYis supported.Self-hosted: you can use
UMAMI_API_KEYorUMAMI_USERNAME+UMAMI_PASSWORD.You must configure at least one of these:
UMAMI_API_KEYOR (UMAMI_USERNAMEandUMAMI_PASSWORD).For self-hosted username/password auth, set
UMAMI_API_BASEto your instance API root (e.g.https://your-umami.example/api).
All tool parameters that represent times accept ISO datetimes. If a datetime is missing a timezone, it is treated as UTC.
Run locally
OpenCode MCP config
Example ~/.config/opencode/opencode.json (replace the API key and adjust the path if your clone lives elsewhere):
Self-hosted example: