Provides comprehensive alert management capabilities including listing, creating, acknowledging, and closing alerts, as well as managing alert notes, viewing activity logs, and adding custom properties to alerts in Opsgenie.
Opsgenie MCP Server
A Model Context Protocol (MCP) server that provides comprehensive Opsgenie alert management capabilities.
Features
Complete Alert Management: List, create, acknowledge, and close alerts
Alert Notes: Add and retrieve notes for alerts
Alert Logs: View alert activity logs
Custom Details: Add custom properties to alerts
Multiple Transport Support: stdio, HTTP, and Server-Sent Events (SSE)
Built with TypeScript and the official MCP SDK
Installation
Installing via Smithery
To install opsgenie-mcp-server for Claude Desktop automatically via Smithery:
From npm (recommended)
Or add to your project:
From source
Usage
Transport Options
The server supports multiple transport protocols with flexible API key configuration:
1. Stdio Transport (Default) - For Desktop Integration
With Environment Variable:
With CLI Argument:
2. HTTP Transport - For Web Applications and Hosted Deployment
Basic HTTP Server:
With Environment Variable:
HTTP API Key Configuration:
When using HTTP transport, clients can provide API keys through multiple methods:
Environment Variable:
OPSGENIE_API_KEY=your-keyCustom Header:
X-Opsgenie-API-Key: your-keyAuthorization Header:
Authorization: Bearer your-keyQuery Parameter:
?apiKey=your-key
HTTP endpoints:
Modern clients:
POST http://localhost:3000/mcpLegacy clients:
GET http://localhost:3000/sse(Server-Sent Events)
3. Custom Port
Command Line Options
Authentication
The Opsgenie MCP server supports multiple ways to provide your API key for authentication:
Option 1: Environment Variable (Recommended)
Option 2: CLI Argument
Option 3: Per-tool Parameter (Backwards Compatible)
When using tools directly, you can still provide the API key as a parameter:
All Opsgenie API operations require an API key. You can obtain one from your Opsgenie account:
Go to Opsgenie Settings → API Key Management
Create a new API key with appropriate permissions
Use this key in the
apiKeyparameter for all tool calls
Getting Your Opsgenie API Key
Login to Opsgenie: Go to app.opsgenie.com
Navigate to Settings: Click on your profile icon → Settings
API Key Management: Go to "API Key Management" section
Create New Key: Click "Create API Key"
Set Permissions: Grant the following permissions:
Configuration Access: Read, Create, Update, Delete
Alert: Read, Create, Update, Delete
Incident: Read, Create, Update, Delete
Copy the Key: Save the generated API key securely
Using the API Key
With the improved API key handling, you now have several options:
Option 1: Set globally via environment variable (Recommended)
Then use tools without specifying the API key:
"List my recent Opsgenie alerts"
"Create a high priority alert for database connection failure"
"Add a note to alert 12345 saying 'Investigating database connection issue'"
Option 2: Provide API key per tool (Backwards compatible)
"List alerts using API key genie-api-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
"Create alert with API key genie-api-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Option 3: Using hosted server (Users provide their own keys) Users configure their client with their API key, and all tools work seamlessly:
"List my recent Opsgenie alerts" (API key from client configuration)
"Create a new high priority alert" (API key from client configuration)
Security Best Practices
Never commit API keys to version control
Store API keys securely (use environment variables or secure vaults)
Rotate API keys periodically
Use API keys with minimal required permissions
Monitor API key usage in Opsgenie logs
Security
All requests use HTTPS when connecting to Opsgenie API
API keys should be stored securely and not exposed in logs
Rate limiting is handled by the Opsgenie API
Available Tools
opsgenie_list_alerts: List alerts from Opsgenie with filtering options
opsgenie_create_alert: Create a new alert in Opsgenie
opsgenie_acknowledge_alert: Acknowledge an existing alert
opsgenie_close_alert: Close an alert
opsgenie_list_alert_notes: List notes for a specific alert
opsgenie_add_note: Add a note to an alert
opsgenie_list_alert_logs: List activity logs for an alert
opsgenie_add_details: Add custom details/properties to an alert
All tools require an Opsgenie API key for authentication.
Integration with Cursor IDE
To use this MCP server with Cursor IDE, you can configure it locally or connect to a hosted instance:
Local Installation Configuration
Method 1: Using Environment Variable (Recommended)
Set your API key as an environment variable:
export OPSGENIE_API_KEY="your-api-key-here"Configure in Cursor settings:
{ "mcpServers": { "opsgenie-mcp-server": { "command": "npx", "args": ["-y", "opsgenie-mcp-server", "--transport", "stdio"], "env": { "OPSGENIE_API_KEY": "your-api-key-here" } } } }
Method 2: Using CLI Argument
Hosted Server Configuration
When connecting to a hosted MCP server (HTTP transport), you can provide your API key through various methods:
Option 1: Environment Variables
Option 2: Custom Headers
Option 3: Authorization Header
Option 4: Query Parameter
Configuration File Locations
macOS/Linux: ~/.cursor/mcp.json
Windows: %USERPROFILE%\.cursor\mcp.json
Verification
After configuration:
Restart Cursor IDE
The MCP server should appear in the MCP tab of Cursor Settings
You can verify it's working by asking Cursor's AI assistant to list Opsgenie alerts
Example prompts to test:
"List my recent Opsgenie alerts"
"Create a new alert in Opsgenie for database connection failure"
"Show me notes for alert ID 12345"
Deploying as a Hosted Service
You can deploy this MCP server as a hosted service to allow multiple users to connect with their own Opsgenie API keys:
Docker Deployment
Vercel Deployment
Create a vercel.json file:
Deploy:
Railway Deployment
Create a railway.toml file:
Client Configuration for Hosted Servers
Once deployed, users can connect to your hosted server by configuring their MCP client:
Claude Desktop Configuration:
Cursor IDE Configuration:
This approach allows you to host a single instance that multiple users can connect to, each with their own Opsgenie credentials.
Development
Built with TypeScript
Uses the official MCP SDK
Supports modern ES modules
Links
This server cannot be installed