MCPSERV.CLUB
yhvh-chen

Nornir MCP Server

MCP Server

Fast, concurrent network automation via Nornir and NAPALM

Active(71)
5stars
2views
Updated 20 days ago

About

A FastMCP server that exposes Nornir and NAPALM network automation tools as MCP services. It offers concurrent, multi‑vendor operations with robust validation and security features for easy integration with MCP clients.

Capabilities

Resources
Access data sources
Tools
Execute functions
Prompts
Pre-built templates
Sampling
AI model interactions

Nornir MCP Server in Action

The Nornir MCP Server transforms a rich network automation ecosystem into a simple, AI‑friendly interface. By wrapping the Nornir framework and its NAPALM plugin set behind a FastMCP HTTP endpoint, the server exposes a catalog of over twenty network tools that can be invoked from any MCP‑compatible AI assistant. This eliminates the need for custom integrations or direct SSH sessions, letting developers focus on high‑level automation logic while the server handles inventory resolution, parallel execution, and device communication.

At its core, the server solves two common pain points for network automation teams: concurrency and multi‑vendor support. Nornir’s inventory model allows users to define hosts, groups, and defaults in YAML files, while NAPALM abstracts vendor‑specific APIs into a unified set of getters and command runners. The MCP layer then serializes these operations as JSON payloads, validates them with Pydantic for type safety, and streams results back to the client. This architecture means a single AI prompt can trigger actions on dozens of routers, switches, or firewalls in parallel without the developer writing boilerplate code for each device type.

Key capabilities include:

  • Concurrent task execution – Run the same command or NAPALM getter across many devices in parallel, leveraging FastAPI’s async support and uvicorn’s performance.
  • Secure command filtering – A configurable blacklist protects against accidental destructive actions such as reloading or erasing startup configurations.
  • Rich toolset – From simple network diagnostics (, ) to comprehensive inventory queries (, ), the server offers a ready‑made toolbox for most day‑to‑day operations.
  • Pydantic validation – Every tool input is rigorously checked, ensuring that malformed requests are rejected early and reducing runtime errors.

Real‑world scenarios benefit from this abstraction in several ways. An AI assistant can draft a configuration change, validate it against the current state via , and then push the update to all relevant devices in one go. Network operators can ask an assistant to report on interface health across a site, receiving a consolidated JSON response without writing custom scripts. Security teams can audit command usage by inspecting the blacklist and logs, confident that dangerous actions are blocked before reaching the device.

Integrating the Nornir MCP Server into existing AI workflows is straightforward. The server exposes a standard HTTP endpoint and an SSE stream for real‑time updates, both compatible with the streamable‑http transport used by most modern MCP clients. Once configured, an AI assistant can reference the server’s tool catalog in prompts, pass dynamic parameters, and receive structured responses that can be fed back into higher‑level decision logic. This tight coupling of network operations with AI reasoning unlocks a new layer of automation, where conversational commands translate directly into multi‑device network actions with minimal friction.