OnyxMetric

VS Code

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

Connecting VS Code to OnyxMetric 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 OnyxMetric.
  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": "onyxmetric-api-key",
      "description": "OnyxMetric API key",
      "password": true
    }
  ],
  "servers": {
    "onyxmetric": {
      "type": "http",
      "url": "https://app.onyxmetric.com/api/mcp",
      "headers": {
        "Authorization": "Bearer ${input:onyxmetric-api-key}"
      }
    }
  }
}

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 — OnyxMetric should be listed with its tools, which also appear in the tools picker in Copilot's agent mode. Then ask the agent:

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

On this page