Skip to main content
Glama
OPS MCP Server
by Heht571

ops-mcp-server

中文

ops-mcp-server: an AI-driven IT operations platform that fuses LLMs and MCP architecture to enable intelligent monitoring, anomaly detection, and natural human-infrastructure interaction with enterprise-grade security and scalability.


📖 Table of Contents


Related MCP server: mcp-ssh-gateway

🚀 Project Overview

ops-mcp-server is an IT operations management solution for the AI era. It achieves intelligent IT operations through the seamless integration of the Model Context Protocol (MCP) and Large Language Models (LLMs). By leveraging the power of LLMs and MCP's distributed architecture, it transforms traditional IT operations into an AI-driven experience, enabling automated server monitoring, intelligent anomaly detection, and context-aware troubleshooting. The system acts as a bridge between human operators and complex IT infrastructure, providing natural language interaction for tasks ranging from routine maintenance to complex problem diagnosis, while maintaining enterprise-grade security and scalability.


🌟 Key Features

🖥️ Server Monitoring

  • Real-time CPU, memory, disk inspections.

  • System load and process monitoring.

  • Service and network interface checks.

  • Log analysis and configuration backup.

  • Security vulnerability scans (SSH login, firewall status).

  • Detailed OS information retrieval.

📦 Container Management (Docker)

  • Container, image, and volume management.

  • Container resource usage monitoring.

  • Log retrieval and health checks.

🌐 Network Device Management

  • Multi-vendor support (Cisco, Huawei, H3C).

  • Switch port, VLAN, and router route checks.

  • ACL security configuration analysis.

  • Optical module and device performance monitoring.

➕ Additional Capabilities

  • Extensible plugin architecture.

  • Batch operations across multiple devices.

  • Tool listing and descriptive commands.


🎬 Demo Videos

📌 Project Demo

On Cherry Studio

Demo Animation

📌 Interactive Client Demo

On Terminal

Client Demo Animation


⚙️ Installation

Ensure you have Python 3.10+ installed. This project uses uv for dependency and environment management.

1. Install UV

curl -LsSf https://astral.sh/uv/install.sh | sh

2. Set Up Virtual Environment

uv venv .venv

# Activate the environment
source .venv/bin/activate      # Linux/macOS
.\.venv\Scripts\activate       # Windows

3. Install Dependencies

uv pip install -r requirements.txt

Dependencies are managed via pyproject.toml.


🚧 Deployment

📡 SSE Remote Deployment (UV)

cd server_monitor_sse

# Install dependencies
pip install -r requirements.txt

# Start service
cd ..
uv run server_monitor_sse --transport sse --port 8000

🐳 SSE Remote Deployment (Docker Compose)

Ensure Docker and Docker Compose are installed.

cd server_monitor_sse
docker compose up -d

# Check status
docker compose ps

# Logs monitoring
docker compose logs -f

🛠️ Local MCP Server Configuration (Stdio)

Add this configuration to your MCP settings:

{
  "ops-mcp-server": {
    "command": "uv",
    "args": [
      "--directory", "YOUR_PROJECT_PATH_HERE",
      "run", "server_monitor.py"
    ],
    "env": {},
    "disabled": true,
    "autoApprove": ["list_available_tools"]
  },
  "network_tools": {
    "command": "uv",
    "args": [
      "--directory", "YOUR_PROJECT_PATH_HERE",
      "run", "network_tools.py"
    ],
    "env": {},
    "disabled": false,
    "autoApprove": []
  },
}

Note: Replace YOUR_PROJECT_PATH_HERE with your project's actual path.


💬 Interactive Client Usage

An interactive client (client.py) allows you to interact with MCP services using natural language.

1. Install Client Dependencies

uv pip install openai rich

2. Configure Client

Edit these configurations within client.py:

# Initialize OpenAI client
self.client = AsyncOpenAI(
    base_url="https://your-api-endpoint",
    api_key="YOUR_API_KEY"
)

# Set model
self.model = "your-preferred-model"

3. Run the Client

