Skip to main content
Glama

NetCraze-mcp

MCP-сервер для роутеров NetCraze — управление через Cursor и другие MCP-клиенты (RCI HTTP API).

Форк community-проекта Patr56/keenetic-mcp (MIT), адаптированный под NetCraze.

Инструменты

Static DNS hosts (NetCraze)

Инструмент

Описание

list_static_hosts

Список static hosts из show dns-proxy (фильтр private IP)

add_static_host

Добавить host и сохранить конфигурацию

delete_static_host

Удалить host по имени и сохранить конфигурацию

Система, сеть, DNS-маршрутизация (upstream)

get_system_info, reboot, get_interfaces, get_interface, get_connected_clients, get_wifi_associations, get_speed, get_routes, get_wan_status, get_wan_speed, get_domain_lists, get_domain_list, create_domain_list, delete_domain_list, set_domain_list, add_domains, remove_domains, get_dns_routes, add_dns_route, delete_dns_route, set_interface_state

Установка

cd NetCraze-mcp
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

Переменные окружения

Переменная

По умолчанию

Описание

NETCRAZE_HOST

IP роутера (обязательно)

NETCRAZE_USER

admin

Логин RCI

NETCRAZE_PASS

Пароль (обязательно)

NETCRAZE_SAFE_MODE

true

Блокировать write-инструменты

NETCRAZE_CREDS_FILE

Путь к файлу creds (для Cursor)

Подключение в Cursor

1. Creds — секреты вне репозитория

По одному файлу creds на каждый роутер:

mkdir -p ~/.config/mcp-netcraze
chmod 700 ~/.config/mcp-netcraze

cp examples/creds.router.home.example ~/.config/mcp-netcraze/creds.router.home
cp examples/creds.router.work.example ~/.config/mcp-netcraze/creds.router.work
cp examples/run-mcp.sh ~/.config/mcp-netcraze/run-mcp.sh
chmod 600 ~/.config/mcp-netcraze/creds.router.*
chmod 700 ~/.config/mcp-netcraze/run-mcp.sh
# заполните NETCRAZE_HOST и NETCRAZE_PASS в каждом creds-файле

Пароль только в creds.router.*, не в mcp.json.

2. Конфиг ~/.cursor/mcp.json

Два MCP-сервера — два роутера. В mcp.json только путь к creds:

{
  "mcpServers": {
    "router.home": {
      "command": "$HOME/.config/mcp-netcraze/run-mcp.sh",
      "env": {
        "NETCRAZE_CREDS_FILE": "$HOME/.config/mcp-netcraze/creds.router.home"
      }
    },
    "router.work": {
      "command": "$HOME/.config/mcp-netcraze/run-mcp.sh",
      "env": {
        "NETCRAZE_CREDS_FILE": "$HOME/.config/mcp-netcraze/creds.router.work"
      }
    }
  }
}

run-mcp.sh читает NETCRAZE_CREDS_FILE и подгружает HOST/USER/PASS/Safe mode оттуда.

3. Проверка

  1. Перезапуск Cursor (Cmd+Q)

  2. Settings → Tools & MCPsrouter.home и router.work зелёные

  3. В чате указывайте сервер явно:

    • «На router.home покажи static hosts»

    • «На router.work добавь host …»

Safe mode

  • NETCRAZE_SAFE_MODE=true (или не задано) → write-инструменты блокируются

  • Для записи: export NETCRAZE_SAFE_MODE="false" в нужном creds-файле

Разработка

netcraze_mcp/
  client.py          # NetCrazeClient, auth, RCI
  config.py          # safe_mode (по умолчанию true)
  server.py          # FastMCP init, main()
  tools/
    system.py        # get_system_info, reboot
    network.py       # interfaces, clients, WAN, routes
    dns_routes.py    # domain lists, DNS routing
    static_hosts.py  # list/add/delete static hosts
tests/
  test_tools.py
pytest

Лицензия

MIT (на базе upstream Patr56/keenetic-mcp).

-
license - not tested
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

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/wise108/NetCraze-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server