network-mcp-server

network-mcp-server

MCP server for network operations that lets AI assistants interact with Cisco/Juniper network devices through safe, well-defined tools like compliance audits and configuration backups.

Category
Visit Server

README

network-mcp-server

MCP server for network operations — lets AI assistants (Claude Code, Claude Desktop, or any Model Context Protocol client) talk to your Cisco/Juniper network through safe, well-defined tools.

"Is rtr-core-01 compliant?" → the assistant calls run_compliance_audit, reads the findings and explains which rules failed — no copy-pasting configs into a chat.

Built on the official MCP Python SDK (FastMCP) with the domain logic from python-netops-tools — the same engine behind the netops CLI and the network-api-portal REST API.

Tools exposed

Tool Network access What it does
list_devices none Devices from the YAML inventory (name, IP, platform)
list_backups none Saved config backups with timestamps
get_device_config none Content of a device's most recent backup
run_compliance_audit none Audits the latest backups against the YAML rules
backup_device SSH to device Pulls and saves the running config (the only write-path tool)

The split is deliberate: four read-only tools the assistant can call freely, and one clearly-documented tool that touches the network — MCP clients ask for user approval per tool, so risky actions stay visible.

Installation

python3 -m venv .venv && source .venv/bin/activate
pip install -e ../python-netops-tools   # domain logic (or its git URL)
pip install -e ".[dev]"

Hooking it up to Claude Code

claude mcp add network-ops \
  --env NETMCP_INVENTORY=/path/to/devices.yml \
  --env NETMCP_RULES=/path/to/rules.yml \
  --env NETMCP_BACKUP_DIR=/path/to/backups \
  --env NETOPS_USER=admin \
  --env NETOPS_PASSWORD=your-password \
  -- /path/to/network-mcp-server/.venv/bin/network-mcp

Then just ask: "list my network devices", "run a compliance audit", "show me the config of mx-edge-01".

Hooking it up to Claude Desktop

claude_desktop_config.json:

{
  "mcpServers": {
    "network-ops": {
      "command": "/path/to/network-mcp-server/.venv/bin/network-mcp",
      "env": {
        "NETMCP_INVENTORY": "/path/to/devices.yml",
        "NETMCP_RULES": "/path/to/rules.yml",
        "NETMCP_BACKUP_DIR": "/path/to/backups",
        "NETOPS_USER": "admin",
        "NETOPS_PASSWORD": "your-password"
      }
    }
  }
}

Configuration

Variable Default Purpose
NETMCP_INVENTORY examples/devices.yml Device inventory
NETMCP_RULES examples/rules.yml Compliance rules
NETMCP_BACKUP_DIR backups Where configs are stored/read
NETOPS_USER / NETOPS_PASSWORD SSH credentials (only needed by backup_device)

Design notes

  • Read-only by default: every question-answering path works from saved backups; only backup_device opens an SSH session, and its docstring says so explicitly so both the model and the human approving the call know.
  • Prescriptive tool descriptions: each docstring states when to call the tool, not just what it does — that's what drives correct tool selection by the model.
  • Thin server, reusable core: server.py only declares tools; operations.py bridges to netops-tools and is fully unit-tested. CLI, REST API and MCP server all share one engine.

Tests

pytest

Runs entirely offline (temporary inventories; the SSH path is exercised with a monkeypatched backup function).

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured