OpenWRT-MCP

by paulomac1000

Not rated
GitHub

About

Secure MCP (Model Context Protocol) server for OpenWRT router management and diagnostics

Details

Author
paulomac1000
Categories
Other, Infrastructure

Setup

Install OpenWRT-MCP in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/paulomac1000/openwrt-mcp

Follow the installation instructions in the repository README, then restart your MCP client.

Read-only MCP (Model Context Protocol) server for OpenWRT router management and diagnostics. Enables AI assistants (Claude Desktop, LibreChat, Cline) to observe and analyze an OpenWRT router without any write access.

- Python 3.14+ (for local use) or Docker
- OpenWRT router with SSH enabled (Dropbear or OpenSSH)
- SSH key pair for authentication

ssh-keygen -t ed25519 -f openwrt_id_ed25519 -C "openwrt-mcp" ssh-copy-id -i openwrt_id_ed25519.pub root@192.168.0.1
cp .env.example .env # Edit .env with your OPENWRT_HOST and SSH key path
# After editing .env, for Docker add MCP_UNSAFE_PUBLIC_ACCESS_CONFIRMED=1 to .env docker compose up -d
docker run -d \ --name openwrt-mcp \ -p 9094:9094 \ -p 9095:9095 \ -p 9096:9096 \ -e OPENWRT_HOST=192.168.0.1 \ -e OPENWRT_SSH_KEY=/app/keys/openwrt_id_ed25519 \ -e MCP_UNSAFE_PUBLIC_ACCESS_CONFIRMED=1 \ -v $(pwd)/keys:/app/keys:ro \ ghcr.io/paulomac1000/openwrt-mcp:latest
git clone https://github.com/paulomac1000/openwrt-mcp.git cd openwrt-mcp docker build -t openwrt-mcp . # Then run with the same docker run command above
pip install -e ".[dev]" OPENWRT_HOST=192.168.0.1 OPENWRT_SSH_KEY=/path/to/key openwrt-mcp
# Health check curl http://localhost:9094/health # List all MCP tools curl http://localhost:9096/api/tools # Call a tool curl -X POST http://localhost:9096/api/tools/get_router_info \ -H "Content-Type: application/json" \ -d '{}' # Get tool manifest curl http://localhost:9096/api/tools/get_router_info/manifest

Tools are categorized by risk level:[READ]tools are safe — they query the router with no side effects.[WRITE]tools can modify router state and requireENABLE_WRITE_OPERATIONS=1in.env.[DESTRUCTIVE]tools are irreversible (reboot) and require explicit confirmation.

All configuration is via environment variables. See.env.examplefor a complete template.

- Read-only by default— All SSH commands are whitelisted; write operations (uci set,ifdown,ubus reboot) requireENABLE_WRITE_OPERATIONS=1
- Command whitelist— Explicit read-only patterns (ubus call,uci show,cat /proc/*,logread,ping, and others)
- Write command whitelist— Separateexecute_write()path for write operations (ifdown,ifup,uci set/commit,/etc/init.d/network,ubus reboot)
- Blocked patternsrm,reboot,wget,curl,uci set(in read path), shell metacharacters (;,|,&&,$, and others)
- Key-based authentication— Password login discouraged
- SSH host key verification— Optional viaOPENWRT_KNOWN_HOSTS(set to path of known_hosts file)
- Audit logging— All commands logged with timestamps for accountability
- Localhost binding— All ports bind to127.0.0.1by default; setMCP_UNSAFE_PUBLIC_ACCESS_CONFIRMED=1for Docker

This server follows two AI-First standards:

Compliance level:L3-ready(all L1-L3 rules met; Risk Consistency Matrix enforced by automated tests).

pip install -e ".[dev]" pytest tests/unit/ tests/integration/ -q # 268 tests (requires .env for integration) pytest tests/unit/ --cov=openwrt_mcp -q # 80%+ coverage ruff check . && ruff format --check . # lint mypy src/openwrt_mcp/ --strict # type check bandit -r src/openwrt_mcp/ -ll # security

MCP server that exposes GenieACS TR-069 ACS instances to LLMs for device management, firmware downloads, and parameter reads

The Fabric MCP server exposes the following MCP tools that allow AI assistants to interact with your Equinix Fabric resources. Each tool corresponds to a specific Fabric API endpoint.

Model Context Protocol server for secure AsusWRT router administration via SSH. Provides 42+ read-only monitoring tools and guarded mutation tools for managing AsusWRT/Merlin routers.

A complete Model Context Protocol (MCP) server for Fortinet FortiOS 7.6.6

Control AVM FRITZ!Box routers - manage devices, WiFi, network settings, parental controls, and schedule time-delayed actions

MCP (Model Context Protocol) server for IoT device management. Enables AI assistants (Claude Desktop, LibreChat, Cline) to discover and control OpenBK (OpenBeken), Tasmota, Tuya, OpenHasp and HikVision devices on your local network.

A comprehensive Model Context Protocol (MCP) server for penetration testing and cybersecurity operations, providing seamless integration between Kali Linux tools and MCP-compatible clients.

A comprehensive Model Context Protocol (MCP) server for Cisco Nexus Dashboard, enabling AI agents like Claude to interact with Nexus Dashboard APIs for intelligent network automation and management.

Manage your Pi-hole v6 instance with 55 tools covering DNS blocking, domain management, query analysis, statistics, DHCP, and system administration.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.