BuddyStat

VS Code

Connect VS Code and Copilot agent mode to BuddyStat's MCP server

Connecting VS Code to BuddyStat gives Copilot's agent mode access to your analytics — checking whether a fixed error still occurs, looking up which pages matter before a refactor, or creating goals for a feature as you build it.

This page covers client setup only. The MCP overview covers the endpoint, API keys and scopes, the full tool list, and troubleshooting.

Add the server

  1. Create an API key in BuddyStat.
  2. Create .vscode/mcp.json in your workspace. The inputs block keeps the key out of the file — VS Code prompts for it once when the server first starts and stores it securely, so this file is safe to commit:
{
  "inputs": [
    {
      "type": "promptString",
      "id": "buddystat-api-key",
      "description": "BuddyStat API key",
      "password": true
    }
  ],
  "servers": {
    "buddystat": {
      "type": "http",
      "url": "https://app.buddystat.com/api/mcp",
      "headers": {
        "Authorization": "Bearer ${input:buddystat-api-key}"
      }
    }
  }
}

For a self-hosted installation, replace the host with your configured BASE_URL.

To make the server available in every workspace instead, run MCP: Open User Configuration from the Command Palette and add the same JSON there. MCP: Add Server offers a guided setup as an alternative to editing the file.

Verify

Run MCP: List Servers from the Command Palette — BuddyStat should be listed with its tools, which also appear in the tools picker in Copilot's agent mode. Then ask the agent:

List my BuddyStat sites and summarize last week's traffic for each.

On this page