Prerequisites
- Ensure you have Node.js and npm installed on your system.
Configuration
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
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
npm install
npm run build
For development purposes, use the following command to enable auto-rebuild:
npm run watch
Usage with Claude Desktop
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"
}
}
}
}
- On MacOS:
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.