home / mcp / netbrain mcp server

NetBrain MCP Server

Provides a production-ready MCP server to manage multi-vendor network devices via MCP, with topology, prompts, and resource delivery.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "ikoreyoshii-netbrain_mcp": {
      "command": "python",
      "args": [
        "server.py"
      ]
    }
  }
}

NetBrain MCP is an open platform that connects large language models to network devices using the Model Context Protocol. It enables your AI assistant to manage, diagnose, and configure diverse network gear through a standardized MCP interface, delivering a unified control plane for multi-vendor environments.

How to use

You will run a local MCP server and connect your MCP client to it. Use the provided MCP commands to start the server in development or production modes, then access the web UI or invoke MCP tools to manage devices, run commands, discover topology, and render AI prompts for network tasks.

How to install

Prerequisites: Python 3.10+ and a working Python environment. You may also leverage the MCP development tool for running the server.

# Optional: create and activate a virtual environment
python3 -m venv venv
source venv/bin/activate

# Install dependencies (production path)
pip install -r requirements.txt

# Start the server (Python run)
python server.py

# Alternative: run via MCP developer tool
mcp run server.py

# Alternative: start with MCP Inspector (debug UI)
mcp dev server.py

Additional notes and steps

Running the server in production typically involves installing dependencies and starting the Python-based MCP server. You can also start via MCP tooling to enable development workflows and debug interfaces.

Running and initial usage examples

# Start using the Python command directly
python server.py

# Start via MCP tooling
mcp run server.py

# Start with the development inspector for debugging
mcp dev server.py

Available tools

list_devices

List network devices registered in the MCP system, with optional filters by vendor, type, status, or tags.

add_device

Add a new network device with vendor, model, credentials, and connection details.

get_device

Retrieve detailed information for a specific device by its ID.

update_device

Update device properties such as credentials, connection parameters, or tags.

delete_device

Remove a device from the MCP system.

add_credential

Add credentials used to access devices (e.g., SSH keys, passwords, or token-based methods).

list_credentials

List stored device credentials for management and reuse.

connect_device

Open a live connection to a device to run commands or start an interactive session.

disconnect_device

Terminate an active device connection.

send_command

Send a single command to a connected device and return its output.

send_commands

Send multiple commands to a connected device and return aggregated output.

get_active_connections

Show all currently open device connections and their status.

discover_topology

Automatically discover network topology using CDP/LLDP and build a topology model.

get_topology

Fetch the currently discovered topology data.

clear_topology

Clear the stored topology information.

get_device_neighbors

Retrieve neighbor information for a specific device.

discover_device_neighbors

Discover neighbors for a single device and update topology.

get_topology_statistics

Obtain statistics about the discovered topology, such as device count and links.

scan_network_range

Scan an IP range to identify devices and services.

get_scan_results

Return results from the latest network scan.

get_scan_statistics

Provide statistics about the latest scan, including device findings.

discover_devices_from_scan_results

Create device entries from scan results for auto-import.

clear_scan_results

Clear stored scan results and cache.

scan_single_host

Scan a single IP address or hostname.

list_resources

List available MCP resources that can be provided to LLMs.

get_resource

Retrieve a specific resource by its URI.

clear_resource_cache

Clear the resource cache to force fresh retrieval.

list_templates

List available AI prompt templates for network tasks.

render_template

Render a prompt template with a given context for an LLM.

test_scrapli_connection

Test connectivity to a device using the Scrapli driver.

test_telnet_connection

Test Telnet connectivity to a device.

send_telnet_command

Send a command over an active Telnet session.