OpManager MCP Server

OpManager MCP Server

Enables AI assistants to interact with ManageEngine OpManager for network monitoring and IT operations management. Provides credential-less access to 85+ API endpoints for managing devices, alarms, discovery, dashboards, and reports through natural language.

Category
访问服务器

README

OpManager MCP Server

Python 3.10+ License: MIT Tests MCP SDK

A credential-less Model Context Protocol (MCP) server for ManageEngine OpManager REST API integration. This server enables AI assistants like Claude to interact with your OpManager infrastructure through natural language.

✨ Key Features

  • 🔐 Credential-less Design: No hardcoded API keys - users provide host and apiKey per request
  • 🔄 SSL Auto-Detection: Port 8061 → HTTPS, Port 8060 → HTTP (with manual override)
  • 📡 85+ API Endpoints: Full OpManager API coverage for devices, alarms, dashboards, discovery, and more
  • 🛠 Dynamic Tool Generation: Automatically generates MCP tools from OpenAPI specification
  • 🌐 Multiple Transports: Supports stdio (Claude Desktop) and HTTP/SSE (n8n, web clients)
  • 🐳 Docker Ready: Containerized deployment with Docker and Docker Compose

🚀 Quick Start

Installation

# Clone the repository
git clone https://github.com/sachdev27/opmanager-mcp-server.git
cd opmanager-mcp-server

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install the package
pip install -e ".[http]"

Start the HTTP Server

uvicorn opmanager_mcp.http_server:app --host 0.0.0.0 --port 3000

Test a Tool Call

curl -X POST http://localhost:3000/call \
  -H "Content-Type: application/json" \
  -d '{
    "name": "opmanager_get_allDevices",
    "arguments": {
      "host": "opmanager.example.com",
      "apiKey": "your-api-key-here",
      "port": 8061
    }
  }'

📋 Configuration

Environment Variables

Create a .env file (optional - for server defaults only):

cp .env.example .env
Variable Description Default
MCP_SERVER_LOG_LEVEL Logging level INFO
ALLOWED_HTTP_METHODS Allowed HTTP methods for tools GET,POST,PUT,DELETE,PATCH
LOCAL_OPENAPI_SPEC_PATH Path to OpenAPI spec bundled openapi.json

Note: OPMANAGER_HOST and OPMANAGER_API_KEY are NOT configured server-side. Users provide these per-request for security.

Getting Your OpManager API Key

  1. Log in to OpManager web console
  2. Navigate to SettingsREST API
  3. Generate a new API key
  4. Use this key in your tool calls

🔧 Tool Parameters

Every tool accepts these connection parameters:

Parameter Required Description
host ✅ Yes OpManager server hostname
apiKey ✅ Yes API key for authentication
port No Server port (default: 8060)
use_ssl No Force SSL (auto-detected from port)
verify_ssl No Verify SSL certificates (default: true)

SSL Auto-Detection

  • Port 8061: Automatically uses HTTPS
  • Port 8060: Automatically uses HTTP
  • Override with use_ssl: true/false if needed

🌐 HTTP API Endpoints

Endpoint Method Description
/health GET Health check with tool count
/tools GET List all available tools
/sse GET SSE connection for MCP
/messages POST MCP message handler
/call POST Direct tool invocation

Health Check

curl http://localhost:3000/health
# {"status":"healthy","tool_count":60}

List Tools

curl http://localhost:3000/tools | jq '.tools[].name'

🤖 n8n Integration

  1. Start the HTTP server on port 3000
  2. In n8n, add an AI Agent node with MCP Client tool
  3. Configure the MCP Client:
    • SSE URL: http://localhost:3000/sse
    • Messages URL: http://localhost:3000/messages

Example System Prompt for n8n

You are an IT operations assistant with access to OpManager for network monitoring.

When using OpManager tools, always include:
- host: "opmanager.company.com"
- apiKey: "your-api-key"
- port: 8061 (for HTTPS)

Available operations:
- List all devices: opmanager_get_allDevices
- Get device details: opmanager_get_device (requires deviceName)
- List alarms: opmanager_get_alarms
- Acknowledge alarm: opmanager_add_alarmNotes

🖥 Claude Desktop Integration

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "opmanager": {
      "command": "python",
      "args": ["-m", "opmanager_mcp.main"],
      "cwd": "/path/to/opmanager-mcp-server",
      "env": {
        "LOCAL_OPENAPI_SPEC_PATH": "/path/to/opmanager-mcp-server/openapi.json"
      }
    }
  }
}

Note: With Claude Desktop, you'll tell Claude your OpManager host and API key in conversation, and it will include them in tool calls.

🛠 Available Tools (60+ GET operations)

Devices

  • opmanager_get_allDevices - List all monitored devices
  • opmanager_get_device - Get device details by name
  • opmanager_get_deviceAvailability - Device availability history

Alarms

  • opmanager_get_alarms - List alarms with filtering
  • opmanager_get_alarmDetails - Get alarm details
  • opmanager_add_alarmNotes - Add notes/acknowledge alarm

Discovery

  • opmanager_get_discoveryStatus - Check discovery progress
  • opmanager_add_discovery - Start network discovery

Reports & Dashboards

  • opmanager_get_allDashboards - List all dashboards
  • opmanager_get_scheduledReports - List scheduled reports

And more...

Run curl http://localhost:3000/tools to see all available tools.

🐳 Docker

Build and Run

docker build -t opmanager-mcp-server .
docker run -d -p 3000:3000 --name opmanager-mcp opmanager-mcp-server

Docker Compose

docker-compose up -d

🧪 Development

Run Tests

# Install dev dependencies
pip install -e ".[dev]"

# Run all tests
pytest

# Run with coverage
pytest --cov=opmanager_mcp --cov-report=term-missing

# Current: 32 tests, 50% coverage

Code Quality

# Format
black opmanager_mcp tests
isort opmanager_mcp tests

# Lint
ruff check opmanager_mcp tests

# Type check
mypy opmanager_mcp

Regenerate OpenAPI Spec

python generate_openapi.py

📁 Project Structure

opmanager-mcp-server/
├── opmanager_mcp/
│   ├── __init__.py          # Package exports
│   ├── api_client.py        # HTTP client for OpManager API
│   ├── config.py            # Configuration management
│   ├── exceptions.py        # Custom exceptions
│   ├── http_server.py       # HTTP/SSE server (Pure ASGI)
│   ├── logging_config.py    # Logging configuration
│   ├── main.py              # CLI entry point
│   ├── server.py            # MCP server implementation
│   └── tool_generator.py    # OpenAPI to MCP tool converter
├── tests/
│   ├── conftest.py          # Test fixtures
│   ├── test_api_client.py   # API client tests
│   ├── test_config.py       # Config tests
│   ├── test_http_server.py  # HTTP server tests
│   ├── test_server.py       # MCP server tests
│   └── test_tool_generator.py # Tool generation tests
├── openapi.json             # OpManager OpenAPI specification
├── pyproject.toml           # Project configuration
├── Dockerfile               # Container image
├── docker-compose.yml       # Compose configuration
└── README.md                # This file

📄 License

MIT License - see LICENSE for details.

🙏 Acknowledgments

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选