sydasif/nornir-napalm-mcp ? reverse-engineered prompt
Reverse engineered prompt
Build me a Python MCP server that lets AI assistants look at live network device state through Nornir and NAPALM.
I want it to load a Nornir inventory from a YAML config file, connect to devices over SSH, eAPI, or NETCONF, and expose read only tools for things like listing inventory, getting device facts, running any NAPALM getter, pulling running or startup config, running safe CLI show commands, listing supported getters, and reloading the inventory from disk. It should work in both STDIO mode for local MCP clients and HTTP mode for running as a server.
Keep it lightweight and reliable, with caching so the Nornir setup is reused across requests, and if a device fails once it can be tried again later. Make the tool responses clean and structured, and include tests for the main tools and CLI entry points. If you need to check current docs for Nornir or NAPALM details, look them up online.