opsgenie-mcp-extended
v0.1.0
Published
A Model Context Protocol (MCP) server for Opsgenie: alerts, on-call schedules, overrides, teams, escalations, incidents, and maintenance windows.
Maintainers
Readme
Opsgenie MCP Server
A Model Context Protocol (MCP) server for Opsgenie covering alerts, on-call schedules and overrides, teams, escalation policies, incidents, and maintenance windows.
Features
- Alerts: list, create, acknowledge, close, snooze, assign, add notes/details, view logs
- On-call schedules: list schedules, view rotations, see who's on call right now (or at any point in time)
- On-call overrides: create, update, and delete temporary coverage swaps without touching the underlying rotation
- Rotations: update participants, timing, and type on a schedule's rotations
- Teams & users: look up teams and users to resolve responders and schedule ownership
- Escalation policies: list and inspect escalation rule chains
- Incidents: list, create, and close (distinct from alerts — used for larger/customer-facing events)
- Maintenance windows: list and create windows that suppress alerts from selected integrations/policies
- Stdio and HTTP (Streamable HTTP + SSE-compatible) transports
- Built with TypeScript and the official MCP SDK
Installation
From npm
npm install -g opsgenie-mcp-extended
# or run directly without installing
npx opsgenie-mcp-extended --transport stdio --api-key "your-api-key-here"From source
npm install
npm run buildUsage
Stdio transport (for desktop MCP clients)
export OPSGENIE_API_KEY="your-api-key-here"
npm run start:stdio
# or
node build/index.js --transport stdioOr pass the key as a CLI argument:
node build/index.js --transport stdio --api-key "your-api-key-here"HTTP transport (for hosted/multi-client deployment)
npm run start:http
# or
node build/index.js --transport http --port 3000Clients can supply their API key via, in order of precedence:
X-Opsgenie-API-KeyheaderAuthorization: Bearer <key>header?apiKey=<key>query parameterOPSGENIE_API_KEYenvironment variable
Endpoint: POST http://localhost:3000/mcp
Command line options
opsgenie-mcp-extended [options]
Options:
-V, --version output the version number
-t, --transport <type> transport type (stdio|http) (default: "stdio")
-p, --port <number> port number for HTTP transport (default: "3000")
-a, --api-key <key> Opsgenie API key (can also use OPSGENIE_API_KEY env var)
-h, --help display help for commandAuthentication
Get an API key from Opsgenie: Settings → API Key Management → Create API Key, granting Alert (Read/Create/Update/Delete), Configuration Access (Read/Create/Update/Delete), and Incident (Read/Create/Update/Delete) permissions as needed for the tools you plan to use.
Provide the key via OPSGENIE_API_KEY, the --api-key CLI flag, or per-call as the apiKey tool argument — whichever fits your setup.
Available tools
Alerts: opsgenie_list_alerts, opsgenie_create_alert, opsgenie_acknowledge_alert, opsgenie_close_alert, opsgenie_snooze_alert, opsgenie_assign_alert, opsgenie_list_alert_notes, opsgenie_add_note, opsgenie_list_alert_logs, opsgenie_add_details
Schedules & on-call: opsgenie_list_schedules, opsgenie_get_schedule, opsgenie_get_on_calls, opsgenie_list_schedule_rotations, opsgenie_update_schedule_rotation, opsgenie_list_schedule_overrides, opsgenie_get_schedule_override, opsgenie_create_schedule_override, opsgenie_update_schedule_override, opsgenie_delete_schedule_override
Teams & users: opsgenie_list_teams, opsgenie_get_team, opsgenie_list_users
Escalations: opsgenie_list_escalations, opsgenie_get_escalation
Incidents: opsgenie_list_incidents, opsgenie_create_incident, opsgenie_close_incident
Maintenance: opsgenie_list_maintenance, opsgenie_create_maintenance
Swapping on-call coverage
The practical way to change who's on call for a window of time is an override — it doesn't touch the recurring rotation:
"Create an override on the 'Platform' schedule so Priya covers from tonight 6pm to tomorrow 8am"
For permanent changes to a rotation's participants or cadence, use opsgenie_update_schedule_rotation instead.
Project layout
src/
cli/index.ts CLI argument parsing and entry point
server/setup.ts MCP server construction + tool registration
opsgenie/api.ts Thin fetch-based client for the Opsgenie REST API
opsgenie/tools.ts Zod schemas + MCP tool registrations
opsgenie/types.ts Shared response type shapes
transports/stdio.ts Stdio transport wiring
transports/http.ts HTTP (Streamable HTTP) transport wiringDevelopment
npm run type-check # tsc --noEmit
npm run lint # eslint
npm run format # prettier --write
npm run build # lint + tscRoadmap / ideas not yet implemented
- Bulk alert actions (multi-alert ack/close/assign in one call)
- Alert attachments
- Webhook/integration management endpoints
- Reporting & analytics endpoints
License
MIT