uv run client.py [path/to/server.py]

Example:

uv run client.py ./server_monitor.py

Client Commands

  • help - Display help.

  • quit - Exit client.

  • clear - Clear conversation history.

  • model <name> - Switch models.


📄 License

This project is licensed under the MIT License.


📌 Notes

  • Ensure remote SSH access is properly configured.

  • Adjust tool parameters based on actual deployment conditions.

  • This project is under active development; feedback and contributions are welcome.


Available Tools

19 tools
analyze_logsC

分析服务器日志文件中的错误和警告

Inputs: hostname (required), username (required), password, port, +4 more.

backup_critical_filesC

备份重要系统配置文件

Inputs: hostname (required), username (required), password, port, +3 more.

check_docker_healthC

检查Docker服务的健康状态和基本信息

Inputs: hostname (required), username (required), password, port, +1 more.

check_firewall_configC

检查防火墙配置和开放端口

Inputs: hostname (required), username (required), password, port, +1 more.

check_service_statusC

检查指定服务的运行状态

Inputs: hostname (required), username (required), password, port, +2 more.

check_ssh_risk_loginsC

检查SSH登录风险,包括失败尝试和可疑IP

Inputs: hostname (required), username (required), password, port, +3 more.

get_container_logsC

获取指定容器的日志

Inputs: hostname (required), username (required), password, port, +4 more.

get_memory_infoB

获取本地服务器内存信息

Inputs: no named parameters.

get_os_detailsD

获取操作系统详细信息

Inputs: hostname (required), username (required), password, port, +1 more.

get_system_loadC

获取系统负载信息

Inputs: hostname (required), username (required), password, port, +1 more.

inspect_networkC

检查网络接口和连接状态

Inputs: hostname (required), username (required), password, port, +1 more.

_list_available_toolsD

Inputs: no named parameters.

list_docker_containersC

列出Docker容器及其信息

Inputs: hostname (required), username (required), password, port, +2 more.

list_docker_imagesD

列出Docker镜像

Inputs: hostname (required), username (required), password, port, +1 more.

list_docker_volumesC

列出Docker卷

Inputs: hostname (required), username (required), password, port, +1 more.

monitor_container_statsC

监控容器的资源使用情况

Inputs: hostname (required), username (required), password, port, +2 more.

monitor_processesC

监控远程服务器进程,返回占用资源最多的进程

Inputs: hostname (required), username (required), password, port, +3 more.

remote_server_inspectionC

执行远程服务器巡检

Inputs: hostname (required), username (required), password, port, +3 more.

security_vulnerability_scanC

执行基础安全漏洞扫描

Inputs: hostname (required), username (required), password, port, +2 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.5/5.0

    Scored across 19 tools

    Disambiguation4/5

    Most tools have distinct purposes, with clear separation between monitoring (e.g., get_system_load, monitor_processes), Docker operations (e.g., list_docker_containers, check_docker_health), and security tasks (e.g., security_vulnerability_scan, check_ssh_risk_logins). However, some overlap exists between analyze_logs and get_container_logs, as both involve log analysis, which could cause minor confusion.

    Naming Consistency4/5

    The naming follows a consistent verb_noun pattern in snake_case for most tools (e.g., check_service_status, get_memory_info), making them predictable and readable. The only deviation is _list_available_tools, which uses an underscore prefix and is less descriptive, but this is a minor inconsistency in an otherwise uniform set.

    Tool Count4/5

    With 19 tools, the count is slightly high but reasonable for an operations server covering monitoring, Docker, and security. It avoids being overwhelming (e.g., not 25+ tools) and provides comprehensive coverage without excessive redundancy, though it could be streamlined by merging some overlapping functions.

    Completeness4/5

    The tool set offers good coverage for server operations, including monitoring (e.g., get_system_load), Docker management (e.g., list_docker_containers), and security (e.g., security_vulnerability_scan). Minor gaps exist, such as lack of tools for updating configurations or handling backups beyond critical files, but agents can work around these with existing tools.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers