yawa
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@yawaWhat are my top pages this week?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
yawa - Yet Another Web Analytics
yawa is in early development. APIs, configuration, and data formats may change without notice. Use in production at your own risk.
yawa is a self-hosted web analytics platform with no UI. Instead of dashboards, you query your data through the Model Context Protocol (MCP), asking Claude or any compatible AI client questions about your traffic in plain language.
"List my analytics sites"
"What are my top pages this week?"
"Show me web vitals for my homepage."
"Which UTM campaigns are driving the most visitors?"It, obviously, requires no cookie banners or GDPR consent. Its tracking script is also super tiny.
How it works
Yet another web analytics has three moving parts.
Your app or website sends analytics with a lightweight JavaScript library (yawa) that collects page views, custom events and Web Vitals.
On your self-hosted server, you deploy a Docker container that exposes an API and MCP server. It receives the events and stores them in an embedded DuckDB database, and provides 26+ analytics tools over the Model Context Protocol.
Lastly, connect your MCP client (Claude Code/Desktop/Web, Codex, or any MCP-compatible client) to your endpoint and query your data in natural language.
Related MCP server: Gizmo Analytics
Quick Start
Run the server on any VPS or locally if you just want to give it a spin.
services:
app:
image: peterpeterparker/yawa:latest
ports:
- "3000:3000"
volumes:
- yawa-data:/data
environment:
- YAWA_SESSION_SECRET=${YAWA_SESSION_SECRET}
restart: unless-stopped
volumes:
yawa-data:docker compose up -dCreate an access token
Tokens are used to authenticate the MCP client.
docker exec -it <container-name> ./cli token create --name mytokenCopy the token - it will only be shown once.
Register your site
yawa supports multiple sites.
docker exec -it <container-name> ./cli site create --hostname yourdomain.comConnect your MCP client
Once your server is running, connect any MCP-compatible client using the token created above.
Claude Code
claude mcp add yawa https://your-server.com/mcp --transport http \
--header "Authorization: Bearer YOUR_TOKEN"Cursor
Add to your mcp.json:
{
"mcpServers": {
"yawa": {
"url": "https://your-server.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_TOKEN"
}
}
}
}Claude (web)
Go to Settings -> Integrations -> Add MCP server and enter your server URL and Bearer token.
Once connected, start by listing your sites:
List my analytics sites
Show me stats for yourdomain.com for the last 30 days
What are my top pages this week?Install the tracker
Install the tracker in your website or frontend app:
npm install yawaSetup
import { initYawa } from "yawa";
const cleanup = initYawa({
serverUrl: "https://your-yawa-server.com",
});This automatically tracks page views on load and navigation (SPA-friendly via history.pushState and popstate).
Custom events
To track a custom event, call trackEvent with a name and optional metadata:
import { trackEvent } from "yawa";
trackEvent({ name: "signup", metadata: { plan: "pro" } });Keys and values must be strings, with a maximum of 10 keys and 200 characters per key/value.
Web Vitals
Core Web Vitals (CLS, FCP, INP, LCP, TTFB) can also be collected by enabling the option when initializing the tracker:
import { initYawa } from "yawa";
const cleanup = initYawa({
serverUrl: "https://your-yawa-server.com",
webVitals: true,
});API
Function | Description |
| Initialize the tracker. Returns a cleanup function. |
| Fire-and-forget page view tracking. |
| Async page view tracking. |
| Fire-and-forget custom event. |
| Async custom event. |
Options
Option | Required | Description |
| Yes | URL of your yawa server. |
| No | Enable Web Vitals tracking. Defaults to |
MCP tools
Once connected, the following tools are available:
Sites
Tool | Description |
| List all registered sites with their IDs |
Page views
Tool | Description |
| Total pageviews, visitors, visits and bounces |
| Daily pageviews and visitors over a date range |
| Pageviews by hour of day (0-23) |
| Most visited URLs |
| Top pages with engagement metrics |
| Top page titles |
| Most common landing pages |
| Most common exit pages |
| Top referrers |
| Top referrers with engagement metrics |
| Browser breakdown |
| OS breakdown |
| Device type breakdown |
| Language breakdown |
| Time zone breakdown |
| UTM source breakdown |
| UTM medium breakdown |
| UTM campaign breakdown |
| UTM content breakdown |
| UTM term breakdown |
Custom events
Tool | Description |
| Custom event names ranked by count |
| Daily event counts over a date range |
Web Vitals
Tool | Description |
| Average, p75 and p90 per metric (CLS, FCP, INP, LCP, TTFB) |
| Per-page breakdown for a specific metric |
| Good/needs improvement/poor counts per metric |
Configuration
Variable | Required | Description |
| Recommended | Secret used to hash session IDs. If not set, random UUIDs are used instead (less accurate visitor counting). |
| No | Path where the DuckDB database file is stored. Defaults to |
Development
Clone the repo and run the app locally.
Setup
git clone https://github.com/peterpeterparker/yawa.git
cd yawa
bun install --frozen-lockfileRun locally
bun run --filter yawa-app devThe app server starts on http://localhost:3000 (events and MCP) and http://localhost:9999 (CLI only).
CLI
bun run --filter yawa-cli dev token create --name test
bun run --filter yawa-cli dev site create --hostname localhostRun tests
bun testBuild
bun run --filter yawa-app buildLicense
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/peterpeterparker/yawa'
If you have feedback or need assistance with the MCP directory API, please join our Discord server