@quorum-us/opsgenie-mcp
v1.0.1
Published
MCP server for Opsgenie alert management with comprehensive filtering, custom queries, and AI-friendly interface
Readme
Opsgenie MCP Server
A comprehensive MCP server for Opsgenie alert management with AI assistants.
Quick Start
1. Install via NPM
npx @quorum-us/opsgenie-mcp2. Add to Augment
Add this to your Augment MCP configuration:
{
"mcpServers": {
"opsgenie": {
"command": "npx",
"args": ["-y", "@quorum-us/opsgenie-mcp"],
"env": {
"OPSGENIE_API_KEY": "your-opsgenie-api-key"
}
}
}
}3. Opsgenie Setup
Get your Opsgenie API key:
- Go to Opsgenie → Settings → API key management
- Create a new API key with appropriate permissions
- Set the environment variable:
export OPSGENIE_API_KEY=your_api_key_here
Available Tools
listAlerts_Opsgenie
List Opsgenie alerts with comprehensive filtering options.
Parameters:
limit(optional): Maximum number of alerts to return (1-100, default: 20)offset(optional): Number of alerts to skip for pagination (default: 0)status(optional): Filter by alert status - 'open', 'acknowledged', 'closed', 'all'priority(optional): Filter by priority - 'P1', 'P2', 'P3', 'P4', 'P5'message(optional): Filter alerts by message contentsource(optional): Filter alerts by sourceowner(optional): Filter alerts by ownertags(optional): Filter by tags (all tags must match)teams(optional): Filter by team namesquery(optional): Custom Opsgenie search query with full control (takes precedence over all other filters)searchIdentifier(optional): Identifier of saved search querysearchIdentifierType(optional): Type of search identifier ('id' or 'name')sort(optional): Field to sort alerts by (default: 'lastOccurredAt')order(optional): Sort order - 'asc' or 'desc' (default: 'desc')
getAlert_Opsgenie
Get details of a specific Opsgenie alert.
Parameters:
identifier(required): Alert identifier (ID or alias)
Usage Examples
Simple Status Filtering
{
"status": "open",
"priority": "P1",
"limit": 10
}Custom Query (AI Full Control)
{
"query": "status: open AND priority: (P1 OR P2) AND tag: production AND NOT tag: maintenance",
"sort": "lastOccurredAt",
"order": "desc",
"limit": 50
}Team and Message Filtering
{
"teams": ["backend", "devops"],
"message": "database",
"status": "open"
}Example Response
{
"content": [
{
"type": "text",
"text": "{\"data\":[{\"id\":\"alert-id\",\"tinyId\":\"123\",\"alias\":\"alert-alias\",\"message\":\"Database connection failed\",\"status\":\"open\",\"acknowledged\":false,\"priority\":{\"id\":\"P1\",\"name\":\"P1\"},\"source\":\"monitoring\",\"owner\":\"john.doe\",\"tags\":[\"production\",\"database\"],\"createdAt\":\"2024-01-15T10:30:00Z\",\"lastOccurredAt\":\"2024-01-15T10:30:00Z\"}],\"took\":0.5,\"requestId\":\"req-123\"}"
}
]
}Advanced Query Syntax
The query parameter supports full Opsgenie search syntax:
Operators
AND- Both conditions must be trueOR- Either condition must be trueNOT- Condition must be false()- Group conditions
Examples
"status: open AND priority: P1""message: database* AND teams: backend""tag: production AND source: monitoring AND (priority: P1 OR priority: P2)""createdAt > 2024-01-01 AND status: open"
See QUERY_EXAMPLES.md for more examples.
Publishing to NPM
For Developers
Login to NPM (first time only):
npm loginUpdate version:
npm version patch # for bug fixes npm version minor # for new features npm version major # for breaking changesBuild and publish:
npm run build npm publish --access publicTest the published package:
npx @quorum-us/opsgenie-mcp
Publishing Checklist
- [ ] Update version in package.json
- [ ] Update README if needed
- [ ] Build passes (
npm run build) - [ ] Test locally
- [ ] Publish to NPM
- [ ] Test published package with
npx
Development Setup
git clone <repository>
cd opsgenie-mcp
npm install
npm run buildLicense
Proprietary - All rights reserved by Quorum US
