Umami Analytics MCP server

Integrates with Umami analytics to enable website performance analysis, user behavior tracking, and data-driven insights generation through semantic search and web crawling capabilities.
Back to servers
Setup instructions
Provider
jakeyShakey
Release date
Feb 21, 2025
Language
Python
Stats
6 stars

The Umami Analytics MCP Server provides Claude access to website analytics data from Umami, enabling it to analyze user behavior, track website performance, and deliver data-driven insights through the Model Context Protocol.

Installation

Prerequisites

Before beginning installation, you need to:

  • Install uv: pip install uv

Configuration

You need to configure your Claude Desktop to connect to the MCP server:

  1. Edit Claude Desktop Config File

    Locate and edit the config file:

    • MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%/Claude/claude_desktop_config.json

    Add the following JSON configuration:

    {
      "mcpServers": {
        "analytics_service": {
          "command": "uv",
          "args": [
            "--directory",
            "/path/to/analytics_service",
            "run",
            "analytics-service"
          ],
          "env": {
           "UMAMI_API_URL": "https://example.com",
           "UMAMI_USERNAME": "yourUmamiUsername",
           "UMAMI_PASSWORD": "yourUmamiPassword", 
           "UMAMI_TEAM_ID": "yourUmamiTeamId"
         }
        }
      }
    }
    
  2. Configure Environment Variables

    Replace the placeholders with your actual information:

    • /path/to/analytics_service: The full path to your analytics_service directory
    • UMAMI_API_URL: URL of your Umami instance (self-hosted or Umami Cloud)
    • UMAMI_USERNAME and UMAMI_PASSWORD: Your Umami account credentials
    • UMAMI_TEAM_ID: The ID of the team you want to analyze

Launching the Server

When you open Claude Desktop, it will automatically connect to the analytics_service MCP server. The initialization may take a few minutes as packages are installed. The server is ready when you see the hammer icon with "10" in the bottom right of the chat window.

Enabling Additional Features

For optimal experience, enable these features in Claude Desktop:

  1. Navigate to "Feature Preview" in the left-hand panel
  2. Enable "Analysis tool" to allow Claude to build dashboards and visualizations
  3. Optionally enable "LaTeX Rendering" for mathematical notation

Usage

Quick Start with Dashboard Creation

The easiest way to start using the server is with the pre-built dashboard prompt:

  1. Click the "Attach from MCP" button at the bottom left of the chat window
  2. Select "Choose implementation" and then "Create Dashboard Prompt"
  3. Follow the guided process to specify:
    • Website name
    • Analysis timeframe (start/end dates)
    • Website timezone
  4. Press Enter to generate the dashboard

Available Analytics Tools

The server provides these tools to Claude:

  • get_websites: List websites and their IDs in your Umami account
  • get_website_stats: Retrieve pageviews, visitors, bounce rate metrics
  • get_website_metrics: Analyze URLs, referrers, browsers, countries data
  • get_pageview_series: Generate time-series pageview data
  • get_active_visitors: Check current visitor count
  • get_session_ids: Find session IDs for events/time periods
  • get_tracking_data: View detailed session activity
  • get_docs: Perform semantic search on user journeys
  • get_screenshot: Capture webpage visuals
  • get_html: Retrieve webpage HTML code

Natural Language Queries

You can interact with Claude using natural language to analyze your website data:

  • Ask about traffic patterns: "Show me website traffic for the last week"
  • Request specific analyses: "What's my bounce rate across different traffic sources?"
  • Explore user behavior: "Analyze the most common user paths through my checkout process"
  • Get recommendations: "What pages have the highest exit rates and how can I improve them?"

Claude will automatically select the appropriate tools to answer your queries.

Creating Custom Workflows

For advanced usage, you can create custom prompts for specialized analytics tasks by adding them to the server configuration. These can be accessed through the same "Attach from MCP" interface.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "analytics_service" '{"command":"uv","args":["--directory","/path/to/analytics_service","run","analytics-service"],"env":{"UMAMI_API_URL":"https://example.com","UMAMI_USERNAME":"yourUmamiUsername","UMAMI_PASSWORD":"yourUmamiPassword","UMAMI_TEAM_ID":"yourUmamiTeamId"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "analytics_service": {
            "command": "uv",
            "args": [
                "--directory",
                "/path/to/analytics_service",
                "run",
                "analytics-service"
            ],
            "env": {
                "UMAMI_API_URL": "https://example.com",
                "UMAMI_USERNAME": "yourUmamiUsername",
                "UMAMI_PASSWORD": "yourUmamiPassword",
                "UMAMI_TEAM_ID": "yourUmamiTeamId"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "analytics_service": {
            "command": "uv",
            "args": [
                "--directory",
                "/path/to/analytics_service",
                "run",
                "analytics-service"
            ],
            "env": {
                "UMAMI_API_URL": "https://example.com",
                "UMAMI_USERNAME": "yourUmamiUsername",
                "UMAMI_PASSWORD": "yourUmamiPassword",
                "UMAMI_TEAM_ID": "yourUmamiTeamId"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later