Giving Claude Code a memory for pentests: the ARTEX-CC exploration graph
If you have let an LLM agent drive a pentest for more than an hour, you have probably watched it lose its place. It runs nmap, works through a few hosts, and then the context window fills up or the session ends. The next
If you have let an LLM agent drive a pentest for more than an hour, you have probably watched it lose its place. It runs nmap, works through a few hosts, and then the context window fills up or the session ends. The next session runs nmap again. It has no idea which endpoints it already tested, which credentials it found, or what it meant to try next. Whatever findings it did produce are buried in a chat transcript with no link back to the request that proved them.
In my experience the model isn't the problem. Claude Code is good at reading scan output, forming a hypothesis and picking the next tool. What it doesn't have is a record. Most of a pentest is bookkeeping (what's in scope, what's been tested, what came back, which credential goes where, what's still open), and that can't live in the context window. So I built somewhere for it to live.
Authorized use only. ARTEX-CC is an offensive security tool for penetration testing, red teaming, CTFs and lab work. Use it only against systems you own or have explicit permission to test.
What it is
ARTEX-CC is an MCP server written in Go, with all its state in PostgreSQL. It exposes 62 tools in 10 categories: exploration graph, assets and scope, findings, credentials, evidence, enrichment and ingestion, engagement management, activity, reporting, and traffic capture. If you want the whole list, artex-cc tools --json prints it without needing a database, and the tool reference on the site is generated from that output.
There is no agent loop and no LLM client inside it. Claude Code decides what to test and which tools to call; ARTEX executes the calls and remembers the results. So it never needs an API key, and there's no separate token budget to watch: your existing Claude subscription covers the AI side. The architecture page has a diagram of how Claude Code, the MCP server, PostgreSQL and the recording proxy fit together.
It started as a fork of ARTEX, which ships its own LLM agent loop. I was already paying for Claude, and running a second agent to do the same job didn't make sense to me, so I removed the loop and kept the data model: the same asset graph, exploration tracking and findings, exposed as tools. It's AGPL-3.0, like upstream.
I use it with Claude Code, but anything that speaks MCP should work. The MCP clients page has configs for Cursor, Cline, Windsurf, Zed and others.
The exploration graph
Everything else in ARTEX hangs off this. The graph is basically a task board with typed nodes:
-
Goals: what the engagement has to prove.
prove_goallinks evidence to one. - Intents: planned next steps, moving from open to running to done (or canceled).
- Facts: observations, linked to the intent that produced them.
- Findings: vulnerabilities, linked to the affected assets, coverage records and captured traffic.
- Hints and constraints: steering for the planner.
Edges like derived_from, yields, spawns and proves tie them together. Next to the graph sit an asset inventory (domains, IPs, subdomains, services, endpoints, apps), stored credentials, and a coverage ledger that records each surface, risk area and outcome.
The piece that makes it work is a single call, graph_overview, which summarizes goals, hints, intents by state, findings and coverage. Claude calls it at the start of every planning cycle and after any restart, so each cycle starts from the graph instead of from whatever survived in the conversation. Done intents and coverage records stop it from repeating work. A compacted or restarted conversation rebuilds its picture from the same place. Intents stuck in running with no recent progress are leftovers from an earlier session, and Claude replaces them.
That's also what makes hands-free mode usable. Claude Code's /loop command re-runs a prompt on an interval:
/loop 5m Continue the pentest: call graph_overview, assess progress, dispatch subagents for open intents, prove goals when evidence exists.
Every five minutes Claude reads the board, sends subagents after open intents (each one writes its facts, coverage and findings into the shared graph), and proves goals once the evidence is there. You can steer without stopping the loop: add_hint leaves a note the planner sees on the next overview, set_constraints adds allow or deny rules, and the asset, enrichment and traffic tools enforce scope rules on their own.
A real run: HTB Forest
One of the published evals pointed Claude Opus 5.5 at Forest, a retired Easy-rated Hack The Box machine that's a Windows Active Directory domain controller. It was a blind run: the prompt banned web searches, writeup lookups and prior knowledge of the box, and the session log shows no web tools were called. Claude Code talked to a Docker ARTEX instance over HTTP MCP, and it had both flags in about eight minutes.
| Phase | What the agent did |
|---|---|
| Recon | nmap found a Windows Server 2016 DC for htb.local. An RPC null session leaked the full user list. |
| Foothold |
svc-alfresco had Kerberos pre-auth disabled: AS-REP roast, cracked with hashcat and rockyou, WinRM, user flag. |
| Domain Admin | Account Operators, created a user, Exchange Windows Permissions (WriteDACL), DCSync, Administrator NTLM hash, pass-the-hash, root flag. |
| Cleanup | Restored the domain DACL, deleted the created user, removed uploaded scripts. |
The part I found most interesting wasn't the attack path, which is well known. It was that the agent hit two tooling failures and got around both without help. PowerView's ACL writes silently did nothing in a non-interactive WinRM session, so it switched to Impacket's dacledit.py. Then OpenSSL 3's disabled MD4 support broke NTLM authentication until it enabled the legacy provider.
Meanwhile everything landed in the graph as it happened. At the end the engagement held one asset, six facts (null session, Exchange, AS-REP, Account Operators, WriteDACL, DCSync), two findings (a HIGH for Kerberos pre-authentication disabled and a CRITICAL for the DACL chain to Domain Admin), two stored credentials, coverage for enumeration, AS-REP roasting and privilege escalation, a proved goal, and a generated report. The eval page has remediations for both findings, with flags and hashes redacted.
Forest has no web surface, so this run never touched the recording proxy. Until there is a web-target eval, the example walkthrough shows that side on a fictional bug bounty target, app.example.com. Claude has been sending requests through the proxy on :8788, notices that /api/v2/users/{id} returns full user records without authentication, and ties the finding to the exact exchange that proves it:
traffic_search({host: "api.example.com", query: "/api/v2/users"})
traffic_get({id: "e5f6a7b8"})
report_finding({vulnclass: "idor", severity: "high", intent_id: 14, asset_ids: [7], ...})
bind_finding_traffic({finding_id: 1, snapshot_id: "e5f6a7b8", role: "proof"})
record_coverage({surface: "api.example.com /api/v2/users/{id}", risk_area: "idor", outcome: "reported"})
The finding now points at the intent that produced it, the asset it affects, the coverage record for that surface, and the captured request and response. A week later, when you're reading the report and wondering whether a claim holds up, you can follow it back to the traffic.
The web UI and the live demo
artex-cc serve --web adds a dashboard on the same port as the MCP endpoint (the Docker image turns it on). Whatever Claude records shows up there live: the exploration graph, findings with their bound traffic, captured traffic, the coverage matrix, assets, credentials and a printable report. There's also a chat page that runs the claude CLI as a subprocess, intercept approvals for tool calls that match allow, deny or ask rules, and live logs.
On a loopback listener the UI is open by default and --auth adds a password; on any other listener a password is always required. Please don't put it on an untrusted network. It can read everything the engagement recorded, credentials included.
If you'd rather click around before installing anything, the live demo is the real web UI running against a fictional, seeded engagement. It's read-only and has no backend.

A finding with its bound traffic
What else is in there
There are other offensive-security MCP servers, and several of them wrap a big catalog of scanners. I went the other way: fewer tools, more attention to the record.
State is persistent and resumable. Stop for the night and the next session picks up from graph_overview, and whole engagements export to and import from portable JSON archives. Findings can be merged or dismissed as false positives, and generate_report builds a Markdown report that also assesses the findings themselves (proof level, verification status, counterevidence).
The recording proxy is a MITM proxy with an SQLite index. It captures WebSocket and SSE traffic, does full-text body search, replays requests with modifications and exports HAR 1.2. An egress governor can rate-limit outbound requests with quiet, balanced or aggressive profiles. The traffic tools are only registered when you start with --proxy; without it ARTEX is a plain data server with 50 tools.
A few smaller things: the asset, enrichment and traffic tools check scope automatically and block out-of-scope actions unless you explicitly override them (check_scope answers the same question on demand). Output from nmap, nuclei, httpx, ffuf and masscan ingests straight into the asset graph. And if you set ARTEX_CREDENTIAL_KEY, stored passwords are encrypted with AES-256-GCM.
Getting started
Docker is the quickest way in:
git clone https://github.com/SREsAreHumanToo/ARTEX-CC.git
cd ARTEX-CC
docker compose up
That starts PostgreSQL and ARTEX together, with the MCP endpoint and web UI on localhost:9400 and the recording proxy on localhost:8788. The container writes a ready-made MCP config, bearer token included, to /app/data/mcp-config.json. The image also bundles a pentest tooling layer (nmap, Impacket, evil-winrm, nuclei, ffuf and more); build with --build-arg PENTEST_TOOLS=0 if you don't want it.
To run natively on macOS or Linux, there's a Homebrew cask (Homebrew 7.0.11 or later). It's new in 0.4.1, and the macOS side has had less testing than Linux, so bug reports there are especially welcome:
brew install --cask sresarehumantoo/tap/artex-cc
There are also binaries on the releases page, or you can build it with Go 1.26 or later:
go install github.com/SREsAreHumanToo/ARTEX-CC/cmd/artex-cc@latest
With PostgreSQL running, create an engagement:
createdb ccartex
artex-cc init --pg "postgres://localhost/ccartex" --goal "Pentest example.com"
init creates the schema and the engagement, generates a CA certificate for HTTPS interception, and prints the MCP config to drop into ~/.claude.json or a project .mcp.json. Then open Claude Code and ask:
Pentest example.com, starting with reconnaissance.
The getting started guide goes through both paths in more detail.
What's rough, and what's next
The roadmap is public. The biggest gap right now is multi-agent coordination. Subagents inside one Claude Code session share the graph fine, but several separate Claude Code instances working the same engagement at once isn't supported yet. That needs locking on intents so they don't duplicate work, and a notification when one of them reports a finding. PostgreSQL's advisory locks and LISTEN/NOTIFY give me the primitives; the actual work is designing the coordination protocol at the MCP level.
Plugins are also only half done. 0.4.0 added an exec-based plugin system, but today a plugin registers MCP tools and returns text. What I want is for integrations like nuclei, sqlmap and ffuf to write directly into the asset graph and exploration state, without changes to the core.
I'll keep publishing evals in the same format as Forest and the Winforge CTF: what the agent did, what ARTEX captured, and what went wrong. The eval runner in the repo now takes --target, --model and --mcp-config, so you can point a scenario at your own target, a different model, or an MCP config you already have.
sresarehumantoo
/
ARTEX-CC
Autonomous penetration testing platform for Claude Code. 62 tools, dual-graph architecture, web UI, traffic proxy, and evidence capture.
ARTEX is an autonomous penetration testing platform that exposes upstream ARTEX's pentest model as MCP tools Claude Code calls through your existing Claude subscription. Asset graph, exploration tracking, finding management, coverage recording, traffic capture, and report generation, exposed as 62 MCP tools. No separate LLM API key, no token budget, no agent loop of its own.
You bring the brain. ARTEX brings the hands.
Documentation ยท Live demo ยท Getting started
Authorized use only. This is an offensive security tool, for penetration testing, red teaming, CTFs and lab work. Use it only against systems you own or have explicit permission to test.
How it works
Claude Code decides what to test, what tools to call, and in what order. ARTEX executes the calls: inserting assets, tracking the exploration graph, recording findings and credentials, logging coverage, and capturing HTTPโฆ
The code is on GitHub. Bugs go to Issues, and questions and ideas to Discussions. If you run it against your own lab, I'd like to hear what broke.
AI disclosure: I wrote this with help from Claude, which helped draft and edit it. I reviewed and checked everything before publishing.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes โ full credit and traffic to the original publisher.

