openwrt-mcp-server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MCP_HOST | No | Host address to bind for HTTP mode (default 0.0.0.0) | 0.0.0.0 |
| MCP_PORT | No | Port to listen on for HTTP mode (default 3000) | 3000 |
| MCP_BASE_URL | No | External base URL for OAuth callbacks (default auto-inferred) | |
| MCP_PASSWORD | No | OAuth authentication password (default 'openwrt') | openwrt |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| connect_routerA | Connect to an OpenWrt router via SSH. Must be called before using any other tools. |
| disconnect_routerA | Disconnect from the currently connected OpenWrt router (SSH). |
| connect_serialA | Connect to an OpenWrt router via serial port (UART/COM). Useful for boot logs, recovery, and low-level debugging. |
| disconnect_serialA | Disconnect from the serial port. |
| list_serial_portsA | List available serial ports on the system. |
| serial_logA | Read the serial port output buffer. Captures all serial output including boot messages, kernel logs, and command output. |
| serial_writeA | Write raw data directly to the serial port. Use for sending special key sequences, break signals, or interacting with bootloaders. |
| switch_transportA | Switch the active transport between SSH and serial. Both connections can be maintained simultaneously — this controls which one is used for command execution. |
| connection_statusA | Check the current connection status to the router. Shows SSH, serial, and active transport info. |
| run_commandA | Execute a shell command on the OpenWrt router. Use for any command-line operation not covered by specialized tools. |
| uci_showB | Show UCI configuration. Can show all configs, a specific config, or a specific section/option. |
| uci_getB | Get a specific UCI option value. |
| uci_setB | Set a UCI option value. |
| uci_addA | Add an anonymous UCI section of a given type to a config. |
| uci_deleteC | Delete a UCI section or option. |
| uci_add_listC | Add an item to a UCI list option. |
| uci_del_listA | Remove an item from a UCI list option. |
| uci_commitA | Commit pending UCI changes to make them persistent. Optionally restart the affected service. |
| uci_changesA | Show pending (uncommitted) UCI changes. |
| uci_revertB | Revert pending UCI changes. |
| network_interfacesA | List all network interfaces and their status on the OpenWrt router. |
| network_statusA | Get the status of a specific UCI network interface using netifd. |
| wifi_statusA | Get wireless radio and interface status. |
| wifi_scanC | Scan for nearby wireless networks. |
| connected_clientsA | List currently connected network clients (DHCP leases and ARP table). |
| network_restartB | Restart the network service or a specific interface. |
| firewall_statusA | Show the current firewall rules and zones. |
| ping_testB | Ping a host from the router to test connectivity. |
| dns_lookupC | Perform DNS lookup from the router. |
| route_tableA | Show the routing table. |
| system_infoB | Get comprehensive system information from the OpenWrt router. |
| system_logB | Read the system log (logread) with optional filtering. |
| kernel_logB | Read the kernel log (dmesg). |
| process_listA | List running processes on the router. |
| service_listA | List available init.d services and their status. |
| service_actionB | Perform an action on an init.d service (start, stop, restart, enable, disable). |
| system_rebootB | Reboot the OpenWrt router. WARNING: This will disconnect the SSH session. |
| cron_listA | List current crontab entries on the router. |
| file_readA | Read the contents of a file on the OpenWrt router. For large files, use offset and limit to read in chunks. Returns file metadata (total lines and size) alongside content. |
| file_writeA | Write content to a file on the OpenWrt router. Creates the file if it doesn't exist. |
| file_listA | List files and directories at a given path on the router. |
| file_deleteB | Delete a file or directory on the router. |
| file_searchA | Search for files or content within files on the router. |
| file_read_batchA | Read multiple files at once for better performance. Returns all file contents in one call. |
| file_patchA | Apply a unified diff patch to a file on the OpenWrt router. The patch is parsed and applied on the MCP server side — no 'patch' command needed on the router. Supports standard unified diff format (output of 'diff -u'). |
| sed_addA | Add one or more sed expressions to the batch queue for a file. Expressions are NOT executed immediately — they accumulate until sed_execute is called. This allows building up complex multi-edit operations efficiently. |
| sed_previewA | Preview all pending sed expressions in the batch queue. Optionally preview the result on a specific file (dry run with sed, no modification). |
| sed_executeA | Execute all pending sed expressions in the batch queue. Each file is edited in-place with a backup (.sed.bak). All expressions for a file are combined into a single sed command for atomicity. |
| sed_clearB | Clear pending sed expressions from the batch queue. |
| file_historyA | View modification history for files on the router. Shows all changes made through MCP tools (write, patch, sed, chmod, delete) with timestamps and details. |
| file_chmodC | Change file permissions on the router. |
| opkg_updateA | Update the opkg package lists from configured repositories. |
| opkg_listB | List available or installed packages. |
| opkg_installB | Install a package via opkg. |
| opkg_removeB | Remove an installed package via opkg. |
| opkg_infoB | Show detailed information about a package. |
| opkg_upgradableA | List packages that have upgrades available. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/haode01/openwrt-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server