This guide shows how to connect Claude Desktop to a Kali Linux VMware VM through MCP, allowing the AI agent to communicate with Kali tools through SSH.
Prerequisites
Host machineWindows or macOS.Claude Desktopinstalled and logged in.VMwarerunning a Kali Linux VM.Troubleshooting skillsoptional, but highly recommended.
Kali Settings VMware
Open your Kali Linux VM and update the system.
sudo apt update && sudo apt upgrade -y
Install OpenSSH. We will use SSH to connect from the host machine to the Kali VM.
sudo apt install -y openssh-server
Enable and start the SSH service.
sudo systemctl enable --now ssh
Install mcp-kali-server. This package allows Claude to communicate with Kali
and execute supported commands through the MCP bridge.
sudo apt install -y mcp-kali-server
Start the Kali MCP API server. This exposes the local API on port 5000.
Keep this terminal open; if you stop this process, the AI agent will lose the connection.
> kali-server-mcp
[INFO] Starting Kali Linux Tools API Server on 127.0.0.1:5000
* Serving Flask app 'server'
* Debug mode: off
[INFO] WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on http://127.0.0.1:5000
2026-06-19 23:28:41,434 [INFO] Press CTRL+C to quit
2026-06-19 23:28:47,572 [INFO] Executing command: ['which', 'nmap']
2026-06-19 23:28:47,573 [INFO] Executing command: ['which', 'gobuster']
2026-06-19 23:28:47,573 [INFO] Executing command: ['which', 'dirb']
2026-06-19 23:28:47,573 [INFO] Executing command: ['which', 'nikto']
2026-06-19 23:28:47,573 [INFO] 127.0.0.1 - - [] "GET /health HTTP/1.1" 200 -
In another terminal, test the connection by running mcp-server.
You should see a successful health check.
mcp-server
[INFO] Initialized Kali Tools Client connecting to http://localhost:5000
[INFO] Successfully connected to Kali API server at http://localhost:5000
[INFO] Server health status: healthy
[WARNING] Not all essential tools are available on the Kali server
[WARNING] Missing tools: dirb, gobuster, nikto, nmap
[INFO] Starting MCP Kali server
Install the extra tools that the MCP server can use.
sudo apt install -y dirb gobuster nikto nmap enum4linux-ng hydra john metasploit-framework sqlmap wpscan wordlists
Host Desktop Settings Windows
Go to https://claude.ai/login and download Claude Desktop before logging in.
Avoid the Microsoft Store version when possible, because it may reset the JSON configuration
you will edit later.
After installing Claude Desktop, log in to your account. This is required before editing the MCP connection settings.
By default, SSH can fail on Windows if the expected binary is not available.
Install Git Bash so you can use SSH from the host to Kali:
https://git-scm.com/install/.
Claude Desktop MCP Configuration
In Claude Desktop, click your profile icon in the bottom-left corner and go to
Settings → Developer → Edit config.
Replace <YOUR_KALI_IP> with your Kali VM IP.
Find your Kali IP with:
ifconfig
"mcpServers": {
"mcp-kali-server": {
"command": "ssh",
"args": [
"[email protected]",
"mcp-server"
],
"transport": "stdio"
}
}
Your configuration file may already contain preferences. Add the MCP configuration before the preferences object and make sure the JSON remains valid.
{
"mcpServers": {
"mcp-kali-server": {
"command": "C:\\Program Files\\Git\\usr\\bin\\ssh.exe",
"args": [
"kali@<YOUR_KALI_IP>",
"mcp-server"
]
}
},
"preferences": {
"remoteToolsDeviceName": "orion",
"coworkHipaaRestricted": false,
"coworkWebSearchEnabled": true,
"coworkScheduledTasksEnabled": false,
"ccdScheduledTasksEnabled": false,
"epitaxyPrefs": {
"starred-local-code-sessions": [],
"starred-cowork-spaces": [],
"starred-session-groups": [],
"dframe-local-slice": {
"pinnedOrder": [],
"customGroupAssignments": {},
"customGroupOrder": {}
}
},
"coworkModelAutoFallbackByAccount": {
"<ID>": true
},
"bypassPermissionsGateByAccount": {
"<ID>": false
}
},
"coworkUserFilesPath": "C:\\Users\\USER\\Claude"
}
Finding the SSH Binary Path
- Search for Git Bash in Windows.
- Right click Git Bash and select
Open file location. - Right click the shortcut and select
Open file locationagain. - Open
usr, thenbin. - Search for
ssh.exe. - Right click
ssh.exeand selectCopy as path.
Replace the command path in the JSON config. Windows paths must be escaped with double backslashes:
\\.
{
"mcpServers": {
"mcp-kali-server": {
"command": "C:\\Program Files\\Git\\usr\\bin\\ssh.exe",
"args": [
"-i",
"C:\\Users\\USER\\.ssh\\key1",
"kali@<YOUR_KALI_IP>",
"mcp-server"
]
}
},
"preferences": {
"remoteToolsDeviceName": "orion",
"coworkHipaaRestricted": false,
"coworkWebSearchEnabled": true,
"coworkScheduledTasksEnabled": false,
"ccdScheduledTasksEnabled": false
},
"coworkUserFilesPath": "C:\\Users\\USER\\Claude"
}
SSH Key Authentication
Claude needs a non-interactive SSH login. Create a key pair from Git Bash.
cd ~/.ssh && ssh-keygen.exe
Generating public/private ed25519 key pair.
Enter file in which to save the key (/c/Users/USER/.ssh/id_ed25519): key1
Enter passphrase for "key1" (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in key1
Your public key has been saved in key1.pub
The key fingerprint is:
SHA256:MVt=====================GhM USER@HOST
Do not set a passphrase for this key. If you do, the SSH connection will ask for the passphrase every time Claude tries to connect, and the MCP startup will fail.
Copy the public key to your Kali VM.
ssh-copy-id -i key1.pub kali@<YOUR_KALI_IP>
Test the SSH connection with the private key. After confirming access, exit and get the key path.
USER@HOST ~/.ssh
$ ssh -i ./key1 'kali@<YOUR_KALI_IP>'
Kali GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.
╭── kali
╰── whoami
kali
╭── kali
╰── exit
$ pwd
/c/Users/USER/.ssh
Final Claude Desktop JSON
Add the private SSH key path to the Claude Desktop JSON config. Convert the Git Bash path
to Windows format, just like the ssh.exe path.
{
"mcpServers": {
"mcp-kali-server": {
"command": "C:\\Program Files\\Git\\usr\\bin\\ssh.exe",
"args": [
"-i",
"C:\\Users\\USER\\.ssh\\key1",
"-o",
"StrictHostKeyChecking=no",
"kali@<YOUR_KALI_IP>",
"mcp-server"
]
}
},
"preferences": {
"remoteToolsDeviceName": "orion",
"coworkHipaaRestricted": false,
"coworkWebSearchEnabled": true,
"coworkScheduledTasksEnabled": false,
"ccdScheduledTasksEnabled": false
},
"coworkUserFilesPath": "C:\\Users\\USER\\Claude"
}
Restart Claude Desktop
Fully close Claude Desktop and make sure it is not running in the background. Restart the application and go back to the Developer settings. You should now see the MCP server running for the Kali host.
At this point, you have a local AI pentest assistant that can use your Kali VM to run supported tools through MCP.