Back to Home
hgursel icon

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

Run Command
node packages/network-mcp/dist/index.js

Environment 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

Stats

Interest Score0
Security Score6
Cost ClassLow
Avg Tokens1000
Stars0
Forks0
Last Update2025-11-20

Tags

network automationSSHAI agentdevice managementModel Context Protocol