Enables querying the ntopng Clickhouse database to access historical network flows and alerts for network monitoring data analysis.
mcp-server-ntopng
NTOPNG Model Context Protocol Server
A Model Context Protocol server implementation for NTOPNG that enables AI agents to query networks monitoring data using the NTOPNG database.
This MCP Server assumes that ntopng
is using ClickHouse to store historical flows and alert. Check ntopng Clickhouse
Tools
fetch_ntopng_all_ifids
Retrieve all available interface IDs from ntopng.
get_ntopng_hosts_location
Fetch geographical location and additional info for hosts.
fetch_ntopng_top_local_talkers
Retrieve the top 10 local talkers for a specified interface.
fetch_ntopng_top_remote_talkers
Retrieve the top 10 remote talkers for a specified interface.
get_ntopng_all_alert_stats
Retrieve statistics for all alerts.
get_ntopng_flow_alert_stats
Retrieve statistics for flow alerts.
get_ntopng_host_alert_stats
Retrieve statistics for host alerts.
get_ntopng_interface_alert_stats
Retrieve statistics for interface alerts.
get_ntopng_mac_alert_stats
Retrieve statistics for MAC alerts.
get_ntopng_network_alert_stats
Retrieve statistics for network alerts.
get_ntopng_snmp_device_alert_list
Retrieve a list of SNMP device alerts.
get_ntopng_snmp_device_alert_stats
Retrieve statistics for SNMP device alerts.
get_ntopng_system_alert_stats
Retrieve statistics for system alerts.
query_ntopng_flows_data
Retrieve detailed flows data from the ntopng flows database.
get_ntopng_top-k_flows
Retrieve top-k flows data from the ntopng flows database.
get_ntopng_user_alert_stats
Retrieve statistics for user alerts.
get_ntopng_flow_devices_stats
Retrieve statistics for all flow dev`ices.
get_ntopng_sflow_devices_stats
Retrieve statistics for all sFlow devices.
list_tables_ntopng_database
List tables structure of the ntopng database.
query_ntopng_database
Query the ntopng Clickhouse database.
Status
Works with Claude Desktop app and other MCP compliant hosts and clients.
No support for MCP resources or prompts yet.
Configuration
Create or edit the Claude Desktop configuration file located at:
On macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
On Windows:
%APPDATA%/Claude/claude_desktop_config.json
Add the following:
Replace
/path/to/your/uv-binary
with the absolute path to theuv
executable. Find the path withwhich uv
. This ensures that the correct version ofuv
is used when starting the server.Restart Claude Desktop to apply the changes.
Development
Set the environmental variables either in the
claude_desktop_config.json
file or in a.env
file in the root of the repository.
Run
uv sync
to install the dependencies. To installuv
follow the instructions here. Then dosource .venv/bin/activate
.Install the
mcp-ntopng
package withuv pip install -e .
from the project main directory.For easy testing, you can run
mcp dev mcp_ntopng/mcp_server.py
to start the MCP server. CHANGE WITH A PROPER CHAT CLIENT
Environment Variables
The following environment variables are used to configure the database connection:
NTOPNG_HOST
: The hostname of thentopng
serverNTOPNG_DBUSER
: The username for Clickhouse DB authenticationNTOPNG_DBPASSWORD
: The password for Clickhouse DB authenticationNTOPNG_API_KEY
: Thentopng
authentication token.
Optional
NTOPNG_DBPORT
: The port number of the Clickhouse DB in thentopng
serverDefault:
9000
if HTTPS is enabled,8123
if disabledUsually doesn't need to be set unless using a non-standard port
NTOPNG_SECURE
: Enable/disable a TLS connectionDefault:
false
Set to
true
for a secure TLS connections
NTOPNG_VERIFY
: Enable/disable SSL certificate verificationDefault:
true
Set to `false to disable certificate verification (not recommended for production)
NTOPNG_CONNECT_TIMEOUT
: Connection timeout in secondsDefault: `30
Increase this value if you experience connection timeouts
NTOPNG_SEND_RECEIVE_TIMEOUT
: Send/receive timeout in secondsDefault:
300
Increase this value for long-running queries
Check TLS Setup in the
ntopng
documentation for details about setting up a TLS connection to Clickhouse.
Development
Install the package on the local machine:
Run the MCP Inspector
Use the local library in Claude Desktop.
Find: /Users/marco/Library/Application\ Support/Claude/claude_desktop_config.json
Edit the claude_desktop_config.json changing the local paths:
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.
MCP Server for network monitoring software ntopng.
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityAn MCP server to run commands.Last updated -11,092198MIT License
- AsecurityAlicenseAqualityA 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
- -securityAlicense-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
- AsecurityFlicenseAqualityA MCP Server used to collect MCP Servers over the internet.Last updated -319