!! WORK IN PROGRESS !!
An MCP server that applies network configuration with nmstate.
The vision is to make network management easier with the power of LLMs and MCP. Please submit issues with ideas :)
The current code is just prototyping. This should probably be rewritten with more thoughtful coding.
npm(Optional: for MCP-Superassistant)python3uvpython3-libnmstate
Instructions on how to set up and run your project from the dnf package manager.
sudo dnf copr enable rrajesh/nmstate-mcp
sudo dnf install nmstate-mcpnmstate-mcp-setupThis corresponds to setup_cursor.py for now, and currently only supports Cursor IDE.
Setup ~/.nmstate-mcp/inventory.yaml to include remote hosts that you want to configure.
nmstate-mcp uses Ansible for remote host configuration.
Instructions on how to set up and run your project from source.
sudo dnf install python3-libnmstate uvuv venv --system-site-packages .venvsource .venv/bin/activateuv syncuv run --directory <path to project directory> main.py
or if you are in the project directory:
uv run main.py
You will not need to activate the Python virtual environment with this command manually.
Claude Desktop and Cursor, and potentially others, support this "mcpServers" format:
{
"mcpServers": {
"nmstate-mcp": {
"command": "uv",
"args": [
"run",
"--directory",
"<PATH TO YOUR PROJECT>",
"main.py"
]
},
}
}
This will also run the nmstate mcp server implementation. See mcpconfig.json, and please edit it to reflect your directory setup.
UV run documentation: docs.astral.sh/uv/reference/cli/#uv-run
npx @srbhptl39/mcp-superassistant-proxy@latest --config ./mcpconfig.jsonPre-requisites:
- Ansible.
- SSH.
- For demo purposes, you can give passwordless sudo in the VM or figure out another way to authenticate. You cannot get a password prompt through Cursor.