← All resources Product

Connect VS Code and GitHub Copilot to Measurebase

Measurebase speaks MCP - the open protocol AI assistants use to reach external tools - and so does GitHub Copilot in VS Code. Add Measurebase as a remote MCP server and Copilot Chat answers your tracking questions next to the code you are working on.

What you can ask

Copilot answers with your live data: statistics, request types, browser and bot breakdowns, Consent Mode v2 signals, request logs, alerts, plan usage, and the ad-block detection status - across every account you're a member of.

Connect in two minutes

  1. Open the Command Palette, run MCP: Add Server…, pick HTTP, enter https://mcp.measurebase.com/mcp, name it measurebase, and choose User (every window) or Workspace (.vscode/mcp.json, shared through the repo). You need VS Code 1.101 or newer.
  2. This is the entry VS Code writes:
{
  "servers": {
    "measurebase": {
      "type": "http",
      "url": "https://mcp.measurebase.com/mcp"
    }
  }
}
  1. Click Start above the server entry (or run MCP: List Servers). VS Code discovers the Measurebase authorization server on its own, opens your browser for the Measurebase login, and shows the consent screen that spells out what it gets.
  2. Click Allow. Open Copilot Chat, switch to Agent mode, and the Measurebase tools are listed behind the tools button - ask away.

🔒 Read-only by design

New connections are read-only unless you explicitly tick read & write on the consent screen - and read-only means exactly that: it can never change anything, not your domains, not your settings, not your tokens. With write access the assistant can also toggle power-ups, verify DNS, generate tracking scripts, and set up new accounts and domains (returning the exact DNS record to add) - never more than your own role on each account allows, and Auto Grant Consent is excluded permanently.

Prefer a token?

You can skip the OAuth flow with a static header. Create a personal API token in the dashboard under Settings → API tokens (read-only by default, valid until you revoke it) and let VS Code prompt for it instead of storing it in the file:

{
  "inputs": [
    { "id": "measurebase-token", "type": "promptString", "password": true, "description": "Measurebase API token" }
  ],
  "servers": {
    "measurebase": {
      "type": "http",
      "url": "https://mcp.measurebase.com/mcp",
      "headers": { "Authorization": "Bearer ${input:measurebase-token}" }
    }
  }
}

VS Code asks for the token once and keeps it in its secret storage, so a workspace file can be committed without leaking it.

How access and privacy work

🤝 For agencies

Your connection follows your agency access too: clients who approved your link are queryable in the same conversation. "Which of my clients had alerts this week?" is one question instead of ten dashboard visits.

Continue reading

Ready to move your tagging to Europe?

Start free, no credit card required. Live in about 15 minutes.

Start free