umami-mcp-server
An MCP server that gives Claude read access to Umami web analytics, allowing natural language queries for stats, breakdowns, pageview trends, live visitors, and user journeys.
README
<div align="center">
Umami Analytics MCP Server
Talk to your Umami web analytics in plain English. Let Claude pull your stats, spot trends, trace user journeys, and build dashboards, no SQL, no clicking through charts.
</div>
This is a Model Context Protocol server that connects Umami to any MCP client (Claude Desktop, Cursor, and others). Ask a question, and the model picks the right analytics calls, reads the data, and answers, then you can keep going: drill in, compare ranges, or have it assemble a full dashboard.
It is a modernized, dependency-light rewrite of
jakeyShakey/umami_mcp_server:
FastMCP, an async HTTP client, a tiny core install, optional heavy features, and a test
suite. See CHANGELOG.md for the full diff in spirit.
See it in action
You: Which pages drove the most traffic last week, and where did those visitors come from?
Claude: (get_websites → get_website_metrics type=url → get_website_metrics type=referrer)
Your top pages last week were /pricing, /blog/getting-started, and /. Most of
that traffic came from Google, then a Hacker News thread, then direct visits.
Want me to break the /pricing visitors down by country or device?
You: Yeah, and show me what a typical /pricing visitor did before they left.
Claude: (get_website_metrics type=country → get_session_ids → get_tracking_data)
...
The model drives the tools. You just ask.
Why you might want this
- Plain-language analytics. No dashboards to navigate or queries to write.
- Lightweight by default. The core install is just
mcp,httpx, andpython-dotenv. No torch, no headless browser unless you opt in. - Async and non-blocking. The Umami client is built on
httpx.AsyncClient. - Works with self-hosted or Umami Cloud. API-key or username/password auth.
- Honest about quality. Pure-function test suite plus CI (ruff + pytest) on Python 3.10 to 3.13.
Tools
| Tool | What it returns | Requires |
|---|---|---|
get_websites |
Your websites and their ids (start here) | core |
get_website_stats |
Pageviews, visitors, visits, bounces, total time | core |
get_website_metrics |
Breakdown by url, referrer, browser, os, device, country, or event | core |
get_pageview_series |
Pageviews/sessions time series (hour/day/month) | core |
get_active_visitors |
Current real-time visitor count | core |
get_session_ids |
Unique session ids in a range, optionally filtered by event | core |
get_tracking_data |
Full activity timeline for one session | core |
get_html |
Raw HTML of a live page (HTTP GET, no JS) | core |
get_docs |
Semantic search across many user journeys | [rag] |
get_screenshot |
Rendered screenshot of a live page | [screenshot] |
There is also a Create Dashboard prompt that walks the model through building a full
dashboard for a website and date range. Date arguments accept YYYY-MM-DD or
YYYY-MM-DD HH:MM:SS and are interpreted as UTC.
Quick start
Requires Python 3.10+.
1. Install
pip install "git+https://github.com/MurkyPuma/umami-mcp-server.git"
2. Add it to Claude Desktop
Edit your config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"umami": {
"command": "umami-mcp-server",
"env": {
"UMAMI_API_URL": "https://cloud.umami.is",
"UMAMI_API_KEY": "your-api-key"
}
}
}
}
3. Restart Claude Desktop and ask it something like "List my websites and last week's visitors." The tools appear under the tools (hammer) icon.
If
umami-mcp-serveris not on Claude Desktop'sPATH, use the absolute path to the console script (for example/path/to/.venv/bin/umami-mcp-server), or set"command"to your Python interpreter with"args": ["-m", "umami_mcp"].
Optional features (extras)
The heavy, situational tools are opt-in so the default install stays small.
# Semantic journey search (get_docs). Pulls torch-sized wheels.
pip install "umami-mcp-server[rag] @ git+https://github.com/MurkyPuma/umami-mcp-server.git"
# Rendered screenshots (get_screenshot). Then install the browser once.
pip install "umami-mcp-server[screenshot] @ git+https://github.com/MurkyPuma/umami-mcp-server.git"
playwright install chromium
# Everything
pip install "umami-mcp-server[all] @ git+https://github.com/MurkyPuma/umami-mcp-server.git"
Without an extra, its tool still appears but returns a one-line install hint instead of failing, so nothing breaks.
Configuration
Set these as environment variables (in the MCP client config) or in a local .env
(see .env.example).
| Variable | Required | Description |
|---|---|---|
UMAMI_API_URL |
yes | Your Umami base URL, for example https://cloud.umami.is |
UMAMI_API_KEY |
one of | API key, sent as x-umami-api-key (Umami Cloud / newer self-hosted) |
UMAMI_USERNAME / UMAMI_PASSWORD |
one of | Credentials exchanged for a bearer token |
UMAMI_TEAM_ID |
no | If set, get_websites lists that team's sites; otherwise yours |
UMAMI_TIMEOUT |
no | Per-request timeout in seconds (default 30) |
Provide either UMAMI_API_KEY, or both UMAMI_USERNAME and UMAMI_PASSWORD.
Development
git clone https://github.com/MurkyPuma/umami-mcp-server.git
cd umami-mcp-server
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest # run the tests
ruff check . # lint
No live Umami is needed to test: the async client is exercised with
httpx.MockTransport, and the RAG tests cover the pure chunking/ranking helpers (the
embedding model is not loaded in CI).
src/umami_mcp/
config.py # env -> Settings (pure, no side effects)
dates.py # date string -> UTC unix millis (pure)
client.py # async httpx Umami client (auth, retry, endpoints)
web.py # get_html via httpx; optional Playwright screenshot
rag.py # optional semantic search (sentence-transformers + numpy)
server.py # FastMCP tools + Create Dashboard prompt
__main__.py # entry point
Contributing
Issues and PRs are welcome. The codebase is small and the tests are fast; a good first contribution is adding a tool for an Umami endpoint that is not covered yet.
If this saves you a trip to the Umami dashboard, a ⭐ helps other people find it.
Credits
Original concept and first implementation by jakeyShakey. Licensed under MIT.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。