home / mcp / opsgenie mcp server

Opsgenie MCP Server

A Model Context Protocol (MCP) server that provides comprehensive Opsgenie alert management capabilities.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "burakdirin-opsgenie-mcp-server": {
      "url": "http://localhost:3000/mcp",
      "headers": {
        "OPSGENIE_API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}

You can manage Opsgenie alerts directly through this MCP server, which provides complete alert workflows, notes, logs, and custom details via configurable transports. Use it to integrate Opsgenie into your workflows and automation pipelines with either a local (stdio) or web-ready (HTTP) transport.

How to use

You run the MCP server locally to expose Opsgenie capabilities to your MCP clients. You can choose a stdio transport for desktop integrations or an HTTP transport for web apps and hosted deployments. Both options require an Opsgenie API key, which you pass to the server to authenticate every operation.

How to install

Prerequisites you need before installing:
- Node.js (version 14+ recommended)
- npm (comes with Node.js) or npx
- A valid Opsgenie API key for authentication

Choose one of the installation paths below and follow the steps exactly.
# Option 1: Install globally from npm (recommended for general use)
npm install -g opsgenie-mcp-server

# Option 2: Install in a project (local dependency)
npm install opsgenie-mcp-server

# If you clone from source, follow the build steps below
git clone https://github.com/burakdirin/opsgenie-mcp-server.git
cd opsgenie-mcp-server
npm install
npm run build

Starting with stdio transport (local/desktop)

Use stdio when you want to run the MCP server directly in a desktop environment or via a simple local workflow. You provide the API key through an environment variable or via the command line.

# With environment variable (recommended):
export OPSGENIE_API_KEY="your-api-key-here"
npm run start:stdio

# Or explicitly via CLI argument (no env var):
node build/index.js --transport stdio --api-key "your-api-key-here"

Starting with HTTP transport (web/hosted)

Use HTTP transport to serve Opsgenie capabilities over HTTP for web apps or hosted deployments. The server can run on a custom port and accepts API keys in multiple ways.

# Basic HTTP server (API key provided per-request):
npm run start:http
# or
node build/index.js --transport http --port 3000

# With environment variable for the API key:
export OPSGENIE_API_KEY="your-api-key-here"
node build/index.js --transport http --port 3000

Authentication methods

Your Opsgenie API key is required for all operations. You can supply it by environment variable, per-request, or as a per-tool parameter in your MCP client. Common options include setting OPSGENIE_API_KEY in the environment, passing --api-key on startup, or including apiKey in tool calls.

Available tools

opsgenie_list_alerts

List alerts from Opsgenie and filter by criteria such as priority, status, or date.

opsgenie_create_alert

Create a new alert in Opsgenie with specified details such as message, description, priority, and responders.

opsgenie_acknowledge_alert

Acknowledge an existing alert to indicate you are taking action.

opsgenie_close_alert

Close an alert when the issue is resolved.

opsgenie_list_alert_notes

List notes associated with a specific alert to review context.

opsgenie_add_note

Add a note to an existing alert for collaboration and updates.

opsgenie_list_alert_logs

View activity logs for an alert to track changes and actions.

opsgenie_add_details

Attach custom details or properties to an alert for richer context.