Sentinel MCP Server

Sentinel MCP Server

Enables autonomous infrastructure health management by exposing tools for retrieving system logs, querying a knowledge base, executing SQL analytics, and simulating system commands, all integrated into an AI-driven incident response workflow.

Category
访问服务器

README

Sentinel - Autonomous System Health Guardian

An autonomous AI-powered infrastructure monitoring system that leverages multi-agent collaboration, Retrieval-Augmented Generation (RAG), Natural Language to SQL (NL2SQL), LangGraph orchestration, and the Model Context Protocol (MCP) to detect, diagnose, remediate, and analyze system incidents.


Overview

Modern IT environments generate massive volumes of logs, alerts, and operational data. During incidents, engineers often need to correlate logs, consult runbooks, query monitoring databases, and determine appropriate recovery actions under time pressure.

Sentinel demonstrates how autonomous AI agents can collaborate to streamline this workflow.

Instead of relying on a single large language model, Sentinel distributes responsibilities across specialized agents. Each agent focuses on a specific task—monitoring, diagnosis, remediation, or infrastructure analytics—while CrewAI coordinates collaboration and LangGraph manages the overall incident response workflow.

The project combines modern AI engineering techniques including Retrieval-Augmented Generation (RAG), Natural Language to SQL (NL2SQL), Model Context Protocol (MCP), and LangSmith observability into a unified autonomous operations platform.


Features

  • Multi-agent architecture built with CrewAI
  • Autonomous infrastructure monitoring
  • Retrieval-Augmented Generation (RAG) using ChromaDB
  • Natural Language to SQL (NL2SQL) analytics
  • SQLite-backed infrastructure database
  • LangGraph orchestration with verification and retry logic
  • MCP Server exposing infrastructure tools
  • LangSmith tracing and observability
  • Safety guardrails for simulated remediation
  • Structured outputs using Pydantic models

System Architecture

Sentinel consists of four specialized AI agents working together to automate the incident response lifecycle.

<img width="1536" height="655" alt="Sentinel_Agent_Hierarchy" src="https://github.com/user-attachments/assets/e9decc0e-659a-411f-ad52-15bd74126ff7" />


AI Agents

Monitor Agent

The Monitor Agent continuously analyzes infrastructure logs to identify abnormal system behaviour.

Responsibilities

  • Retrieve recent system logs
  • Detect critical incidents
  • Produce structured incident summaries

Diagnostician Agent

The Diagnostician Agent determines the most probable root cause of an incident using Retrieval-Augmented Generation.

Rather than relying solely on model knowledge, the agent retrieves relevant operational procedures from the Sentinel Operations Runbook before generating a diagnosis. This grounding process improves factual consistency and reduces hallucinations.


Remediation Agent

The Remediation Agent proposes recovery actions based on the diagnosis.

Generated recommendations are passed to the verification stage before the workflow is considered complete.


Data Intelligence Agent

The Data Intelligence Agent enables engineers to query operational data using natural language.

Example:

Which server has the most ERROR logs?

The agent converts the request into SQL, executes it against the infrastructure database, and returns a grounded response.


Workflow

CrewAI coordinates collaboration between specialized agents, while LangGraph manages workflow execution and recovery.

Monitor
   │
   ▼
Diagnose
   │
   ▼
Remediate
   │
   ▼
Verify
   │
   ▼  
 ┌─┴─────────────┐
 │               │
 ▼               ▼
END        Retry Diagnosis

If verification fails, LangGraph automatically routes execution back to the Diagnostician Agent for another remediation cycle.


Retrieval-Augmented Generation (RAG)

The Diagnostician Agent uses ChromaDB as an enterprise knowledge base.

Workflow:

Incident
    │
    ▼
Vector Search
    │
    ▼
Relevant Runbook Sections
    │
    ▼
Grounded Diagnosis

This approach enables responses to be based on retrieved operational documentation rather than solely on the language model's internal knowledge.


Natural Language to SQL (NL2SQL)

The Data Intelligence Agent converts natural language into executable SQL queries.

Example:

Question

Which server has the most ERROR logs?

Generated SQL

SELECT l.server_id,
       s.hostname,
       COUNT(*) AS error_log_count
FROM logs AS l
LEFT JOIN servers AS s
ON l.server_id = s.server_id
WHERE l.log_level = 'ERROR'
GROUP BY l.server_id, s.hostname
ORDER BY error_log_count DESC
LIMIT 1;

This enables infrastructure analytics without requiring engineers to write SQL manually.


Model Context Protocol (MCP)

Sentinel implements an MCP server as the unified interface between AI agents and infrastructure resources.

Available tools include:

  • get_system_logs()
  • query_knowledge_base()
  • query_database()
  • execute_system_command()

This separation improves modularity and provides a standardized interface for agent-tool interactions.


Safety Guardrails

To demonstrate safe autonomous remediation, Sentinel simulates command execution.

High-risk commands are automatically blocked whenever the infrastructure is under critical database load.

Examples include:

  • reboot
  • shutdown
  • rm -rf

No real infrastructure modifications are performed.


Observability

LangSmith provides end-to-end tracing of:

  • Agent execution
  • Tool invocation
  • Retrieval events
  • SQL generation
  • LLM interactions
  • Workflow execution

This makes the complete decision-making process transparent and simplifies debugging.


Technology Stack

Category Technologies
Language Python 3.12
Multi-Agent Framework CrewAI
Workflow LangGraph
LLM OpenAI GPT-5.5
RAG LangChain + ChromaDB
Database SQLite
Observability LangSmith
Protocol FastMCP
Validation Pydantic

Project Structure

src/sentinel
├── config
├── flows
├── models
├── services
├── tools
├── crew.py
├── mcp_server.py
└── main.py

Current Limitations

  • Uses simulated infrastructure instead of live production systems.
  • Verification logic is rule-based rather than driven by real monitoring telemetry.
  • SQLite is used for demonstration purposes instead of enterprise monitoring platforms.
  • Remediation actions are intentionally non-destructive.

Screenshots

<img width="2940" height="4208" alt="screencapture-smith-langchain-o-e34996d4-d5ca-413c-9dee-b331fec67794-projects-p-dd1a047b-ebd6-4b67-b758-b8126598eb03-2026-08-08-00_14_39" src="https://github.com/user-attachments/assets/5daa3bb9-d105-4b80-9813-4149a8d19784" /> <img width="2940" height="3700" alt="screencapture-smith-langchain-o-e34996d4-d5ca-413c-9dee-b331fec67794-projects-p-dd1a047b-ebd6-4b67-b758-b8126598eb03-2026-08-08-00_15_49" src="https://github.com/user-attachments/assets/c90d6a62-acb8-4a41-8082-90b37f1a4db2" />


Author

Iram Ishtiaq

Master of Computer Science (Artificial Intelligence)

Python • Agentic AI • Multi-Agent Systems • RAG • LangGraph • CrewAI • Machine Learning


Acknowledgements

This project was developed as part of an assignment.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选