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.
Before beginning installation, you need to:
pip install uv
You need to configure your Claude Desktop to connect to the MCP server:
Edit Claude Desktop Config File
Locate and edit the config file:
~/Library/Application Support/Claude/claude_desktop_config.json
%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"
}
}
}
}
Configure Environment Variables
Replace the placeholders with your actual information:
/path/to/analytics_service
: The full path to your analytics_service directoryUMAMI_API_URL
: URL of your Umami instance (self-hosted or Umami Cloud)UMAMI_USERNAME
and UMAMI_PASSWORD
: Your Umami account credentialsUMAMI_TEAM_ID
: The ID of the team you want to analyzeWhen 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.
For optimal experience, enable these features in Claude Desktop:
The easiest way to start using the server is with the pre-built dashboard prompt:
The server provides these tools to Claude:
You can interact with Claude using natural language to analyze your website data:
Claude will automatically select the appropriate tools to answer your queries.
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.
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.
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.
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"
}
}
}
}
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.
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.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.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