Back to MCP directory
publicPublicdnsLocal runtime

mcp-ntopng

一个用于网络监控软件ntopng的MCP服务器,提供查询数据库功能,支持多种传输协议。

article

README

🚀 mcp-ntopng

mcp-ntopng 是一个用于网络监控软件 ntopng 的 MCP 服务器,它还有轻量版可供使用,为网络监控提供了便捷的解决方案。

🚀 快速开始

✨ 主要特性

  • 作为 ntopng 的 MCP 服务器,提供特定功能支持。
  • 具备轻量版,满足不同场景需求。

📦 安装指南

环境配置

  1. 前置条件
    • 需要 Python 3.13 或更高版本。
    • 需安装 uv 包管理工具,安装说明
  2. 克隆仓库
git clone https://github.com/marcoeg/mcp-nvd
cd mcp-nvd
  1. 设置环境变量: 在项目根目录下创建一个 .env 文件,并添加以下必要的环境变量:
NTOPNG_HOST=localhost
NTOPNG_PORT=9000
NTOPNG_USER=default
NTOPNG_PASSWORD=
  1. 安装依赖项
uv sync
uv pip install -e .

💻 使用示例

基础用法

使用 MCP Inspector 运行:

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 Inspector 指定的 URL,通常为 http://localhost:8077?proxyPort=8078。连接后,列出工具,选择 query_ntopng_database 并输入一个 SELECT 语句,例如 SELECT * FROM host_alerts_view LIMIT 2

⚠️ 重要提示

可以在 MCP Inspector 中自由切换 stdiosse 传输类型。要使用 sse,请按照以下说明运行服务器。

高级用法

运行服务器:

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

uv run mcp-ntopng --transport sse --port 9090
  • 默认在端口 9090 上使用 SSE 传输运行。

💡 使用建议

在运行服务器的终端中,会显示所有活动的完整日志,这对于调试非常有用。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client