opennms-mcp

opennms-mcp

Connects Claude to OpenNMS, allowing plain language interaction with alarms, nodes, events, asset records, categories, and service collection.

Category
访问服务器

README

opennms-mcp

An MCP (Model Context Protocol) server that connects Claude to OpenNMS. Ask Claude to list alarms, inspect nodes, send events, update asset records, manage categories, and control service collection — all in plain language.

Prerequisites

  • Node.js 22+
  • An OpenNMS instance reachable over HTTP/HTTPS
  • A user account with API access (admin or a read/write role)

Installation

git clone https://github.com/c-perronnet/opennms-mcp.git
cd opennms-mcp
npm install
npm run build

Configuration

Create a JSON file with your OpenNMS credentials. Two auth formats are supported:

Basic auth (opennms/myserver.json):

{
  "url": "https://opennms.example.com",
  "username": "admin",
  "password": "secret"
}

Token auth (opennms/myserver.json):

{
  "url": "https://opennms.example.com",
  "token": "your-api-token"
}

Add "insecure": true to either format to skip TLS certificate validation (useful for self-signed certs).

Store config files in the opennms/ directory — it is git-ignored so credentials are never committed.

Connecting to Claude Desktop

Add the server to your claude_desktop_config.json:

{
  "mcpServers": {
    "opennms": {
      "command": "node",
      "args": ["/absolute/path/to/opennms-mcp/dist/index.js"],
      "env": {
        "OPENNMS_CONFIG": "/absolute/path/to/opennms-mcp/opennms/myserver.json"
      }
    }
  }
}

Alternatively, pass the config path as a positional argument:

{
  "mcpServers": {
    "opennms": {
      "command": "node",
      "args": [
        "/absolute/path/to/opennms-mcp/dist/index.js",
        "/absolute/path/to/opennms-mcp/opennms/myserver.json"
      ]
    }
  }
}

Connecting to Claude Code

Claude Code reads MCP server config from ~/.claude/claude_mcp_settings.json. Add the server there:

{
  "mcpServers": {
    "opennms": {
      "command": "node",
      "args": ["/absolute/path/to/opennms-mcp/dist/index.js"],
      "env": {
        "OPENNMS_CONFIG": "/absolute/path/to/opennms-mcp/opennms/myserver.json"
      }
    }
  }
}

Or configure it via the CLI:

claude mcp add opennms \
  -e OPENNMS_CONFIG=/absolute/path/to/opennms-mcp/opennms/myserver.json \
  -- node /absolute/path/to/opennms-mcp/dist/index.js

Verify the server is loaded with /mcp in the Claude Code prompt. The tools listed below will then be available in any conversation.

Available tools

Connectivity

Tool Description
server_info Verify connectivity and return OpenNMS version

Alarms

Tool Description
list_alarms List alarms, optionally filtered by FIQL expression
get_alarm Get full details for an alarm by ID
acknowledge_alarm Acknowledge an alarm
modify_alarm Unacknowledge, clear, or escalate an alarm

Nodes

Tool Description
list_nodes List nodes, optionally filtered by FIQL expression
get_node Get full node details (accepts numeric ID or foreignSource:foreignId)
get_node_ip_interfaces List IP interfaces for a node
get_node_snmp_interfaces List SNMP interfaces for a node
get_node_outages List outages for a node
rescan_node Trigger a capability rescan for a node

Events

Tool Description
list_events List events, optionally filtered by FIQL expression
get_event Get full details for an event by ID
send_event Send a custom event to the OpenNMS event bus

Asset records

Tool Description
get_node_asset_record Get the asset record for a node
update_node_asset_record Update one or more asset fields for a node

Categories

Tool Description
list_categories List all categories defined in OpenNMS
get_node_categories List categories assigned to a node
add_category_to_node Assign a category to a node
remove_category_from_node Remove a category from a node

Collection / polling

Tool Description
list_node_services List monitored services on a node's IP interface
enable_service_collection Enable collection for a service (set to Active)
disable_service_collection Disable collection for a service (set to Forced Unmanaged)

FIQL filtering

Several list tools accept a filter parameter using FIQL syntax:

Operator Meaning
== equals
!= not equals
=lt= less than
=gt= greater than
; AND
, OR

Examples:

  • severity==CRITICAL — critical alarms only
  • node.label==web* — nodes whose label starts with "web"
  • severity==MAJOR,severity==CRITICAL — major or critical alarms
  • category.name==Routers — nodes in the Routers category

Development

npm run dev    # watch mode — recompiles on file changes
npm run build  # one-shot compile to dist/
npm start      # run compiled server (requires OPENNMS_CONFIG)

License

MIT

推荐服务器

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

官方
精选