mcp-服务器-ntopng
NTOPNG 模型上下文协议服务器
NTOPNG的模型上下文协议服务器实现,使 AI 代理能够使用 NTOPNG 数据库查询网络监控数据。
此 MCP 服务器假设ntopng使用 ClickHouse 来存储历史流量和警报。请查看ntopng 的 ClickHouse
工具
fetch_ntopng_all_ifids从 ntopng 中检索所有可用的接口 ID。
get_ntopng_hosts_location获取主机的地理位置和附加信息。
fetch_ntopng_top_local_talkers检索指定接口的前 10 个本地对话者。
fetch_ntopng_top_remote_talkers检索指定接口的前 10 个远程对话者。
get_ntopng_all_alert_stats检索所有警报的统计信息。
get_ntopng_flow_alert_stats检索流量警报的统计数据。
get_ntopng_host_alert_stats检索主机警报的统计数据。
get_ntopng_interface_alert_stats检索接口警报的统计数据。
get_ntopng_mac_alert_stats检索 MAC 警报的统计数据。
get_ntopng_network_alert_stats检索网络警报的统计数据。
get_ntopng_snmp_device_alert_list检索 SNMP 设备警报列表。
get_ntopng_snmp_device_alert_stats检索 SNMP 设备警报的统计信息。
get_ntopng_system_alert_stats检索系统警报的统计数据。
query_ntopng_flows_data从 ntopng 流量数据库中检索详细的流量数据。
get_ntopng_top-k_flows从 ntopng 流数据库中检索前 k 个流数据。
get_ntopng_user_alert_stats检索用户警报的统计数据。
get_ntopng_flow_devices_stats检索所有流设备的统计数据。
get_ntopng_sflow_devices_stats检索所有 sFlow 设备的统计信息。
list_tables_ntopng_database列出 ntopng 数据库的表结构。
query_ntopng_database查询 ntopng Clickhouse 数据库。
地位
可与 Claude Desktop 应用程序和其他符合 MCP 的主机和客户端配合使用。
配置
创建或编辑位于以下位置的 Claude Desktop 配置文件:
在 macOS 上:
~/Library/Application Support/Claude/claude_desktop_config.json在 Windows 上:
%APPDATA%/Claude/claude_desktop_config.json
添加以下内容:
将
/path/to/your/uv-binary替换为uv可执行文件的绝对路径。使用which uv查找路径。这可确保启动服务器时使用正确版本的uv。重新启动 Claude Desktop 以应用更改。
发展
在
claude_desktop_config.json文件或存储库根目录中的.env文件中设置环境变量。
运行
uv sync来安装依赖项。要安装uv,请按照此处的说明操作。然后执行source .venv/bin/activate。使用
uv pip install -e .从项目主目录安装mcp-ntopng包。为了方便测试,您可以运行
mcp dev mcp_ntopng/mcp_server.py来启动 MCP 服务器。请使用合适的聊天客户端进行更改
环境变量
以下环境变量用于配置数据库连接:
NTOPNG_HOST:ntopng服务器的主机名NTOPNG_DBUSER:Clickhouse DB 身份验证的用户名NTOPNG_DBPASSWORD:Clickhouse DB 身份验证的密码NTOPNG_API_KEY:ntopng身份验证令牌。
选修的
NTOPNG_DBPORT:ntopng服务器中 Clickhouse DB 的端口号默认值:如果启用 HTTPS,
9000;如果禁用,8123通常不需要设置,除非使用非标准端口
NTOPNG_SECURE:启用/禁用 TLS 连接默认值:
false设置为
true以实现安全的 TLS 连接
NTOPNG_VERIFY:启用/禁用 SSL 证书验证默认值:
true设置为 `false 以禁用证书验证(不建议用于生产)
NTOPNG_CONNECT_TIMEOUT:连接超时(秒)默认值:`30
如果遇到连接超时,请增加此值
NTOPNG_SEND_RECEIVE_TIMEOUT:发送/接收超时(秒)默认值:
300对于长时间运行的查询,请增加此值
有关设置与 Clickhouse 的 TLS 连接的详细信息,请查看
ntopng文档中的TLS 设置。
发展
在本地机器上安装包:
运行 MCP 检查器
使用 Claude Desktop 中的本地库。
查找:/Users/marco/Library/Application\Support/Claude/claude_desktop_config.json
编辑 claude_desktop_config.json 更改本地路径:
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
网络监控软件 ntopng 的 MCP 服务器。
Related Resources
Related MCP Servers
- Asecurity-licenseAqualityAn MCP server to run commands.Last updated -11,092198MIT License
- Asecurity-licenseAqualityA beginner-friendly Model Context Protocol (MCP) server that helps users understand MCP concepts, provides interactive examples, and lists available MCP servers. This server is designed to be a helpful companion for developers working with MCP. Also comes with a huge list of servers you can install.Last updated -31663Apache 2.0
- -security-license-qualityMCP Server simplifies the implementation of the Model Context Protocol by providing a user-friendly API to create custom tools and manage server workflows efficiently.Last updated -34MIT License
- Asecurity-licenseAqualityA MCP Server used to collect MCP Servers over the internet.Last updated -319