incident-triage
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@incident-triageWhy is messaging-service failing?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Incident Triage MCP Server
An AI-assisted Incident Triage MCP Server that helps engineers investigate service incidents using semantic log search, error aggregation, RAG-based diagnosis, and runbook recommendations.
The project demonstrates how Model Context Protocol (MCP) can be applied to a real-world operational engineering workflow rather than a generic chatbot.
The server operates against synthetic messaging/CPaaS service logs and exposes four MCP tools that can be invoked from an MCP client or directly from the terminal using the FastMCP CLI.
๐ What This Project Does
Instead of manually searching through hundreds of log lines, an engineer can ask questions such as:
Why is messaging-service failing?
Find logs related to queue backlog.
What's the runbook for a connection timeout?
What is the likely root cause of the messaging-service incident?The MCP server converts these requests into structured tool calls against the incident data.
The important distinction is that the system does not ask an LLM to guess from nothing.
It combines:
Deterministic log processing
Semantic search
Structured error aggregation
Retrieval-Augmented Generation (RAG)
LLM-based incident analysis
Semantic runbook matching
๐๏ธ Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MCP Client โ
โ โ
โ Claude / FastMCP CLI โ
โโโโโโโโโโโโโโฌโโโโโโโโโโโโโ
โ
โ MCP / stdio
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Incident Triage โ
โ MCP Server โ
โ server.py โ
โโโโโโโโโโโโโโฌโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ โ
โผ โผ โผ
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
โ Log Search โ โ Error โ โ Runbook โ
โ โ โ Summary โ โ Search โ
โ Embeddings โ โ Plain Code โ โ Embeddings โ
โโโโโโโโฌโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโฌโโโโโโโโ
โ โ
โผ โผ
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
โ logs.jsonl โ โrunbooks.json โ
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโ
โ Incident โ
โ Diagnosis โ
โ โ
โ Retrieve Logs โ
โ โ โ
โ Anthropic LLM โ
โ โ โ
โ Root Cause + โ
โ Next Steps โ
โโโโโโโโโโโโโโโโโโโ๐ง MCP Tools
The server exposes four tools.
Related MCP server: MCP Splunk
1. search_logs
Performs semantic search over service logs using sentence-transformers.
Example:
fastmcp call server.py search_logs query="queue backlog"The query is converted into an embedding and compared with log embeddings.
This allows queries such as:
queue is stuckto find logs containing concepts such as:
consumer lag
queue backlogwithout depending entirely on exact keyword matching.
2. get_error_summary
Provides a deterministic aggregation of errors.
Example:
fastmcp call server.py get_error_summaryExample result:
Error summary:
db_deadlock: 38
rate_limit_exceeded: 37
queue_backlog: 37
auth_token_expired: 32
connection_timeout: 24No LLM is involved here.
This is intentional.
Simple counting does not require AI.
3. diagnose_incident
Performs RAG-based incident diagnosis.
Example:
fastmcp call server.py diagnose_incident \
service="messaging-service" \
hours=24The flow is:
Service
โ
โผ
Retrieve recent errors
โ
โผ
Build incident context
โ
โผ
Send context to Anthropic
โ
โผ
Root cause hypothesis
โ
โผ
Immediate next stepsThe LLM receives retrieved incident evidence rather than being asked to diagnose the problem without context.
If ANTHROPIC_API_KEY is not available, the POC falls back to a raw error-frequency summary.
4. suggest_runbook
Uses semantic similarity to find the most relevant operational runbooks.
Example:
fastmcp call server.py suggest_runbook \
query="connection to provider keeps timing out"Example:
Downstream Connection Timeout
Provider Auth Token Expired
Provider Rate LimitingThis allows engineers to describe an incident naturally instead of remembering the exact runbook title.
๐ง AI vs Traditional Logic
One of the goals of this POC is to demonstrate that not everything needs an LLM.
Capability | Approach | Why |
| Embeddings | Semantic matching |
| Python aggregation | No AI required |
| RAG + Anthropic | Converts evidence into a diagnosis |
| Embeddings | Handles different incident phrasing |
This creates a practical hybrid architecture:
Incident Triage
โ
โโโโโโโโโโโโโโผโโโโโโโโโโโโโ
โ โ โ
Deterministic Semantic LLM
Logic Retrieval Reasoning
โ โ โ
Aggregation Embeddings RAG๐ Project Structure
incident-mcp/
โ
โโโ server.py
โโโ requirements.txt
โโโ README.md
โโโ .gitignore
โ
โโโ data/
โโโ generate_logs.py
โโโ runbooks.jsonlogs.jsonl is generated locally and should not be committed to Git.
๐ ๏ธ Technology Stack
Python 3.12
FastMCP
Model Context Protocol
Sentence Transformers
all-MiniLM-L6-v2PyTorch
NumPy
SciPy
Anthropic API
python-dotenv
JSONL
Synthetic operational logs
โ๏ธ Local Setup
1. Clone the repository
git clone git@github.com:balachoudry-tech/incident_mcp_ai.git
cd incident_mcp_ai2. Create a virtual environment
Python 3.12 is recommended.
python3.12 -m venv .venvActivate it:
macOS / Linux
source .venv/bin/activateWindows
.venv\Scripts\activate3. Install dependencies
pip install -r requirements.txtThe dependency versions are pinned to the versions used by the working POC environment.
๐ Generate Synthetic Logs
Generate the incident data:
python data/generate_logs.pyThis creates:
data/logs.jsonlThe generated logs simulate operational failures across messaging/CPaaS services.
๐ Configure Anthropic
Create a .env file in the project root:
ANTHROPIC_API_KEY=your_api_key_hereThe .env file is intentionally excluded from Git.
The application loads the key using python-dotenv.
Never commit your API key.
โถ๏ธ Run the MCP Server
The server uses stdio transport.
python server.pyWhen started directly, the server waits for an MCP client.
You may see:
Starting MCP server 'incident-triage'
with transport 'stdio'This is expected.
The server is not a traditional HTTP API.
๐งช Test from Terminal
The POC can be tested without Claude Desktop using the FastMCP CLI.
List available tools
fastmcp list server.pyExpected tools:
search_logs
get_error_summary
diagnose_incident
suggest_runbookTest error summary
fastmcp call server.py get_error_summaryTest semantic search
fastmcp call server.py search_logs \
query="queue backlog"You can also specify the number of results:
fastmcp call server.py search_logs \
query="queue backlog" \
top_k=5Test runbook search
fastmcp call server.py suggest_runbook \
query="connection to provider keeps timing out"Test incident diagnosis
fastmcp call server.py diagnose_incident \
service="messaging-service" \
hours=24With ANTHROPIC_API_KEY configured, this executes the RAG + Anthropic diagnosis flow.
๐ Incident Diagnosis Flow
A typical diagnosis follows this flow:
1. Engineer asks about a service
โ
โผ
2. Retrieve recent service errors
โ
โผ
3. Build incident context
โ
โผ
4. Send relevant context to LLM
โ
โผ
5. LLM analyzes relationships
โ
โผ
6. Generate root-cause hypothesis
โ
โผ
7. Recommend immediate next stepsFor example:
Carrier timeout
โ
โผ
Delivery retries
โ
โผ
Rate limiting
โ
โผ
Retry contention
โ
โผ
Database deadlocks
โ
โผ
Queue backlogThe LLM can use these correlated signals to produce a higher-level incident hypothesis.
๐ฆ Why No Vector Database?
This POC intentionally does not use a vector database.
The log dataset is small enough that embeddings can be:
Loaded
โ
Computed
โ
Stored in memory
โ
Compared using similarityFor a small proof of concept, this keeps the architecture simple.
A persistent vector index would become useful as the dataset grows.
๐ Security Notes
This is a proof of concept.
The following production concerns are intentionally outside the scope:
Authentication
Authorization
Multi-tenancy
Secret management
Tool-level permissions
Audit logging
Production observability
Persistent vector storage
Real log ingestion
Production-grade error handling
API keys should never be committed to the repository.
๐ Production Evolution
The POC can later evolve toward:
โโโโโโโโโโโโโโโโโโโโโโโโ
โ Real Log Sources โ
โ โ
โ CloudWatch โ
โ Elasticsearch โ
โ Loki โ
โ OpenSearch โ
โโโโโโโโโโโโฌโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโ
โ Log Processing โ
โโโโโโโโโโโโฌโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโ
โ Persistent Vector DB โ
โโโโโโโโโโโโฌโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโ
โ MCP Server โ
โ โ
โ Search โ
โ Summarize โ
โ Diagnose โ
โ Runbooks โ
โโโโโโโโโโโโฌโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโ
โ MCP Client โ
โ / Incident Platform โ
โโโโโโโโโโโโโโโโโโโโโโโโPotential future improvements include:
Real production log sources
Persistent vector indexes
Authentication and authorization
Tool-level access control
Structured tracing
Incident correlation IDs
Confidence scoring
Better "insufficient evidence" handling
Audit trails
Production observability
Multi-service incident correlation
๐ฏ What This POC Demonstrates
This project demonstrates several practical AI engineering patterns:
MCP
Building operational capabilities as reusable MCP tools.
Semantic Search
Using embeddings to search logs based on meaning rather than exact keywords.
RAG
Retrieving relevant operational evidence before asking an LLM to reason about an incident.
Tool Selection
Using deterministic code where deterministic code is sufficient and AI where reasoning provides additional value.
Operational AI
Applying GenAI to an engineering workflow where the output is grounded in actual incident evidence.
โ ๏ธ Disclaimer
The logs and incidents in this repository are synthetic and are intended only for demonstration and learning purposes.
The diagnosis generated by the LLM should not be treated as an authoritative production incident response.
๐ License
Add the project's license here if/when one is selected.
Author
Built as an engineering-focused MCP/RAG POC demonstrating AI-assisted incident triage for high-throughput messaging/CPaaS systems.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceAn MCP server for intelligent log analysis providing semantic search, error pattern clustering, and smart error detection. It enables users to process, vectorize, and query local logs to efficiently identify issues and generate AI-powered summaries.MIT
- Flicense-qualityDmaintenanceA security-focused MCP server that enables automated log retrieval and threat analysis using LangGraph orchestration and RAG. It allows users to detect suspicious activity and generate structured security insights by integrating LLM reasoning with log data and runbook documentation.
- Alicense-qualityCmaintenanceA multi-agent MCP server that turns LLMs into an autonomous incident-response copilot, enabling rapid investigation, correlation, and remediation of production incidents.MIT
- Flicense-qualityCmaintenanceAn AI-native incident response server that exposes diagnostic tools (system status, error logs, ticket creation) via MCP, enabling LLM agents to autonomously assess and respond to incidents.
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
An MCP server for Arcjet - the runtime security platform that ships with your AI code.
MCP server for generating rough-draft project plans from natural-language prompts.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/balachoudry-tech/incident_mcp_ai'
If you have feedback or need assistance with the MCP directory API, please join our Discord server