# Umami Cloud MCP

> Umami Cloud is a privacy-focused web analytics MCP Server that lets your AI client pull real-time and historical site metrics directly into chat or code. It tracks pageviews, active users, unique visitors, and device breakdowns without sacrificing user anonymity.

## Overview
- **Category:** data-analytics
- **Price:** Free
- **Tags:** web-analytics, privacy-focused, pageviews, user-behavior, event-tracking, real-time-stats

## Description

You're tired of hopping between dashboards, right? You gotta pull data from three different places just to get a basic idea of how your site's doing. This isn't that mess. The Umami Cloud MCP Server connects any agent you use—Claude, Cursor, whatever—straight to the core metrics without making you touch a dashboard or worry about tracking cookies. It lets your AI client pull real-time and historical website data directly into your chat window or straight into your code base.

When you need to know how many people are actually on your site right now, you just call the `users` tool. It spits out an immediate, live count of active users. That's it—a single number telling you exactly how much traffic you've got running right this second. You don't have to guess; you get the hard metric instantly.

If you need a deep dive into what your site is actually doing, you use the `websites` tool. This thing pulls in a massive amount of detail about user behavior that goes way beyond simple visitor counts. It gives you detailed metrics on every URL viewed and tracks which browsers people are using. You can see exact breakdowns of operating systems—whether it's iOS or Windows—and what kind of devices they’re hitting your site with, whether that's a mobile phone or a desktop machine.

The `websites` tool handles the heavy lifting for performance tracking. It lets you pull lists of top-performing pages by showing which URLs generate the most views over any time frame you specify. You can pinpoint exactly where your audience is spending their time and figure out what content’s actually working, without ever compromising user anonymity.

When you're analyzing site demographics, this tool gives you the whole picture. It breaks down traffic by URL so you know which pages are responsible for the most views. You get granular data on browser types and operating systems used across your entire user base. That means if you notice a spike in iOS activity but low performance metrics from Safari browsers, you'll know exactly where to focus your attention.

For understanding traffic sources or session health, the combined power of these tools lets you measure key stuff like average session duration for specific groups of users. You can query historical data and get ranked lists identifying major referral sources—you’ll see if a certain search engine or social platform is bringing in the most consistent traffic.

The whole point here is efficiency. Instead of asking your team to manually export CSVs, you just tell your agent what metric you need—active users, top URLs, device breakdown—and it spits clean, actionable numbers back. It’s all about getting reliable data without dealing with the complexity or tracking baggage that other platforms force on you.

## Tools

### users
Gets the current count of active users on your website.

### websites
Retrieves specific metrics, including URLs viewed, browsers used, operating systems, and device types.

## Prompt Examples

**Prompt:** 
```
Show me the top 5 pages by pageviews on my main website for the last 7 days.
```

**Response:** 
```
Here are the top pages: 1. /home (5,000 views), 2. /pricing (1,200 views)...
```

**Prompt:** 
```
Analyze the bounce rate and absolute session duration from mobile users on the pricing page today.
```

**Response:** 
```
Fetching Umami metrics ('get_page_metrics')...
Mobile Traffic (URL: `/pricing` - Today):
- Unique Visitors: 1,840 
- Bounce Rate: 54.2%
- Average Session Duration: 1m 42s
```

**Prompt:** 
```
List the top 4 referral traffic sources matching 'social' for this month.
```

**Response:** 
```
Querying referral patterns on Umami Cloud ('get_referrers')...
Top 'Social' Referrers:
1. Twitter/X: 4,112 visits
2. LinkedIn: 2,890 visits
3. HackerNews: 1,140 visits
4. Reddit: 885 visits
```

## Capabilities

### Gauge Active Users
Instantly retrieve a live count of how many users are currently active on your site.

### Analyze Site Demographics
Get detailed breakdowns of traffic by URL, operating system, browser type, and device category (mobile/desktop).

### Track Page Performance
Pull lists of top-performing pages, allowing you to see which URLs generate the most views over a specified time frame.

### Determine Traffic Sources
Query historical data to identify and rank major referral traffic sources (e.g., social media platforms, search engines).

