NetContext-MCP
by hgursel
Overview
AI-powered network automation and device management by enabling AI assistants to execute commands on network devices via Model Context Protocol (MCP).
Installation
node packages/network-mcp/dist/index.jsEnvironment Variables
- NETCONTEXT_REPO_PATH
- DEVICE_USERNAME
- DEVICE_PASSWORD
- DEVICE_PRIVATE_KEY
- DEVICE_PORT
- SSH_TIMEOUT
- SSH_VERIFY_HOST_KEY
- DEFAULT_PROTOCOL
- SSH_AUTH_SOCK
- NODE_ENV
Security Notes
The primary security risk is that SSH host key verification is disabled by default (`SSH_VERIFY_HOST_KEY=false` in environment config and `ssh.ts`), making the server vulnerable to Man-in-the-Middle (MitM) attacks. This is a critical flaw for a network management tool and must be manually enabled for production. While strong command sanitization (`rm`, `erase`, command chaining, path traversal, redirection) and file path validation for documentation are implemented, and YAML parsing uses `FAILSAFE_SCHEMA` to prevent code execution, the default SSH setting significantly lowers the overall security posture. Hardcoded test credentials exist in development configurations, emphasizing the need for secure environment variable management in production.
Similar Servers
ha-mcp
Provides AI agents with complete control over Home Assistant via REST and WebSocket APIs, offering a comprehensive suite of tools for smart home management, automation, and debugging.
ssh-mcp-server
Bridging AI assistants to remote SSH server operations for command execution, file transfer, and server status retrieval via the Model Context Protocol (MCP).
mcp-ssh-manager
Manages remote SSH servers via the Model Context Protocol (MCP), enabling AI assistants like Claude Code and OpenAI Codex to execute commands, transfer files, monitor health, and automate DevOps tasks.
git-netai
Provides a unified, asynchronous Model Context Protocol (MCP) server for managing multi-platform network infrastructure (routers, firewalls, WiFi, monitoring, data centers) via a single AI-accessible API.