# keenetic-mcp

An MCP server that lets your agent read Keenetic router state and change settings: devices, Wi-Fi, segments, routing.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 28
- Author: salatmaster
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/salatmaster/keenetic-mcp
- Updated: 2026-08-09
- HTML: https://affpapa.org/en/nevibecode/mcp/keenetic-mcp

## What it does

The server sits between the agent and the router's own HTTP API on the LAN, so nothing gets installed on the Keenetic. Read tools return devices with traffic and signal figures, interfaces and WireGuard peers, radio status, internet reachability, the routing table and connection policies. Write tools rename or block a device, bring an interface up or down, and create a segment with its own Wi-Fi and DHCP. Anything outside that surface goes through `rci_call`, which takes a raw API path.

Writes land in the running configuration only. A reboot throws them away unless `save_config` is called, and the server will not call it by itself. The first change of a session triggers a backup. Every write is read back and compared, since the router sometimes accepts a bad command and quietly does nothing. Launch it with `--read-only` and the write tools are never registered at all.

\`npx -y keenetic-mcp init` runs a wizard that finds the router through the default gateway, tests the password against it and stores it in the OS keychain. For containers, set `KEENETIC_HOST`, `KEENETIC_USER` and `KEENETIC_PASSWORD` instead. Four skills come along: the RCI tree, safe changes, segment building and a diagnostic order.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `KEENETIC_HOST`, `KEENETIC_USER`, `KEENETIC_PASSWORD` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env KEENETIC_HOST=<KEENETIC_HOST> --env KEENETIC_USER=<KEENETIC_USER> --env KEENETIC_PASSWORD=<KEENETIC_PASSWORD> --transport stdio keenetic-mcp -- npx -y keenetic-mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add keenetic-mcp --env KEENETIC_HOST=<KEENETIC_HOST> --env KEENETIC_USER=<KEENETIC_USER> --env KEENETIC_PASSWORD=<KEENETIC_PASSWORD> -- npx -y keenetic-mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "keenetic-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "keenetic-mcp"
            ],
            "env": {
                "KEENETIC_HOST": "<KEENETIC_HOST>",
                "KEENETIC_USER": "<KEENETIC_USER>",
                "KEENETIC_PASSWORD": "<KEENETIC_PASSWORD>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "keenetic-mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "keenetic-mcp"
            ],
            "env": {
                "KEENETIC_HOST": "<KEENETIC_HOST>",
                "KEENETIC_USER": "<KEENETIC_USER>",
                "KEENETIC_PASSWORD": "<KEENETIC_PASSWORD>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e KEENETIC_HOST=<KEENETIC_HOST> -e KEENETIC_USER=<KEENETIC_USER> -e KEENETIC_PASSWORD=<KEENETIC_PASSWORD> keenetic-mcp npx -y keenetic-mcp
```
Replace <…> with your own values

## When to use it
- find which device is hogging the uplink right now
- block a camera overnight without making it permanent
- stand up an isolated guest network with DHCP
- see which config edits are still waiting for a save
- follow an ordered check when the internet drops

## Example prompts
- Which device is using the most bandwidth right now? Sort by traffic and show signal.
- Block `hallway-camera` and tell me if the change is saved or reverts on reboot.
- Create a segment `guest` with Wi-Fi and DHCP, no VPN routing.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