### Measure Session Health
Calculate key metrics like bounce rate or average session duration for specific segments of users.

## Use Cases

### Debugging a Mobile Drop-off
A PM notices conversion rates dip sharply after the checkout page. They ask their agent to run `websites` metrics for that URL, filtering by 'mobile' and comparing session duration against desktop usage. The agent returns the data: mobile users leave 30 seconds sooner than expected, pinpointing a potential UX issue.

### Pre-Launch Campaign Validation
A Marketing Manager is about to launch a big social campaign. They ask their agent to list top referral sources for the last month. The agent uses this data to confirm that LinkedIn was, in fact, the highest contributor of quality traffic, allowing the manager to allocate budget correctly.

### Quick Status Check
A developer needs a real-time headcount before starting work on an integration. They simply prompt for 'active users.' The agent runs `users` and gives them the immediate number, saving them from logging into a dashboard just for a count.

### Comparing Site Performance
A Product Manager wants to know if their new landing page is performing better than the old one. They prompt the agent to pull `websites` metrics comparing `/new-page` vs. `/old-page`, getting a clean side-by-side view of unique visitors and device usage.

## Benefits

- Stop cross-referencing tabs. You get an exact count of active users with the `users` tool—no more guessing how many people are on site right now. It's instant data.
- Understand exactly who is visiting via `websites`. You can break down traffic by OS, browser, and device type to spot user friction points immediately.
- Analyze referral sources quickly. Instead of building custom reports, the agent uses the Umami API to list top referrers matching specific criteria.
- Assess site health with minimal effort. Calculate session metrics like bounce rates for a single URL on mobile devices without opening any dashboard.
- Keep your users safe while getting data. Because this server is built on Umami, you get deep analytics insights that don't rely on tracking cookies or PII.

## How It Works

The bottom line is: it turns complex dashboard queries into simple conversational commands.

1. First, you prompt your AI agent with a question—for example, 'Show me the top 5 pages by views last week.'
2. The agent recognizes the need for analytics data and invokes the Umami Cloud MCP Server tools (like `websites`).
3. The server executes the API call, fetches the raw metrics, and hands you the structured answer right back in your chat or code environment.

## Frequently Asked Questions

**How does Umami Cloud MCP Server maintain privacy?**
It uses the Umami API, which is designed to be privacy-focused. It provides aggregated metrics like counts and percentages without tracking or exposing personal identifying information (PII) about individual users.

**What can I get using the `users` tool?**
The `users` tool gives you one thing: a live count of how many people are currently active on your website. It's a simple, immediate headcount for real-time status checks.

**Does Umami Cloud MCP Server handle historical data?**
Yes. You can prompt the agent to retrieve and analyze historical data, such as listing top pages from the last 7 days or analyzing monthly referral sources using `websites`.

**Which metrics does the `websites` tool provide?**
The `websites` tool gives a detailed breakdown. You can analyze traffic by URL, browser type (Chrome vs Safari), operating system (iOS vs Windows), and device category (mobile/desktop).

**Can I use Umami Cloud MCP Server with my code?**
Absolutely. Connecting to your agent via IDEs or terminal commands lets you run these analytics queries as part of a larger automated workflow, treating data retrieval like any other function call.

**How do I handle authentication when using the `users` tool?**
You must provide a valid API key within your agent's context. The server validates this key before executing any calls to retrieve active user counts.

**Are there rate limits if I query `websites` too frequently?**
Yes, the Umami Analytics API enforces standard request throttling rules. We recommend batching multiple metric requests into a single call to prevent exceeding defined usage limits.

**What parameters can I pass to the `users` tool for advanced filtering?**
The `users` tool accepts optional filters, including geographic region and specific operating system types. This lets you narrow down active user counts beyond just a date range.

**What data can AI generate from Umami Cloud?**
AI can query active users individually, metrics by website, page view breakdowns, browser/OS statistics, and custom triggered events.

**How does the MCP authenticate with Umami Cloud?**
The integration uses an API access token. Provide your Umami Cloud token manually or pass username and password.