Raygun MCP Server Setup Guide

Prerequisites
  • Ensure you have Node.js and npm installed on your system.

Configuration


  1. Set Environment Variables



    • Required: RAYGUN_PAT_TOKEN

    • Optional: SOURCEMAP_ALLOWED_DIRS


    Example:


    export RAYGUN_PAT_TOKEN=your-pat-token-here
    export SOURCEMAP_ALLOWED_DIRS=/path/to/allowed/dirs

Installation

Install Dependencies

npm install
 

Build the Server

npm run build
 

Development with Auto-Rebuild

For development purposes, use the following command to enable auto-rebuild:

npm run watch
 

Usage with Claude Desktop


  1. Add Server Configuration



    • On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json

    • On Windows: %APPDATA%/Claude/claude_desktop_config.json


    Example configuration:


    {
    "mcpServers": {
    "raygun": {
    "command": "npx",
    "args": ["-y", "@raygun.io/mcp-server-raygun"],
    "env": {
    "RAYGUN_PAT_TOKEN": "your-pat-token-here"
    }
    }
    }
    }


  2. Alternative Command Configuration


    If using a direct path to the built server:


    {
    "mcpServers": {
    "raygun": {
    "command": "/path/to/server-raygun/build/index.js",
    "env": {
    "RAYGUN_PAT_TOKEN": "your-pat-token-here"
    }
    }
    }
    }

Debugging


  • Use the MCP Inspector for debugging:


    npm run inspector


  • The Inspector will provide a URL to access debugging tools in your browser.


Share this post: