网络监控服务器

一个用于网络监控软件ntopng的MCP服务器,提供查询和监控功能。

  • by marcoeg
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 marcoeg/mcp-ntopng

使用说明

mcp-ntopng

网络监控软件ntopng的MCP服务器

Lite版本

发展

设置

  1. 先决条件:

    • Python 3.13或更高版本。
    • uv 包管理器(安装).
  2. 克隆存储库:

git clone https://github.com/marcoeg/mcp-nvd
cd mcp-nvd
  1. 设置环境变量:

    • 创建一个 .env 项目根目录中包含强制环境变量的文件:

    NTOPNG_HOST=本地主机 NTOPNG_PORT=9000 NTOPNG_USER=默认值 NTOPNG密码=

    
    
  2. 再进行:

uv sync
uv pip install -e .

使用MCP检查器运行

cd /path/to/the/repo
source .env

CLIENT_PORT=8077 SERVER_PORT=8078 npx @modelcontextprotocol/inspector uv \
    --directory /path/to/repo/mcp-ntopng run mcp-ntopng

然后打开浏览器到MCP检查器指示的URL,通常 http://localhost:8077?proxyPort=8078

连接后,列出工具。选择 query_ntopng_database 并在查询中输入SELECT 声明类 SELECT * FROM host_alerts_view LIMIT 2.

在以下之间自由切换 stdio 和 sse 检查员中的运输类型。使用 sse 您需要按照以下说明运行服务器。

运行服务器:

cd /path/to/the/repo
source .env

uv run mcp-ntopng --transport sse --port 9090
  • 在港口使用SSE运输 9090 默认情况下。

在运行服务器的终端中,有一个完整的活动日志。对调试非常有用。