Metrifyr
Getting Started

Installation

Install Metrifyr MCP server in your preferred client

Installation

Metrifyr MCP server works with any MCP-compatible client. This guide covers the most popular options.

Prerequisites

Claude Desktop

The official Claude desktop app from Anthropic.

macOS

  1. Open Claude Desktop config:
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
  1. Add Metrifyr to mcpServers:
{
  "mcpServers": {
    "metrifyr": {
      "command": "npx",
      "args": ["-y", "@metrifyr/mcp-server@latest"],
      "env": {
        "METRIFYR_API_KEY": "your-api-key-here"
      }
    }
  }
}
  1. Restart Claude Desktop

Windows

  1. Open config file:
notepad %APPDATA%\Claude\claude_desktop_config.json
  1. Add the same configuration as macOS
  2. Restart Claude Desktop

Linux

  1. Open config file:
nano ~/.config/Claude/claude_desktop_config.json
  1. Add the same configuration
  2. Restart Claude Desktop

Cursor IDE

Cursor supports MCP through the Cline extension.

  1. Install Cline extension in Cursor
  2. Open Cline MCP settings (Cmd/Ctrl + Shift + P → "Cline: Open MCP Settings")
  3. Add Metrifyr configuration:
{
  "mcpServers": {
    "metrifyr": {
      "command": "npx",
      "args": ["-y", "@metrifyr/mcp-server@latest"],
      "env": {
        "METRIFYR_API_KEY": "your-api-key-here"
      }
    }
  }
}
  1. Reload Cursor

VS Code (Cline Extension)

Same as Cursor - install Cline extension and configure MCP settings.

Zed Editor

  1. Open Zed settings (Cmd/Ctrl + ,)
  2. Add to your settings.json:
{
  "context_servers": {
    "metrifyr": {
      "command": {
        "path": "npx",
        "args": ["-y", "@metrifyr/mcp-server@latest"],
        "env": {
          "METRIFYR_API_KEY": "your-api-key-here"
        }
      }
    }
  }
}
  1. Restart Zed

Custom MCP Client

If you're building your own MCP client or using a different tool:

import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';

const transport = new StdioClientTransport({
  command: 'npx',
  args: ['-y', '@metrifyr/mcp-server@latest'],
  env: {
    METRIFYR_API_KEY: process.env.METRIFYR_API_KEY,
  },
});

const client = new Client(
  {
    name: 'my-client',
    version: '1.0.0',
  },
  {
    capabilities: {
      tools: {},
    },
  }
);

await client.connect(transport);

Environment Variables

You can configure the MCP server using environment variables:

VariableRequiredDescription
METRIFYR_API_KEYYesYour Metrifyr API key
METRIFYR_BASE_URLNoCustom API base URL (default: https://metrifyr.cloud)
LOG_LEVELNoLogging level: debug, info, warn, error (default: info)

Example with custom base URL:

{
  "mcpServers": {
    "metrifyr": {
      "command": "npx",
      "args": ["-y", "@metrifyr/mcp-server@latest"],
      "env": {
        "METRIFYR_API_KEY": "your-api-key-here",
        "METRIFYR_BASE_URL": "https://custom.metrifyr.cloud",
        "LOG_LEVEL": "debug"
      }
    }
  }
}

Verifying Installation

After installation, verify the server is working:

  1. Restart your MCP client
  2. Open a new chat/session
  3. Type: "List my Google Analytics properties"

If you see your GA4 properties, the installation is successful! 🎉

Troubleshooting

"Command not found: npx"

Install Node.js 18 or later from nodejs.org

"MCP server failed to start"

Check the logs in your client. Common issues:

  • Invalid API key format
  • Network connectivity problems
  • Node.js version too old

"No tools available"

Make sure you've:

  1. Connected your Google account in Dashboard
  2. Enabled tools for your API key
  3. Restarted your MCP client after configuration

See full troubleshooting guide

Next Steps

On this page

Installation | Metrifyr Docs | Metrifyr