Ligolo-ng MCP Server
Manages Ligolo-ng operations on a remote Kali Linux machine via SSH, enabling proxy management, agent control, tunnel setup, route management, and port forwarding for network pivoting during security assessments.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Ligolo-ng MCP Server Start the ligolo proxy with self-cert enabled"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Ligolo-ng MCP Server
A Model Context Protocol (MCP) server for managing Ligolo-ng - a lightweight and fast tunneling tool for establishing reverse TCP/TLS tunnels during penetration testing and red team engagements.
Overview
This MCP server enables AI assistants to control Ligolo-ng operations on a remote Kali Linux machine via SSH. It provides tools for managing the proxy server, agents, tunnels, routes, and listeners - all the core functionality needed for network pivoting during security assessments.
Related MCP server: CrackMapExec MCP Server
Features
Proxy Management: Start, stop, and monitor the Ligolo-ng proxy server
Agent Control: List connected agents and manage sessions
Network Interface: Create and manage TUN interfaces for tunneling
Tunnel Operations: Start/stop tunnels through agent sessions
Route Management: Add and remove routes to target networks
Listener Configuration: Set up port forwarding through agents
Agent Command Generation: Generate agent connection commands for targets
Prerequisites
Node.js 18+
SSH access to a Kali Linux machine with Ligolo-ng installed
SSH key-based authentication configured (passwordless SSH)
Installation
# Clone the repository
git clone https://github.com/schwarztim/sec-ligolo-ng-mcp.git
cd sec-ligolo-ng-mcp
# Install dependencies
npm install
# Build the project
npm run buildConfiguration
Environment Variables
Variable | Default | Description |
|
| SSH hostname or alias for your Kali machine |
|
| Port for agent connections |
|
| Port for the Ligolo-ng web API |
|
| Default TUN interface name |
SSH Configuration
Ensure your SSH config (~/.ssh/config) has an entry for your Kali machine:
Host kali
HostName 192.168.1.100
User root
IdentityFile ~/.ssh/id_rsaClaude Desktop Integration
Add to your claude_desktop_config.json:
{
"mcpServers": {
"ligolo-ng": {
"command": "node",
"args": ["/path/to/sec-ligolo-ng-mcp/dist/index.js"],
"env": {
"KALI_HOST": "kali",
"LIGOLO_PROXY_PORT": "11601"
}
}
}
}Available Tools
Proxy Management
Tool | Description |
| Start the Ligolo-ng proxy server with optional self-signed certs and API |
| Stop the running proxy server |
| Check proxy status and view recent logs |
Session Management
Tool | Description |
| List all connected agents |
| Select an agent session to work with |
| Get network information from the selected agent |
Network Configuration
Tool | Description |
| Create a TUN interface for tunneling |
| List all TUN interfaces |
| Start a tunnel through the selected session |
| Stop the active tunnel |
Routing
Tool | Description |
| Add a route to access target networks |
| Remove a route |
| List all Ligolo routes |
Port Forwarding
Tool | Description |
| Add a listener for reverse connections |
| List active listeners |
| Remove a listener |
Utilities
Tool | Description |
| Generate agent command for target deployment |
| Get certificate fingerprint for secure connections |
| Send raw commands to the proxy console |
Usage Example
Basic Pivoting Workflow
Start the proxy on Kali:
Use ligolo_proxy_start with selfcert enabledGenerate agent command:
Use ligolo_agent_command with your Kali IPCreate TUN interface:
Use ligolo_interface_createAfter agent connects, add routes:
Use ligolo_route_add with network 10.10.10.0/24Start the tunnel:
Use ligolo_tunnel_start
Now you can access the 10.10.10.0/24 network through your Kali machine.
Setting Up Reverse Shell Callback
Use listeners to receive reverse shells through the pivot:
Use ligolo_listener_add with:
localAddress: 0.0.0.0:4444
remoteAddress: 127.0.0.1:4444This forwards connections from port 4444 on the agent back to your Kali's port 4444.
Security Considerations
This tool is designed for authorized security testing only
Always use certificate verification in production environments
The proxy runs with elevated privileges to manage network interfaces
SSH keys should be properly secured and not shared
Development
# Watch mode for development
npm run dev
# Build
npm run build
# Start the server
npm startLicense
MIT License - See LICENSE for details.
Acknowledgments
Ligolo-ng by Nicolas Chatelain
Model Context Protocol by Anthropic
Disclaimer
This tool is intended for authorized security testing and educational purposes only. Users are responsible for ensuring they have proper authorization before using this tool against any systems. The authors are not responsible for any misuse or damage caused by this tool.
Available Tools
19 toolsligolo_agent_commandC
Generate the agent command to run on target machines
Inputs: proxyIp (required), port, ignoreCert, fingerprint, +2 more.
ligolo_agent_infoA
Get network information from the selected agent (ifconfig)
Inputs: no named parameters.
ligolo_agents_listA
List all connected agents to the ligolo-ng proxy
Inputs: no named parameters.
ligolo_certificate_fingerprintA
Get the certificate fingerprint for agent verification
Inputs: no named parameters.
ligolo_interface_createB
Create a TUN interface for ligolo-ng tunneling
Inputs: name.
ligolo_interface_listA
List all TUN interfaces on Kali
Inputs: no named parameters.
ligolo_listener_addA
Add a listener on the agent to forward ports back to the attacker
Inputs: localAddress (required), remoteAddress (required).
ligolo_listener_deleteC
Delete a listener
Inputs: listenerId (required).
ligolo_listener_listA
List all active listeners
Inputs: no named parameters.
ligolo_proxy_startB
Start the ligolo-ng proxy server on Kali. The proxy accepts agent connections and manages tunnels.
Inputs: selfcert, port, enableApi, apiPort, +1 more.
ligolo_proxy_statusA
Check the status of the ligolo-ng proxy server
Inputs: no named parameters.
ligolo_proxy_stopA
Stop the running ligolo-ng proxy server on Kali
Inputs: no named parameters.
ligolo_route_addB
Add a route to access the agent's network through the tunnel
Inputs: network (required), interface.
ligolo_route_deleteB
Delete a route from the routing table
Inputs: network (required).
ligolo_route_listA
List all routes configured for ligolo interfaces
Inputs: no named parameters.
ligolo_send_commandB
Send a raw command to the ligolo-ng proxy console (advanced)
Inputs: command (required).
ligolo_session_selectB
Select an agent session to work with
Inputs: sessionId (required).
ligolo_tunnel_startB
Start a tunnel through a selected agent session
Inputs: tun.
ligolo_tunnel_stopA
Stop the active tunnel
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Tools cover distinct functional areas: agent management, proxy control, routing, tunneling, interface, and listeners. While there is slight overlap between session selection and agent info, descriptions likely clarify. Overall, each tool has a clear purpose.
All tools share the 'ligolo_' prefix and snake_case, but the pattern varies: most are noun_verb (e.g., ligolo_agents_list, ligolo_route_add), while some are noun_noun (e.g., ligolo_certificate_fingerprint) and one is verb_noun (ligolo_send_command). This inconsistency could confuse an agent.
19 tools cover the primary operations of ligolo-ng (agent, proxy, routing, tunneling, listeners, interface). This is a reasonable count; not too sparse or overwhelming for the intended domain.
The set includes CRUD-like operations for key elements (routes, listeners, interfaces) and essential proxy/agent controls. Minor gaps like agent disconnection or route modification are addressable via the send_command tool, so coverage is solid.
Maintenance
Related MCP Connectors
Secure and manage MCP servers through the Speakeasy AI Control Plane from your agent.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
MCP server for Pentest-Tools.com: run scans, manage findings and reports via your preffered LLM.
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Related MCP Servers
- AlicenseAqualityCmaintenanceMCP server for managing multiple SSH servers via AI assistants, offering tools for remote command execution, file operations, and system monitoring.1129 PyPI2MIT
- AlicenseAqualityFmaintenanceAn MCP server that provides AI assistants with access to CrackMapExec/NetExec network penetration testing capabilities via SSH to a Kali Linux host, supporting multiple protocols for enumeration, credential dumping, and command execution.11MIT
- AlicenseAqualityCmaintenanceAn MCP server that gives AI agents SSH access to remote machines through your local OpenSSH client, enabling remote command execution, file transfer, persistent shell sessions, and port forwarding.17319 PyPI38MIT
- AlicenseAqualityDmaintenanceAn MCP server that enables AI assistants to execute NetExec network penetration testing commands via SSH to a Kali Linux machine, supporting protocols like SMB, WinRM, SSH, LDAP, and more.123MIT