Measure Measure
Sign In Start Free Trial
← Blog
windsurf mcp analytics developer ai-ide

Windsurf + Measure.events: Add Analytics to Your AI IDE Workflow

by Jules

Windsurf — the AI-powered IDE from Codeium — supports MCP servers. That changes what “checking your analytics” looks like.

Instead of switching tabs to your analytics dashboard, you can ask Windsurf:

“How much traffic did the pricing page get this week?”

“What’s the top referrer to my blog?”

“Did pageviews drop after I pushed the last deploy?”

Windsurf queries your Measure.events data in real time and answers directly in your IDE. No tab switching. No context loss.

Here’s how to set it up.


Why This Matters

The typical developer analytics workflow:

  1. Notice something might be wrong (or right)
  2. Switch to browser
  3. Log in to analytics dashboard
  4. Navigate to the right view
  5. Get distracted by other tabs
  6. Return to code, having lost your train of thought

With MCP-connected analytics in Windsurf, step 1 → answer happens without leaving the editor.

This isn’t just convenience — it changes how often you actually check analytics. Data you can access with a question becomes data you use. Data that requires tab-switching becomes data you ignore.


Prerequisites

  • Windsurf installed
  • A Measure.events account (free to start)
  • Your site’s tracking script installed on your site

Step 1: Get Your Measure.events API Key

Log in to lets.measure.events, go to API Keys, and create a new key. Copy it — you’ll need it in a moment.

While you’re here, note your Site ID from the Sites page. You’ll need that too.


Step 2: Configure the MCP Server in Windsurf

Windsurf reads MCP configuration from ~/.codeium/windsurf/mcp_config.json. If the file doesn’t exist, create it.

Add the Measure.events MCP server:

{
  "mcpServers": {
    "measure-events": {
      "url": "https://lets.measure.events/mcp",
      "headers": {
        "Authorization": "Bearer mk_your_api_key_here"
      }
    }
  }
}

Replace mk_your_api_key_here with your actual Measure.events API key.


Step 3: Restart Windsurf

Close and reopen Windsurf. The MCP server will start automatically. You should see the Measure.events tools available in Cascade (Windsurf’s AI panel).

To verify it’s connected, open Cascade and ask:

“Can you check how many pageviews my site had this week?”

If the connection is working, you’ll get a real number.


What You Can Ask

Once connected, Measure.events tools are available to Cascade. Practical questions:

Traffic checks:

  • “How many pageviews did I get today?”
  • “What’s the 7-day trend?”
  • “Is traffic up or down compared to last week?”

Content performance:

  • “Which blog posts got the most traffic this week?”
  • “What’s the bounce rate on the pricing page?”

Referrers and sources:

  • “Where is my traffic coming from?”
  • “Is Hacker News sending traffic?”
  • “Which search queries bring users in?”

Engineering context:

  • “Did the deploy I pushed at 3pm cause any traffic drop?”
  • “Is the new landing page getting traffic?”

Multiple Sites

If you’re working across multiple projects (common for freelancers and agencies), a single MCP connection gives you access to all of them. Just ask Windsurf to filter by site name or domain — the MCP server has access to all sites on your account:

{
  "mcpServers": {
    "measure-events": {
      "url": "https://lets.measure.events/mcp",
      "headers": {
        "Authorization": "Bearer mk_your_key"
      }
    }
  }
}

Then ask things like: “How is my client site example.com doing this week?” — Cascade will query the right site automatically.


Also Works With Cursor and Claude Desktop

The same MCP configuration works in Cursor and Claude Desktop — just with different config file paths:

Cursor: ~/.cursor/mcp.json

{
  "mcpServers": {
    "measure-events": {
      "url": "https://lets.measure.events/mcp",
      "headers": {
        "Authorization": "Bearer mk_your_key"
      }
    }
  }
}

Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)


Why Measure.events for This

A few reasons this works better than trying to connect other analytics tools:

Native MCP server. Measure.events is the only analytics platform that ships a first-class MCP server. Other tools (Plausible, Fathom, GA4) have APIs, but no MCP support — you’d need to build your own connector.

Privacy-first, no sampling. Unlike Google Analytics 4, Measure.events doesn’t sample data or require consent banners. You see real numbers, not statistical estimates.

Simple API. The data model is clean enough that AI tools can reason about it accurately. Complex tools like Mixpanel or Amplitude have data models that are hard for LLMs to query reliably.

$29/month flat. No per-event pricing, no MTU limits, no seat-based charges. One price, unlimited events.


Get Started

  1. Sign up for Measure.events (free, no credit card required)
  2. Install the tracking script on your site (one <script> tag)
  3. Add the MCP config to Windsurf
  4. Ask your first question

It takes about 5 minutes. After that, you’ll wonder how you worked without it.

Start for free at lets.measure.events

Ready to see accurate analytics?

No cookies. No consent banners. No personal data. $29/mo with a 14-day free trial.

Start free trial →