惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
Google Developers Blog
D
Docker
Stack Overflow Blog
Stack Overflow Blog
GbyAI
GbyAI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Google DeepMind News
Google DeepMind News
M
MIT News - Artificial intelligence
H
Help Net Security
T
Tailwind CSS Blog
Engineering at Meta
Engineering at Meta
L
LangChain Blog
MongoDB | Blog
MongoDB | Blog
腾讯CDC
H
Hackread – Cybersecurity News, Data Breaches, AI and More
S
SegmentFault 最新的问题
博客园 - 司徒正美
C
Check Point Blog
B
Blog
Y
Y Combinator Blog
Microsoft Azure Blog
Microsoft Azure Blog
P
Proofpoint News Feed
F
Fortinet All Blogs
美团技术团队
D
DataBreaches.Net

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
I built web analytics with no dashboard, only an MCP
Henrik Holen · 2026-05-19 · via DEV Community
Cover image for I built web analytics with no dashboard, only an MCP

Henrik Holen

A while back I built an analytics tool. It had two ideas: it was cheap, and it sent you an AI summary every Sunday. Turns out cheap made no difference, but the few people who used it liked the AI summary a lot more than the dashboard.

So I threw away the dashboard and rebuilt the whole thing as an MCP server. 42 tools that AI coding agents (Claude Code, Cursor, Codex) can call directly. Traffic, sources, funnels, session paths, events, performance. The agent asks questions, the tools return compact JSON.

The idea is simple: your coding agent already has your codebase, your database, and your git history. Adding traffic data gives it one more layer of context. The analytics isn't something you go and check, it's context the agent uses while it works.

The basic implementation

You're building a new landing page and your agent already knows your traffic patterns. It can tell you that /blog/why-acme converts at 12% while /docs gets 189 views and zero signups. You don't ask for a report, the agent just has that context available when it's making suggestions.

Or you deploy a change and ask "did anything break?" The agent calls get_snapshot, compares to yesterday, and tells you bounce rate spiked 15% on the pricing page. That's a 30-second conversation instead of opening a dashboard, finding the right view, selecting the right date range.

The CLAUDE.md experiment

The part I found most interesting was getting the agent to use analytics unprompted. I tested three approaches:

  1. No instructions — agent never touched analytics
  2. Full paragraph explaining what Lodd is and when to use it — agent added tracking to new features
  3. Three lines near the top of CLAUDE.md pointing to a skill file — agent added tracking to new features, same as the verbose version

Position mattered more than length. The same three lines buried at line 172 didn't work. At line 17 they did. The agent reads the whole file, but early instructions seem to carry more weight.

That's three lines of config and your agent starts adding analytics tracking to every new page and feature without being asked.

Some details

  • Responses use shortened keys (v not visitors) to save context window tokens. A full snapshot is about 55 tokens.
  • 49 REST API endpoints for automation workflows (scheduled reports, Slack alerts, GitHub issue creation when traffic drops).
  • No cookies, country-only geolocation, hashed IPs. GDPR compliant without consent banners.
  • 2KB tracking script with SPA support built in.
  • Free up to 2,500 events/month, €9.99/month for 100K.

Limitations

No dashboard. If you need charts for a board meeting, this isn't the right tool. It's newer and less battle-tested than Plausible or Fathom. No self-hosting option.

Try it

Install the MCP server:

npx -y @lodd/mcp-server

Enter fullscreen mode Exit fullscreen mode

Or point your coding agent at lodd.dev/llms.txt and let it figure out the setup.

The REST API docs are at lodd.dev/api if you want to build automations. I wrote a tutorial on automating monthly reports with Trigger.dev if that's your thing.

lodd.dev