sec-netexec
MCP server for NetExec - Network execution tool for penetration testing
claude mcp add --transport stdio schwarztim-sec-netexec-mcp node /path/to/sec-netexec-mcp/dist/index.js \ --env SSH_KEY="/path/to/ssh/key" \ --env SSH_USER="kali" \ --env KALI_HOST="your-kali-host" \ --env SSH_TIMEOUT="300"
How to use
This MCP server exposes NetExec capabilities to AI assistants via the MCP interface. It enables remote control of a Kali Linux host running NetExec over SSH, allowing you to perform a wide range of security testing operations through structured tool calls. Available tools map to NetExec capabilities across multiple protocols, including SMB, WinRM, SSH, LDAP, MSSQL, RDP, and WMI. Typical usage involves instructing the MCP layer to execute a specific NetExec operation (for example, enumerating SMB shares, performing Kerberoasting via LDAP, or running remote commands over SSH) on a target host reachable from the Kali machine. You can also leverage helpers like password spraying, module management, and credential database queries through the provided NetExec tooling family.
To use it, ensure your MCP client connects to the netexec server configured in claude_desktop_config.json or your MCP client configuration. Then call the available tools (e.g., nxc_smb, nxc_ssh, nxc_ldap, nxc_mssql, nxc_rdp, nxc_wmi) with the appropriate arguments. Each tool exposes a set of arguments tailored to its protocol, such as target hosts, credentials, domains, actions (like shares, ntds, bloodhound), and additional options (e.g., continueOnSuccess for password spraying). The tools are designed to compose JSON payloads that specify the tool name and argument map, enabling clear, repeatable operations within your automation pipelines.
How to install
Prerequisites:
- Node.js 18+ installed on the machine running the MCP server
- Access to a Kali Linux host with NetExec installed and SSH access enabled
- SSH key-based authentication preferred (passwords supported if configured)
Installation steps:
-
Clone the repository git clone https://github.com/schwarztim/sec-netexec-mcp.git cd sec-netexec-mcp
-
Install dependencies npm install
-
Build the project npm run build
-
Start the server (examples) npm start
-
Optional: configure your MCP client (e.g., Claude Desktop) to point at the built index.js using the following environment settings: KALI_HOST=your-kali-host SSH_USER=kali SSH_KEY=/path/to/ssh/key SSH_TIMEOUT=300
Notes:
- The server expects an SSH-enabled Kali host with NetExec installed and accessible by the configured SSH credentials.
- Adjust environment variables as needed for your environment and security policies.
Additional notes
Tips and considerations:
- Ensure SSH access from the MCP host to the Kali machine is reliable and that the NetExec toolset on Kali is up to date.
- Use SSH key-based authentication where possible for automation reliability.
- The CLAUDE Desktop integration example shows how to pass environment variables into the MCP server; keep sensitive values secure and consider using secrets management where appropriate.
- If you encounter SSH timeouts, increase SSH_TIMEOUT or check network connectivity and Kali host load.
- Review NetExec tool documentation for protocol-specific usage (e.g., nxc_smb for SMB operations, nxc_ldap for LDAP/AD operations, nxc_spray for password spraying).
- Monitor for command length or argument constraints in your MCP client and adjust payloads accordingly.
Related MCP Servers
mcp-for-beginners
This open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable, and secure AI workflows from session setup to service orchestration.
bitbucket
Bitbucket MCP - A Model Context Protocol (MCP) server for integrating with Bitbucket Cloud and Server APIs
mcp-arr
MCP server for *arr media management suite
ironcurtain
A secure* runtime for autonomous AI agents. Policy from plain-English constitutions. (*https://ironcurtain.dev)
crawlbase
Crawlbase MCP Server connects AI agents and LLMs with real-time web data. It powers Claude, Cursor, and Windsurf integrations with battle-tested web scraping, JavaScript rendering, and anti-bot protection enabling structured, live data inside your AI workflows.
google-knowledge-graph
MCP server for Google's free public Knowledge Graph Search API - search for structured entity information about people, places, organizations, and concepts