TL;DR

Install Claude Code straight onto Kali with curl -fsSL https://claude.ai/install.sh | bash, log in with a Claude Pro or Max account, and it runs as an agent right in your terminal — it can call nmap, gobuster, nikto, and the rest of Kali's toolkit for you and read back the results. That is different from the popular Claude-plus-Kali guides, which put Claude Desktop on a second machine and reach Kali over an MCP server. Give Claude Code pentest "skills" to make it methodical, but treat every third-party skill as untrusted code: skills run with your privileges and can steal credentials or exfiltrate files. Read the skill before you install it, and only ever point this at machines you are authorized to test.

There are a lot of "Kali + Claude" tutorials floating around now, and almost all of them describe the same setup: Claude Desktop running on your Mac or Windows box, an MCP server sitting on a separate Kali host, and the two talking over SSH. It works, but it is a three-part contraption, and it means the AI never actually lives on the machine with the tools.

This guide takes the simpler path. Claude Code is Anthropic's command-line agent, and it installs and runs directly on Kali. You type in the same terminal you already use, it plans and runs tools on the box itself, and there is no desktop app and no MCP server to stand up. If you have already got Kali running — whether that is the VirtualBox image, a bootable USB with persistence, or a Raspberry Pi box — you are ten minutes from an AI assistant that drives your tools.

It earns its place rather than being a gimmick, with two caveats I come back to below: it makes mistakes and reports them as fact, and a careless skill install can hand an attacker your machine. Both are manageable once you know they are there.

Claude Code vs Claude Desktop + MCP: which one do you want?

Before you install anything, it is worth understanding the two ways people wire Claude into Kali, because they solve different problems and most articles only show you one of them.

 Claude Code (this guide)Claude Desktop + MCP
Where the AI runsIn the Kali terminal, on the box itselfDesktop app on a separate Mac/Windows/Linux machine
What connects it to toolsNothing extra — it runs commands directlyAn MCP server you install and run on Kali
Machines neededOne (Kali)Usually two (client + Kali host)
InterfaceTerminal / CLIChat window (GUI)
Best forWorking on the Kali box, drop boxes, headless Pi, SSH sessionsPeople who want a chat GUI and are happy running a client separately

Neither is "correct" — they are different shapes. If you like a chat window and do not mind running a client machine and an MCP server, the Kali team has written up that route on the official Kali blog, and it is a solid reference. If you want the AI on the machine with the tools and nothing else to maintain, Claude Code is the leaner choice, and it is what the rest of this guide covers.

ℹ️ A quick naming note. "Claude" is the model, "Claude Desktop" is the chat app, and "Claude Code" is the terminal agent. Skills work across Anthropic's agent tooling, but the install steps and the "runs on Kali itself" behavior in this guide are specifically Claude Code.

What you'll need

Nothing exotic. If you already pentest on Kali you probably have all of it:

Setting up a safe practice lab

You need something to point the tools at, and it must be a machine that exists specifically to be broken. The standard choices are all free:

Run your lab target on an isolated host-only or internal network so nothing you do can leak onto your real LAN or the internet. A misfired scan that stays inside a host-only network is a lesson; the same scan hitting your neighbor's router is a crime.

🚨 The one rule that matters most. Everything in this article is for machines you own or have explicit written authorization to test. Running these tools — automated by an AI or not — against systems you do not have permission to attack is illegal in most countries and can carry real criminal penalties. An AI that chains an exploit for you is not a defense. Scope it, get it in writing, and stay inside the lab.

Installing Claude Code on Kali

The native installer is one line and pulls no Node.js dependency — it drops a self-contained binary and wires up auto-updates. Open a terminal on Kali and run:

Terminal
┌──(kali㉿kali)-[~] └─$ curl -fsSL https://claude.ai/install.sh | bash # Downloads the native binary and installs it to ~/.local/bin/claude
💡 Tip: Piping a script from the internet into bash is exactly the habit this article later tells you to be careful about. This one comes from Anthropic's official domain (claude.ai) over HTTPS. If you want to look before you run, fetch it first — curl -fsSL https://claude.ai/install.sh -o install.sh, read it, then bash install.sh.

If ~/.local/bin is not already on your PATH, open a new terminal (or re-source your shell) so the claude command is found. Then confirm the install:

Terminal
┌──(kali㉿kali)-[~] └─$ claude --version 2.1.211 (Claude Code)

