Skip to main content
Glama
grader-devops

Remnawave MCP Server

Remnawave MCP-сервер

MCP-сервер, который оборачивает Remnawave API в инструменты, понятные AI-ассистенту (Zed, Claude, Cursor и т.д.). Вместо ручных curl агент вызывает list_nodes(), reset_user_traffic(user_id), extend_user(...) и т.п.

Структура

Файл

Что это

client.py

чистый HTTP-клиент к API (без MCP-зависимостей)

server.py

MCP-сервер (FastMCP → MCPServer), обёртки над client.py

smoke_test.py

самопроверка: полный stdio-handshake + вызов инструмента

requirements.txt

зависимости (mcp>=2, requests)

Related MCP server: cloudpanel-mcp

Установка

python3 -m venv .venv
.venv/bin/pip install -r requirements.txt

Токен и адрес панели берутся из env-переменных (не хардкодятся):

export REMNAWAVE_API_TOKEN="<JWT>"
export REMNAWAVE_API_URL="https://your-panel.example.com/api"   # base URL панели

Проверка

REMNAWAVE_API_TOKEN=... REMNAWAVE_API_URL=... .venv/bin/python smoke_test.py

Должно вывести Инструментов зарегистрировано: 22 и живой JSON нод.

Подключение к Zed

В settings.json (пользовательский ~/.config/zed/settings.json или проектный .zed/settings.json) добавь секцию context_servers:

{
  "context_servers": {
    "remnawave": {
      "command": {
        "path": "/absolute/path/to/mcp-remnawave/.venv/bin/python",
        "args": ["/absolute/path/to/mcp-remnawave/server.py"],
        "env": {
          "REMNAWAVE_API_TOKEN": "<JWT>",
          "REMNAWAVE_API_URL": "https://your-panel.example.com/api"
        }
      }
    }
  }
}

Пути должны быть абсолютными. Схема context_servers.<имя>.command.{path,args,env} соответствует стандарту MCP; если в твоей версии Zed ключ называется иначе (mcp вместо context_servers) — поправь имя ключа, содержимое то же.

Инструменты (22)

Ноды: list_nodes, get_node(uuid), restart_node(uuid), enable_node(uuid), disable_node(uuid)

Пользователи: list_users(offset,limit), get_user_by_username(username), get_user_by_short_uuid(short_uuid), get_user_accessible_nodes(user_id), create_user(...), update_user(...), enable_user(user_id), disable_user(user_id), reset_user_traffic(user_id), revoke_user(user_id), extend_user(user_id, days)

Сквады: list_squads()

Профили: list_config_profiles(), get_computed_config(uuid)

Хосты: list_hosts(), create_host(...)

Генерация ключа ноды: keygen()

Расширение

Добавить новый инструмент — два шага:

  1. В client.py — функция, которая дёргает нужный эндпоинт через _request(...).

  2. В server.py — обёртка с @mcp.tool() и понятным docstring (это описание, которое видит модель).

Безопасность

  • Токен живёт только в env (или в env-блоке конфига Zed), в код не зашит.

  • REMNAWAVE_API_URL задаётся через env; значение по умолчанию не задано.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    Provides 50 tools to manage a CloudPanel VPS through AI assistants, covering sites, databases, Docker, server software, firewall, DNS, and one-shot deployments.
    8 npm
    3
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables MCP clients to manage a Remnawave panel through its full API, covering users, nodes, hosts, subscriptions, and more with configurable tool profiles and read/write token access.
    24 npm
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables MCP clients like Claude Code, Claude Desktop, or Cursor to read and manage Remnawave 3.x VPN panel resources — users, nodes, hosts, config profiles, squads, subscription templates, billing, and HWID devices — through the panel's REST API, with contract-driven tool schemas, numeric user IDs, multi-panel config lookup, and an optional readonly mode.
    4 npm
    MIT