Umami Analytics (Read-only)

v0.1.0
io.github.MrLinWang/umami-mcp Checked 2 days ago Published 14 days ago

Read-only Umami analytics for self-hosted sites: traffic, referrers, sessions and events.

Values you need

VariableWhat it is
UMAMI_URLrequired Base URL of your self-hosted Umami instance, such as https://analytics.example.com.
UMAMI_API_TOKENrequired secret Umami API key or login token with access to the sites you want to query.
UMAMI_WEBSITE_IDoptional Optional default Umami website UUID.
UMAMI_TIMEZONEoptional Optional IANA timezone, such as Asia/Shanghai. Defaults to UTC.

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add umami-mcp -e 'UMAMI_API_TOKEN=<UMAMI_API_TOKEN>' -e 'UMAMI_URL=<UMAMI_URL>' -- npx -y mrlinwang-umami-mcp@0.1.0
Add to claude_desktop_config.json
{
  "mcpServers": {
    "umami-mcp": {
      "args": [
        "-y",
        "mrlinwang-umami-mcp@0.1.0"
      ],
      "command": "npx",
      "env": {
        "UMAMI_API_TOKEN": "<UMAMI_API_TOKEN>",
        "UMAMI_URL": "<UMAMI_URL>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "umami-mcp": {
      "args": [
        "-y",
        "mrlinwang-umami-mcp@0.1.0"
      ],
      "command": "npx",
      "env": {
        "UMAMI_API_TOKEN": "<UMAMI_API_TOKEN>",
        "UMAMI_URL": "<UMAMI_URL>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "UMAMI_API_TOKEN",
      "id": "umami-api-token",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "UMAMI_URL",
      "id": "umami-url",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "umami-mcp": {
      "args": [
        "-y",
        "mrlinwang-umami-mcp@0.1.0"
      ],
      "command": "npx",
      "env": {
        "UMAMI_API_TOKEN": "${input:umami-api-token}",
        "UMAMI_URL": "${input:umami-url}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.umami-mcp]
command = "npx"
args = ["-y", "mrlinwang-umami-mcp@0.1.0"]
env = { "UMAMI_API_TOKEN" = "<UMAMI_API_TOKEN>", "UMAMI_URL" = "<UMAMI_URL>" }

For AI agents

  1. Ask the user for: UMAMI_URL, UMAMI_API_TOKEN. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: list_teams, list_websites, get_website_stats, get_website_traffic, get_website_metrics, get_events, get_sessions, get_session_activity, ….
  5. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json