NetCraze-mcp
MCP server for NetCraze routers enabling management of static DNS hosts, system info, network interfaces, and other router features via Cursor and MCP clients.
README
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. Проверка
- Перезапуск Cursor (Cmd+Q)
- Settings → Tools & MCPs →
router.homeиrouter.workзелёные - В чате указывайте сервер явно:
- «На 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).
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.