Content
# openwrt_mcp
MCP for OpenWrt Router Operations
## Configuration
Modify SSH connection settings in `tools/ssh.js` before use:
```javascript
const ssh_config = {
"ip_host": "192.168.1.1", // Change to your router IP
"username": "root", // Change to your username
"password": "your_password" // Change to your password
}
```
## Used Packages
```npm install @modelcontextprotocol/sdk zod```
## Features
### Router Status
- `get_router_status` - Get overall router status (load, memory, disk, online devices, WiFi, etc.)
### Network Status
- `get_network_status` - Get network connection status (WAN interface, public IP, DNS, connectivity test)
### Traffic Statistics
- `get_traffice_stastice` - Get real-time traffic statistics (LAN speed, WiFi client traffic, online devices, connections)
### OpenClash Management
- `get_openclash_status` - Get OpenClash running status (service status, core version, configuration, TUN, listening port, error log)
- `switch_openclash_proxy_mode` - Switch OpenClash proxy mode (rule/global/direct)
- `get_openclash_proxy_group` - Get proxy strategy group list (strategy group name, current selected node, available node list)
- `get_openclash_proxy_group_and_delay` - Get proxy strategy group and node delay test (time-consuming, concurrent test all node delays)
- `operation_openclash_status` - Manage OpenClash running status (start/stop/restart/update configuration)
## Installation
```bash
npm install
```
## Usage
Configure MCP server in Hermes Agent's `config.yaml`:
```yaml
mcp_servers:
openwrt:
command: node
args:
- /path/to/openwrt_MCP/index.js
```