A version number means you are good. If you would rather manage it through your package manager, Anthropic also publishes signed apt repositories and an npm package — both documented in the official setup docs — but the native installer above is the least-fuss route on Kali.

Now log in. Start Claude Code from any directory and follow the browser prompt to authenticate with your paid account:

Terminal
┌──(kali㉿kali)-[~] └─$ claude # Opens an interactive session and walks you through login on first run

That is the whole install. You now have an AI agent sitting in your terminal that can read files, run commands, and reason about the output — no desktop app, no MCP server, nothing else to babysit.

How agent skills actually work

Out of the box, Claude Code is a capable generalist but it does not know your methodology. That is what skills are for. A skill is just a folder with a SKILL.md file inside it — plain-language instructions, plus optional scripts and reference files — that teaches the agent how to do one class of task well. When your request matches a skill's description, Claude pulls that playbook into context and follows it.

For pentesting, a good skill turns "poke at this box" into a disciplined process: reconnaissance first, then enumeration, then targeted testing, with the tool commands and the reporting format baked in. Instead of you remembering every nmap flag and every follow-up, the skill encodes the workflow and Claude executes it consistently.

Skills live in a skills directory that Claude Code reads on startup, and because they are just text and scripts, anyone can write and share them. That openness is the whole appeal — and, as the next section explains, the whole risk.

Installing pentest skills

There is a healthy pile of open-source pentest skills now. A few worth knowing about:

