keenetic
Keenetic-router-plugin
插件(MCP 服务器 + skill),让 AI 代理能够通过 RCI 管理 Keenetic 路由器——这是路由器 Web 界面使用的同一个 API。它直接在局域网内工作,无需云端。MCP 服务器是独立的,可与任何 MCP 客户端(例如 Codex)配合使用;skill(面向 AI 的 Keenetic 领域知识)仅用于 Claude Code 插件生态。
已在 KeeneticOS 5.0.12 上测试。在其他型号/固件上,个别 RCI 路径可能有所不同——开始使用前请先运行 npm run smoke(只读,不会对路由器做任何更改)。
通过这个插件 AI 能做什么,不能做什么
读取——无需确认,可随时进行:
固件版本、WAN 状态、接口列表、已连接设备、Wi-Fi 客户端、端口转发、路由、DHCP 保留、VPN 接口、完整配置导出(export_config)。
更改——仅当 AI 明确传递 confirm: true 时:
更改 Wi-Fi 密码、启用/禁用接入点、添加/删除端口转发、添加/删除路由、将网络绑定/解绑到已配置的 VPN 隧道、从 .bat 文件批量应用路由。如果没有 confirm: true,调用会被拒绝。你也可以让 AI 先用 dryRun: true 执行——它会显示将向路由器发送什么,而不应用任何更改。
危险操作——还需在服务器配置中设置 ALLOW_DESTRUCTIVE=true:
重启路由器。只要该标志未启用,即使带着 confirm: true 也无法通过 AI 重启路由器。
插件从根本上不能做什么(未实现): 从零捏造 VPN 隧道(WireGuard/OpenVPN/IPsec)、恢复出厂设置、更新固件。
每个 write/destructive 调用(已应用、已拒绝或报错失败)都会写入 audit.log。
Related MCP server: AsusWRT MCP Server
安装
需要 Node.js 20+。
克隆项目并安装依赖:
npm install npm run build把
.env.example复制到同一文件夹中的.env并填写:ROUTER_HOST=192.168.1.1 # LAN-адрес роутера (в свойствах сети — "основной шлюз") ROUTER_PORT=80 ROUTER_LOGIN=имя_пользователя ROUTER_PASSWORD=пароль_пользователя ALLOW_DESTRUCTIVE=false # true — разрешить reboot_router除了
.env,同样的值也可以在注册服务器时通过--env传入——见下文。查看连接情况(只读,不会对路由器做任何更改):
npm run smoke如果某个请求返回错误——说明该模型/固件的 RCI 路径不同,请在开始使用 AI 之前修正
src/capabilities/keptic.ts。
连接 Claude Code
作为插件(推荐——直接带 skill):
claude --plugin-dir "<путь-к-проекту>"如需永久连接(不只是单次会话),请把项目放进 git 仓库或本地 marketplace 后使用 /plugin install。
仅服务器——不带 skill:
claude mcp add --transport stdio --scope user keenetic -- node "<путь-к-проекту>/dist/index.js"如果没创建 .env,把凭据直接写在这里:
claude mcp add --transport stdio --scope user \
--env ROUTER_HOST=192.168.1.1 --env ROUTER_LOGIN=имя_пользователя --env ROUTER_PASSWORD=его_пароль \
keenetic -- node "<путь-к-проекту>/dist/index.js"验证连接:claude mcp list,claude mcp get keenetic 或在会话内使用 /mcp。
之后就可以在对话中写,比如“显示连接到路由器的设备”或“更改 guest Wi-Fi 的密码”。
连接 Codex
在 ~/.codex/config.toml 中:
[mcp_servers.keenetic]
command = "node"
args = ["<путь-к-проекту>/dist/index.js"]安全
Guard 模型(confirm/dryRun/ALLOW_DESTRUCTIVE)保护不受 AI 的随机和不安全行为影响。它并不保护路由器密码本身——如果 .env 或配置文件落入他人手中,就可以用该密码绕过服务器及所有这些限制,直接访问路由器。
export_config严格 only-read,但会以明文或弱混淆方式返回密钥(密码哈希、WPA-PSK、WireGuard 参数)—— 这与 Web 界面中“保存”按钮背后指向的信息相同,但现在暴露在 AI 对话中。该工具本身会要求 AI 在调用前先提醒你。请为服务独立用户 指定一个Metadata 服务(系统 → 用户),而不要尽可能使用
admin(如果可能)。注意:部分操作(特别是set_wifi_password/set_wifi_enabled)在 Keenetic 上只允许admin——如果你需要这些操作,请使用admin,但要用一个新的、唯一的密码。不要把 RCI/Web 管理界面开放到互联网——不要启用远程访问、具有管理访问权限的 KeenDNS,也不要为该账户做端口路由到 Web 管理界面。默认情况下 Keenetic 本身对外就是关闭的。
限制
.env的访问在操作系统层面(macOS/Linux 上chmod 600 .env单机,Windows 上文件属性 → “安全”)。该文件已在.gitignore中。使用一个长且唯一的密码,不要和其他密码重复。
开发
npm run dev # запуск сервера напрямую через tsx, без сборки
npm test # unit-тесты (без обращения к реальному роутеру)
npm run smoke # live read-only проверка на реальном роутере из .env版本和发布
项目版本(package.json,.claude-plugin/plugin.json)会在推送到 master 时自动 bump——GitHub Actions 运行 semantic-release,根据提交消息(Angular 规范)决定版本级别:
fix: ...→ patchfeat: ...→ minorfeat!: .../ 提交信息中的BREAKING CHANGE: ...→ majorchore:,docs:,refactor:,test:等 —— 不会创建 new version
**请无 manual bump 或手动修改 version——它完全从提交历史生成。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityFmaintenanceEnables AI agents to manage OpenWRT routers remotely via SSH, supporting system monitoring, network management, OpenThread Border Router configuration, and package management through natural language commands.1914MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to monitor and securely manage AsusWRT and AsusWRT-Merlin routers via SSH with allowlisted commands, supporting read-only monitoring and controlled mutations.471MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to manage TP-Link routers by listing clients, checking status, controlling Wi-Fi, and rebooting via natural language.1MIT
- AlicenseNot gradedqualityAmaintenanceEnables MCP agents to control Keenetic routers via plain language, providing network monitoring, device management, and safe configuration changes with backup and read-only options.10216MIT
Related MCP Connectors
Let AI operate servers without SSH. Choose actions, approve risky changes, and audit every step.
Curated knowledge API for AI agents - skill packs, semantic search, validated patterns.
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
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/Kykyryky23/Keenetic-router-plugin'
If you have feedback or need assistance with the MCP directory API, please join our Discord server