Skip to content
measure

Windsurf + Measure: add analytics to your AI IDE workflow

Windsurf supports MCP servers, so you can query your site analytics directly from your AI coding assistant. Here's how to set it up in 5 minutes.

Guides4 min readBy Measure team

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 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 account ($29/month for 40 sites, 14-day trial)
  • The tracking script installed on your site:
HTML
<script defer src="https://lets.measure.events/api/script/YOUR_TRACKING_ID"></script>

Step 1: Get your Measure API key

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

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 MCP server:

JSON
{
  "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 API key.

Step 3: Restart Windsurf

Close and reopen Windsurf. The MCP server will connect automatically. You should see the Measure tools (list_sites, get_site_analytics, get_breakdown and the rest) 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 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?”
  • “Who’s on the site right now?”

Content performance:

  • “Which blog posts got the most traffic this week?”
  • “How is the pricing page doing?”

Referrers and sources:

  • “Where is my traffic coming from?”
  • “Is Hacker News sending traffic?”
  • “Which AI agents are visiting — ChatGPT-User, ClaudeBot, PerplexityBot?”

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 — the MCP server can see every site on your account. Just ask Windsurf to filter by site name or domain:

“How is my client site example.com doing this week?”

Cascade will call list_sites, find the right one, and query it.

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

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 for this

A few reasons this works better than trying to connect a typical analytics tool:

First-class MCP server. Measure ships its own MCP server. Many analytics tools only offer an API, so you’d need to build your own connector.

Privacy-first, no sampling. Measure doesn’t sample data and doesn’t use cookies, so no cookie banner is needed for it. You see real numbers, not statistical estimates — with humans, AI agents and bots counted separately.

Simple data model. The data model is clean enough that AI tools can reason about it accurately. Complex product-analytics suites have data models that are hard for LLMs to query reliably.

Simple pricing. $29/month covers 40 sites, then $0.50 per site per month. No per-event pricing, no MTU limits, no seat-based charges.

Get started

  1. Sign up for Measure — 14-day trial
  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.

Let your agent read the numbers.

$29 a month covers 40 sites, then $0.50 a site. 14-day trial.