Most install the same way: clone the repo into your Claude Code skills directory (or the path the project's README specifies), restart Claude Code so it re-reads the skills, and confirm the new capability shows up. Follow each project's own instructions — they differ on exact paths and any extra setup.

⚠️ Do not clone-and-run on trust. Every one of those links is third-party code that will run with your shell's privileges. Popular and actively maintained is a good sign, not a guarantee. Run every one of them through the checklist below before it touches your machine.

Vetting a skill before you install it

A skill is not a passive config file. It can carry shell scripts and Python that run inside your environment, with access to your files, your shell history, and any API keys or tokens sitting in your environment. A malicious one can steal credentials, quietly exfiltrate source code, or install a backdoor — and this is a real, measured problem, not a hypothetical.

In July 2026, researchers published "Cloak and Detonate," describing a technique they call SkillCloak that hides malicious behavior from the scanners meant to catch it. Across eight scanners and 1,613 real-world malicious skills, their self-extracting packing method bypassed every scanner more than 90% of the time — for example by stashing the payload in a directory the scanner skips, like .git/, and rebuilding it only when the agent runs. You cannot outsource this to an automated scan. You have to read the skill yourself.

The good news is that skills are text, and you already have the tools to read them. Before installing anything, clone it somewhere harmless and go through this checklist by hand:

Terminal — quick triage of an unpacked skill
┌──(kali㉿kali)-[~/suspect-skill] └─$ grep -rInE "curl|wget|http|nc |base64|eval|ENV|API_KEY|TOKEN|~/.ssh" . # Treat every hit as a lead to investigate, not proof of guilt — # then decide if that network call or secret access belongs there.
💡 You are on the right box for this. Vetting untrusted code is a Kali skill in itself. Static-read it first (the grep pass above), and if you still want to run something questionable, detonate it in an isolated VM or a sandbox like Firejail with no network and no real secrets mounted — the same way you would triage any suspicious sample.

Your first agent-run recon

With Claude Code installed and a skill loaded, point it at your lab target. The interaction is plain English — you describe the goal, and Claude picks the tool, builds the command, runs it, and reads the results back to you.

Claude Code — interactive session
> Do a full TCP port scan of 10.0.2.15 (my lab box) and tell me what services are exposed and which look worth a closer look. ● I'll run an nmap service/version scan against the target. Bash(nmap -sV -p- 10.0.2.15) ⎿ 22/tcp open ssh OpenSSH 7.9 80/tcp open http Apache 2.4.38 3306/tcp open mysql MariaDB ... The box exposes SSH, an Apache web server, and an exposed MySQL/MariaDB port. The web server on 80 is the most promising starting point — want me to enumerate directories with gobuster?

Notice what happened: you never typed an nmap flag. Claude chose -sV -p-, ran it, parsed the output, and proposed a logical next step. If you want to understand what it actually did — and you should — my Nmap tutorial walks through those exact flags so the AI is teaching you, not replacing you.

Chaining a full workflow

The payoff is chaining. Because Claude keeps the results of one step in context, it can carry them into the next without you copy-pasting IP addresses and ports between tools. A single instruction can walk the early phases of an engagement:

Claude Code — chaining recon into enumeration
> The web server on 80 is interesting. Enumerate directories, then check anything you find for obvious issues. Ask me before anything intrusive. ● Bash(gobuster dir -u http://10.0.2.15 -w /usr/share/wordlists/dirb/common.txt) ⎿ /admin (Status: 301) /login.php (Status: 200) /uploads (Status: 301) ... Found an admin path, a login page, and an open uploads directory. I'd like to run nikto against the site next — that's noisier. Shall I proceed? [waiting for your approval]

That "ask me before anything intrusive" is doing real work — it keeps a human in the loop at the exact moment it matters. For the web-app phase specifically, pairing this with a proxy is powerful; my Burp Suite tutorial covers the manual side, and the top 10 Kali tools guide is a good map of everything Claude might reach for.

Permission gates and the flag you never use

By default, Claude Code asks before it runs commands that change your system or reach out to the network. That approval prompt is your safety rail, and on a pentest box it is doing double duty: it stops both a bad AI decision and a runaway automated attack.

You will eventually hear about --dangerously-skip-permissions (often called "YOLO mode"), which turns those prompts off. The name is a warning, not a joke. An agent running without gates can delete files, rewrite configs, or fire off intrusive tools with no chance for you to say no — and if a malicious skill is in the mix, it removes the last thing standing between that skill and your machine.

🚨 Never run --dangerously-skip-permissions on a machine you care about. If you have a genuine reason to run an agent unattended, do it in a throwaway, isolated VM with no credentials and no network access to anything real — never on your daily driver, and never on a box with client data or live engagement scope on it.

What it's genuinely bad at

The demos make this look magic. It is not, and knowing the failure modes is what separates using it well from getting burned:

One more time, because automation raises the stakes: only test what you are allowed to test. An AI that can autonomously chain reconnaissance into exploitation is a different liability profile than running one command by hand — it can do more, faster, with less deliberate thought from you.

Used inside those lines, Claude Code on Kali is a real upgrade to how you learn and work. Used outside them, it is evidence. Keep it in the lab.

Frequently Asked Questions

Do I need Claude Desktop or an MCP server to use Claude Code on Kali?

No. That is the whole point of this route. Claude Code installs directly on Kali and runs in your terminal, calling tools on the box itself. The Claude Desktop plus MCP setup you have seen elsewhere is a separate approach that puts the chat app on another machine and connects to Kali over a server — useful if you want a GUI, but not required here.

Does Claude Code work on Kali running on a Raspberry Pi?

Yes. Claude Code supports ARM64, and Kali ships a first-class ARM build, so it runs on a Pi. It is a great match for a portable or headless drop box you SSH into. See my guide on building a portable Kali pentest box on a Raspberry Pi for the hardware side.

Is Claude Code free?

No. Claude Code requires a paid Claude account — Pro, Max, Team, Enterprise, or a Console (API) account. The free Claude.ai plan does not include it. Pro is the common starting point; if you run long, output-heavy pentest sessions, Max gives you more headroom.

Are third-party pentest skills safe to install?

Treat them as untrusted code, because that is what they are. A skill runs with your privileges and can bundle scripts that read your files, API keys, and SSH material. Read the SKILL.md and every bundled script before installing, grep for outbound network calls and secret access, reject any path containing .. or a leading slash, and prefer first-party or well-reviewed sources. Research in 2026 showed malicious skills routinely evade automated scanners, so a manual read is not optional.

Can Claude Code replace a human penetration tester?

No. It is a force multiplier. It speeds up recon, enumeration, and reporting and makes lab practice more productive, but it hallucinates, has no real grasp of engagement scope, and produces false positives. You need enough security knowledge to check its work and keep it in-scope. It makes a good tester faster; it does not make a non-tester into one.

Is it legal to use Claude Code for penetration testing?

Only against systems you own or have explicit written permission to test. Automating attacks with an AI does not change the law — running these tools against systems you are not authorized to test is a crime in most countries, and the AI is not a defense. Practice on deliberately vulnerable labs like Metasploitable, DVWA, Hack The Box, or TryHackMe.