Umami MCP Server
Provides tools for interacting with Umami Analytics (both Cloud and self-hosted instances) to retrieve website lists, summary statistics, time-series pageview data, metric breakdowns (by URL, referrer, browser, etc.), and real-time active visitor counts.
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 MCP ServerHow many active visitors are on my website right now?"
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.
Umami MCP Server
An MCP server for Umami Analytics — works with both Umami Cloud and self-hosted instances.
Zero dependencies. No cloning, no install steps — just point your MCP client at it.
Why?
Existing Umami MCP servers either don't support Umami Cloud (which uses API key auth, not username/password) or are broken and bloated (torch, faiss, sentence-transformers for… analytics?).
This server talks to the Umami API and exposes 5 tools over MCP. Pure Python, zero dependencies.
Related MCP server: Plausible MCP Server
Tools
Tool | Description |
| List all tracked websites |
| Summary stats: pageviews, visitors, visits, bounces, totaltime (seconds) |
| Time-series pageview/session data (unit: minute/hour/day/month/year; timezone: IANA, e.g. UTC) |
| Breakdown by type: path/url/entry/exit/referrer/domain/title/query/event/tag/hostname/browser/os/device/screen/language/country/region/city/channel |
| Number of currently active visitors (last 5 minutes) |
Quick Start
1. Get your credentials
Umami Cloud: Go to Settings → API Keys in your Umami Cloud dashboard and create an API key.
Self-hosted: Use the username and password you log in with.
2. Add to your MCP client
No cloning required — uvx fetches and runs it directly from GitHub.
Requires
uv. Install with:curl -LsSf https://astral.sh/uv/install.sh | sh
Claude Desktop / Claude Code
Add to your MCP config (~/.claude.json, Claude Desktop settings, etc.):
Umami Cloud:
{
"mcpServers": {
"umami": {
"command": "uvx",
"args": ["--from", "git+https://github.com/lukasschmit/umami-mcp", "umami-mcp"],
"env": {
"UMAMI_URL": "https://api.umami.is",
"UMAMI_API_KEY": "your_api_key_here"
}
}
}
}Self-hosted:
{
"mcpServers": {
"umami": {
"command": "uvx",
"args": ["--from", "git+https://github.com/lukasschmit/umami-mcp", "umami-mcp"],
"env": {
"UMAMI_URL": "https://your-umami-instance.com",
"UMAMI_USERNAME": "admin",
"UMAMI_PASSWORD": "your_password"
}
}
}
}Cursor
Add to .cursor/mcp.json in your project root (or global settings):
{
"mcpServers": {
"umami": {
"command": "uvx",
"args": ["--from", "git+https://github.com/lukasschmit/umami-mcp", "umami-mcp"],
"env": {
"UMAMI_URL": "https://api.umami.is",
"UMAMI_API_KEY": "your_api_key_here"
}
}
}
}VS Code (Copilot)
Add to your VS Code settings.json:
{
"mcp": {
"servers": {
"umami": {
"command": "uvx",
"args": ["--from", "git+https://github.com/lukasschmit/umami-mcp", "umami-mcp"],
"env": {
"UMAMI_URL": "https://api.umami.is",
"UMAMI_API_KEY": "your_api_key_here"
}
}
}
}
}BoltAI
Go to Settings → MCP Servers → Add Server, then enter:
Command:
uvxArguments:
--from git+https://github.com/lukasschmit/umami-mcp umami-mcpEnvironment Variables:
UMAMI_URL=https://api.umami.isUMAMI_API_KEY=your_api_key_here
Environment Variables
Variable | Required | Description |
| Self-hosted: Yes, Cloud: Optional | Base URL — defaults to |
| Cloud | API key from Umami Cloud dashboard |
| Self-hosted | Login username |
| Self-hosted | Login password |
| Optional | Cloudflare Access service token client ID (for protected self-hosted APIs) |
| Optional | Cloudflare Access service token secret |
| Optional | Custom User-Agent for outbound requests (default: |
| Optional | Set to |
Set either UMAMI_API_KEY (Cloud) or both UMAMI_USERNAME + UMAMI_PASSWORD (self-hosted). The server auto-detects which mode to use.
For convenience, UMAMI_URL may include /v1 (Cloud) or /api (self-hosted); suffixes are normalized automatically.
If your self-hosted Umami is behind Cloudflare Access, set both UMAMI_CF_ACCESS_CLIENT_ID and UMAMI_CF_ACCESS_CLIENT_SECRET so machine-to-machine MCP calls can pass Access checks.
get_metrics accepts both type="path" and type="url" for compatibility across Umami versions.
startAt and endAt accept Unix-millisecond integers or numeric strings from MCP clients.
For time-based tools, you can use range instead of raw timestamps:
last_24h, last_7d, last_30d, this_month, last_month.
compare supports prev (previous period, same length) and yoy (year-over-year).
Usage Examples
Once connected, you can ask your AI assistant things like:
"What are my top pages this week?"
"Show me visitor trends for the last 30 days"
"Which countries are my visitors from?"
"How many people are on my site right now?"
"Compare this month's traffic to last month"
The assistant will call the appropriate tools with the right parameters.
How It Works
The server implements the Model Context Protocol over stdio (JSON-RPC, one JSON object per line). When an MCP client starts it, the server:
Reads JSON-RPC messages from stdin
Handles
initialize,tools/list, andtools/callmethodsMakes authenticated HTTP requests to the Umami API
Returns results as JSON text content
No background processes, no polling, no state beyond the auth token.
License
MIT
Available Tools
5 toolsget_activeB
Get the number of currently active visitors on a website (last 5 minutes).
| Name | Required | Description | Default |
|---|---|---|---|
| websiteId | Yes | Website UUID |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the core functionality but lacks details on permissions, rate limits, error handling, or response format. For a read operation with no annotation coverage, this leaves significant gaps in understanding how the tool behaves beyond basic output.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with zero waste—it directly states the purpose, resource, and time constraint. It is appropriately sized and front-loaded, making it easy to parse without unnecessary elaboration.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (one parameter, no output schema, no annotations), the description is minimally adequate. It covers the core purpose but lacks behavioral details and output information, which are needed for full contextual understanding. Without annotations or output schema, the description should do more to compensate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema fully documents the 'websiteId' parameter. The description adds no additional parameter semantics beyond implying the tool operates on a website, which is already clear from the schema. This meets the baseline for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Get') and resource ('number of currently active visitors on a website'), specifying the time window ('last 5 minutes'). It distinguishes from siblings like 'get_metrics' or 'get_pageviews' by focusing on active visitors, though not explicitly naming alternatives.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for real-time visitor counts within a 5-minute window, but does not explicitly state when to use this tool versus alternatives like 'get_metrics' or 'get_pageviews'. No exclusions or prerequisites are mentioned, leaving usage context inferred rather than explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_metricsC
Get a breakdown of metrics by a given dimension (url, referrer, browser, os, device, country, event, etc.) for a website.
| Name | Required | Description | Default |
|---|---|---|---|
| websiteId | Yes | Website UUID | |
| startAt | Yes | Start timestamp in Unix milliseconds | |
| endAt | Yes | End timestamp in Unix milliseconds | |
| type | Yes | Metric dimension to break down by | |
| limit | No | Maximum number of results (default: 500) | |
| offset | No | Number of results to skip for pagination | |
| path | No | Filter by URL path | |
| referrer | No | Filter by referrer | |
| title | No | Filter by page title | |
| query | No | Filter by query string | |
| browser | No | Filter by browser name | |
| os | No | Filter by operating system | |
| device | No | Filter by device type (desktop, mobile, tablet) | |
| country | No | Filter by country code (e.g. US, DE) | |
| region | No | Filter by region | |
| city | No | Filter by city | |
| hostname | No | Filter by hostname | |
| language | No | Filter by language | |
| event | No | Filter by event name | |
| tag | No | Filter by tag |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is a read operation ('Get'), but doesn't mention authentication requirements, rate limits, pagination behavior (beyond the 'limit' and 'offset' parameters in the schema), error conditions, or what the output format looks like. For a tool with 20 parameters and no output schema, this leaves significant behavioral gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the core purpose. Every word earns its place: 'Get a breakdown of metrics' establishes the action, 'by a given dimension' specifies the key functionality, and the parenthetical list provides helpful examples without verbosity. No wasted words or redundant information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a complex tool with 20 parameters, no annotations, and no output schema, the description is insufficiently complete. While the schema documents parameters well, the description doesn't address behavioral aspects like authentication, rate limits, or output format. The agent would struggle to understand the full context of tool usage without additional information about what metrics are returned and how they're structured.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 100% description coverage, so all parameters are documented in the structured schema. The description adds minimal value beyond the schema by listing example dimension values ('url, referrer, browser, os, device, country, event, etc.') which corresponds to the 'type' parameter's enum. However, it doesn't explain parameter interactions or provide additional context beyond what's already in the schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Get a breakdown of metrics by a given dimension... for a website.' It specifies the verb ('Get'), resource ('metrics'), and scope ('for a website'), and lists example dimensions. However, it doesn't explicitly differentiate this tool from sibling tools like 'get_stats' or 'get_pageviews', which likely provide different types of analytics data.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'get_stats' or 'get_pageviews', nor does it explain what makes this tool distinct (e.g., dimensional breakdowns vs. aggregate metrics). The agent must infer usage from the description alone without explicit context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_pageviewsC
Get time-series pageview and session data for a website, bucketed by the chosen time unit.
| Name | Required | Description | Default |
|---|---|---|---|
| websiteId | Yes | Website UUID | |
| startAt | Yes | Start timestamp in Unix milliseconds | |
| endAt | Yes | End timestamp in Unix milliseconds | |
| unit | Yes | Time bucket granularity | |
| timezone | Yes | Timezone for bucketing (e.g. 'America/New_York', 'UTC') | |
| compare | No | Compare with previous period ('prev') or year-over-year ('yoy') | |
| path | No | Filter by URL path | |
| referrer | No | Filter by referrer | |
| title | No | Filter by page title | |
| query | No | Filter by query string | |
| browser | No | Filter by browser name | |
| os | No | Filter by operating system | |
| device | No | Filter by device type (desktop, mobile, tablet) | |
| country | No | Filter by country code (e.g. US, DE) | |
| region | No | Filter by region | |
| city | No | Filter by city | |
| hostname | No | Filter by hostname | |
| language | No | Filter by language | |
| event | No | Filter by event name | |
| tag | No | Filter by tag |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions retrieving data but fails to describe key traits: whether this is a read-only operation (implied by 'Get' but not explicit), potential rate limits, authentication needs, error handling, or the format of returned data (e.g., time-series structure). For a tool with 20 parameters and no annotations, this is a significant gap in transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the core purpose ('Get time-series pageview and session data for a website') and adds a key detail ('bucketed by the chosen time unit'). There is no wasted verbiage, making it appropriately sized and easy to parse for an AI agent.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (20 parameters, no annotations, no output schema), the description is incomplete. It doesn't explain the return values (e.g., what the time-series data looks like), behavioral aspects like pagination or limits, or how filters interact. For a data retrieval tool with many optional filters, more context is needed to guide effective use, especially without annotations or output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, meaning all parameters are documented in the input schema with clear descriptions. The description adds minimal value beyond the schema by mentioning 'bucketed by the chosen time unit', which relates to the 'unit' parameter but doesn't provide additional syntax or format details. With high schema coverage, the baseline score of 3 is appropriate as the description doesn't compensate significantly.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Get') and resource ('time-series pageview and session data for a website'), specifying what data is retrieved. It also mentions bucketing by time unit, which adds specificity. However, it doesn't explicitly differentiate this tool from sibling tools like 'get_metrics' or 'get_stats', which might also retrieve analytics data, leaving some ambiguity about sibling differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'get_active', 'get_metrics', 'get_stats', or 'get_websites'. It lacks context about prerequisites, such as needing a valid website ID, or any exclusions (e.g., when not to use it). This absence of comparative or contextual advice leaves the agent without clear usage direction.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_statsB
Get summary statistics (pageviews, visitors, visits, bounces, totaltime) for a website over a date range. Timestamps are Unix milliseconds.
| Name | Required | Description | Default |
|---|---|---|---|
| websiteId | Yes | Website UUID | |
| startAt | Yes | Start timestamp in Unix milliseconds | |
| endAt | Yes | End timestamp in Unix milliseconds | |
| compare | No | Compare with previous period ('prev') or year-over-year ('yoy') | |
| path | No | Filter by URL path | |
| referrer | No | Filter by referrer | |
| title | No | Filter by page title | |
| query | No | Filter by query string | |
| browser | No | Filter by browser name | |
| os | No | Filter by operating system | |
| device | No | Filter by device type (desktop, mobile, tablet) | |
| country | No | Filter by country code (e.g. US, DE) | |
| region | No | Filter by region | |
| city | No | Filter by city | |
| hostname | No | Filter by hostname | |
| language | No | Filter by language | |
| event | No | Filter by event name | |
| tag | No | Filter by tag |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. While it mentions the date range requirement and timestamp format, it doesn't address important behavioral aspects like whether this is a read-only operation, potential rate limits, authentication requirements, pagination behavior, or what happens when filters return no data. The description provides basic operational context but lacks comprehensive behavioral transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise with just two sentences that communicate the core purpose and a critical implementation detail (Unix milliseconds). Every word earns its place, and the information is front-loaded with the main functionality stated first.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 18 parameters and no output schema or annotations, the description provides adequate basic context about what the tool does but lacks completeness. It doesn't explain the return format, how the compare parameter affects output, what units the statistics are in, or how multiple filters interact. The description is functional but leaves significant gaps for a complex analytics tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 100% schema description coverage, the schema already documents all 18 parameters thoroughly. The description adds minimal value beyond the schema by mentioning the date range requirement and timestamp format, but doesn't provide additional semantic context about parameter interactions, default behaviors, or practical usage examples. This meets the baseline for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Get summary statistics') and specifies the exact metrics (pageviews, visitors, visits, bounces, totaltime) for a website over a date range. It distinguishes from siblings by focusing on summary statistics rather than active users, raw metrics, pageviews, or website listings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus the sibling tools (get_active, get_metrics, get_pageviews, get_websites). There's no mention of alternatives, prerequisites, or specific use cases that would help an agent choose between these similar analytics tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_websitesC
List all tracked websites in your Umami account.
| Name | Required | Description | Default |
|---|---|---|---|
| search | No | Optional search text to filter websites by name or domain | |
| page | No | Page number for pagination (default: 1) | |
| pageSize | No | Number of results per page | |
| includeTeams | No | Include team-owned websites |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'List' implies a read-only operation, it doesn't specify if this requires authentication, has rate limits, returns paginated results (though hinted by parameters), or what the output format is. The description is too minimal for a tool with multiple parameters and no output schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence with zero waste. It's front-loaded with the core action and resource, making it efficient and easy to parse, though it could benefit from more context given the lack of annotations and output schema.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (4 parameters, no annotations, no output schema), the description is incomplete. It doesn't explain return values, error handling, or behavioral traits like pagination or authentication needs. For a list tool with filtering options, more context is needed to guide effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, so the input schema fully documents all four parameters. The description adds no additional parameter semantics beyond implying a listing action, which doesn't compensate for or enhance the schema's details. This meets the baseline for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('List') and resource ('all tracked websites in your Umami account'), making the purpose immediately understandable. However, it doesn't differentiate this tool from sibling tools like 'get_active' or 'get_stats', which might also retrieve website-related data but with different scopes or filters.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'get_active' or 'get_metrics'. It lacks context about whether this is for general listing, filtered searches, or specific use cases, leaving the agent to infer usage from the tool name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
v1.0.0- First observed
get_active - First observed
get_metrics - First observed
get_pageviews - First observed
get_stats - First observed
get_websites
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: get_active focuses on real-time visitor counts, get_metrics provides dimensional breakdowns, get_pageviews offers time-series data, get_stats gives summary statistics, and get_websites lists available websites. There is no overlap or ambiguity in their functions.
All tool names follow a consistent verb_noun pattern with 'get_' as the prefix (e.g., get_active, get_metrics, get_pageviews, get_stats, get_websites). This uniformity makes the set predictable and easy to understand.
With 5 tools, this server is well-scoped for analytics purposes, covering key aspects like real-time data, metrics, time-series, summaries, and website listing. Each tool earns its place without feeling excessive or insufficient.
The toolset provides strong coverage for querying analytics data, including active visitors, detailed metrics, pageviews, stats, and websites. A minor gap is the lack of tools for configuration or management (e.g., adding websites or events), but agents can effectively work with the provided read-only operations.
Maintenance
Related MCP Connectors
Privacy-first web analytics. Query pageviews, referrers, trends, and AI insights.
SEO & marketing toolkit for AI agents: GA4, Search Console, AdSense, GTM, PageSpeed, Trends.
Real-time web analytics for AI agents: query traffic, funnels, revenue, and manage your sites.
Privacy-first web analytics for AI agents: visitors, revenue, funnels, visitor profiles.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnhances Claude's capabilities by providing access to website analytics data from Umami, enabling analysis of user behavior, website performance tracking, and data-driven insights generation.9MIT
- FlicenseBqualityDmaintenanceAllows AI models to query and retrieve analytics data from Plausible Analytics through the Plausible API, enabling natural language interactions with website statistics.18-
- AlicenseAqualityCmaintenanceEnables AI assistants to query website statistics from Plausible Analytics, providing access to metrics like real-time visitors, traffic trends, and page performance. It supports both Plausible Cloud and self-hosted instances through the Stats API v2.626 npm1MIT
- AlicenseNot gradedqualityCmaintenanceExposes Umami analytics (Cloud or self-hosted) as read-only tools for querying website stats, pageviews, metrics, and active visitors.312 npmMIT