ARTEX MCP Server
# **CyberHawk Threat Intel**
<p align="center">
<img src="https://media.cyberhawkthreatintel.com/general/1771234479938-y9566.png" alt="CyberHawk Threat Intel" width="160"/>
</p>
<h1 align="center">ARTEX MCP Server</h1>
<p align="center">
<strong>Drive the ARTEX autonomous penetration-testing engine from Claude Code — run scans, operate the stack, and diagnose it, all over MCP.</strong><br/>
<em>Built by Rudra Verma | Senior Cyber Security Architect & Researcher | CyberHawk Threat Intel</em>
</p>
<p align="center">
<a href="https://www.cyberhawkthreatintel.com"><img src="https://img.shields.io/badge/CyberHawk_Threat_Intel-Visit_Site-0066cc?style=flat-square&logo=shield" /></a>
<a href="https://www.cyberhawkthreatintel.com"><img src="https://img.shields.io/badge/Sign_Up-FREE-0066cc?style=flat-square&logo=shield" /></a>
<img src="https://img.shields.io/badge/ARTEX-Autonomous_Pentest-blue?style=flat-square" />
<img src="https://img.shields.io/badge/MCP-Server-0066cc?style=flat-square" />
<img src="https://img.shields.io/badge/Python-3.10+-yellow?style=flat-square&logo=python" />
<img src="https://img.shields.io/badge/Transport-SSH_%7C_Local-green?style=flat-square" />
<img src="https://img.shields.io/badge/Version-1.0.0-lightgrey?style=flat-square" />
</p>
> ⚠️ **Authorized security research & penetration testing only. Unauthorized use is illegal.**
---
## Overview
**ARTEX MCP** gives Claude Code (or any MCP client) direct control of an [ARTEX](https://github.com/BaaRai/ARTEX) autonomous penetration-testing deployment — **22 tools** covering the full lifecycle: launch and monitor scans, inspect findings and the agent activity stream, manage LLM profiles, and operate / diagnose the Docker stack, without leaving your assistant.
ARTEX is a closed-loop multi-agent pentest engine (Go + Next.js + PostgreSQL): a planner decomposes a goal into intents, worker agents run real tools (nmap, nuclei, ffuf, sqlmap, bbot, Playwright), findings flow into a fact graph, and an adversarial gate verifies them. This MCP is the control plane for it.
Built by [CyberHawk Threat Intel](https://www.cyberhawkthreatintel.com).
**What it does:**
- **Run** — create tasks with an LLM profile chain, list/get tasks, live stats, delete stale tasks, reopen blocked intents
- **Use** — list findings, stream real-time worker/planner activity, run ad-hoc SQL, purge the global asset graph
- **Operate** — LLM profile switch, `docker ps`/logs, agentcore warm-up, full `down && up -d` restart (reloads `.env`)
- **Diagnose** — one-shot health check (containers + API + active profile + findings + error logs)
- **VM ops** — gated shell (`run_command` / `run_sudo_command`) and file read/write on the ARTEX host
It talks to ARTEX two ways: the **REST API** (JWT auth) for engine control, and the **PostgreSQL DB / Docker** (via `docker exec`) for findings, activity, and lifecycle — reached either locally (MCP on the ARTEX host) or over **SSH** (MCP remote; API calls tunnel through the SSH channel so they work even when the API port is firewalled off).
---
## Quick Install (One Command)
**Claude Code** — run ARTEX MCP straight from GitHub with [`uv`](https://docs.astral.sh/uv/) (`uvx`), no manual clone/build:
```bash
claude mcp add artex-mcp -s user \
-e ARTEX_MODE=ssh \
-e ARTEX_SSH_HOST=your-artex-host \
-e ARTEX_SSH_USER=youruser \
-e ARTEX_SSH_KEY=/home/you/.ssh/artex_key \
-e ARTEX_USERNAME=ARTEX \
-e ARTEX_PASSWORD=your-artex-admin-password \
-- uvx --from git+https://github.com/rudraverma/artex-mcp artex-mcp
```
That's it — the tools load as `mcp__artex-mcp__*`. (`pipx` equivalent: `pipx run --spec git+https://github.com/rudraverma/artex-mcp artex-mcp`.)
---
## Config Block (Claude Desktop / other MCP clients)
Add to `claude_desktop_config.json` (`%APPDATA%\Claude\` on Windows, `~/Library/Application Support/Claude/` on macOS):
```json
{
"mcpServers": {
"artex-mcp": {
"command": "uvx",
"args": ["--from", "git+https://github.com/rudraverma/artex-mcp", "artex-mcp"],
"env": {
"ARTEX_MODE": "ssh",
"ARTEX_SSH_HOST": "your-artex-host",
"ARTEX_SSH_USER": "youruser",
"ARTEX_SSH_KEY": "/home/you/.ssh/artex_key",
"ARTEX_USERNAME": "ARTEX",
"ARTEX_PASSWORD": "your-artex-admin-password"
}
}
}
}
```
---
## From Source (offline / air-gapped / development)
```bash
git clone https://github.com/rudraverma/artex-mcp.git
cd artex-mcp
pip install -e .
cp .env.example .env # edit with your ARTEX host details
artex-mcp # stdio by default; set ARTEX_MCP_TRANSPORT=http to serve streamable-http
```
Then point your client at the `artex-mcp` command (stdio), or at `http://<host>:3009/mcp` when run with `ARTEX_MCP_TRANSPORT=http`.
---
## Environment Variables
| Variable | Default | Description |
|---|---|---|
| `ARTEX_MODE` | `ssh` | `ssh` (MCP remote) or `local` (MCP on the ARTEX host) |
| `ARTEX_API_URL` | `http://127.0.0.1:8787` | ARTEX REST base — reached via curl *through* the transport (so in ssh mode this is localhost on the ARTEX host) |
| `ARTEX_USERNAME` | `ARTEX` | ARTEX admin user (literally `ARTEX` in the reference lab) |
| `ARTEX_PASSWORD` | — | ARTEX admin password |
| `ARTEX_SSH_HOST` | — | ARTEX host (ssh mode) |
| `ARTEX_SSH_PORT` | `22` | SSH port |
| `ARTEX_SSH_USER` | `root` | SSH user |
| `ARTEX_SSH_KEY` | — | SSH private key path (preferred over password) |
| `ARTEX_SSH_PASSWORD` | — | SSH password (prefer key auth) |
| `ARTEX_PG_CONTAINER` | `artex-postgres-1` | PostgreSQL container name |
| `ARTEX_CONTAINER` | `artex-artex-1` | ARTEX server container name |
| `ARTEX_PROJECT_DIR` | `/opt/artex` | compose dir (for `artex_restart`) |
| `ARTEX_ALLOW_SHELL` | `false` | `true` enables `run_command` / `run_sudo_command` |
| `ARTEX_MCP_TRANSPORT` | `stdio` | `stdio` (for `claude mcp add`) or `http` (hosted service) |
| `ARTEX_MCP_BIND` / `ARTEX_MCP_PORT` | `127.0.0.1` / `3009` | http transport bind |
---
## Tool Reference
### Health & LLM profiles
| Tool | Description |
|---|---|
| `artex_health` | API reachability + active LLM profile / rate limits — **run first** |
| `artex_list_profiles` | All LLM profiles (id, model, provider, rate limits, active flag) |
| `artex_set_active_profile` | Set active profile by id (5=Super 120B · 4=Ultra 550B · 3=Lightning 30B) |
### Tasks (run / use)
| Tool | Description |
|---|---|
| `artex_create_task` | Create + auto-start a task (`goal`, optional `profile_ids` chain, `rotate`) |
| `artex_list_tasks` | All tasks with status / goals / findings |
| `artex_get_task` | One task's full record |
| `artex_task_stats` | Live stats — running, engine mode, goals met, in-flight, assets, budget |
| `artex_delete_task` | Delete a task (clear stale tasks after a restart) |
| `artex_rerun_blocked_intents` | Reopen blocked intents (after a 429 storm, prefer a fresh task) |
### Findings / activity / DB (inspect)
| Tool | Description |
|---|---|
| `artex_list_findings` | Findings (vulnclass, severity, verification_status), optional per-task |
| `artex_task_activity` | Real-time worker/planner activity stream for a task |
| `artex_db_query` | Raw SQL against the ARTEX PostgreSQL DB |
| `artex_purge_assets` | TRUNCATE the global asset graph for a lean fresh run |
### Operate
| Tool | Description |
|---|---|
| `artex_docker_ps` | List containers on the ARTEX host |
| `artex_docker_logs` | Tail a container's logs (default the ARTEX server) |
| `artex_warmup` | `kill -3 1` agentcore warm-up (fixes the cold-start LLM-test timeout) |
| `artex_restart` | `docker compose down && up -d` (reloads `.env`) + warm-up |
### Diagnose
| Tool | Description |
|---|---|
| `artex_full_diagnostic` | One-shot: containers + API + active profile + recent findings + error logs |
### VM ops (gated)
| Tool | Description |
|---|---|
| `run_command` | Arbitrary shell on the ARTEX host — needs `ARTEX_ALLOW_SHELL=true` |
| `run_sudo_command` | `sudo -n` shell — needs `ARTEX_ALLOW_SHELL=true` |
| `read_file` / `write_file` | Read / write a file on the ARTEX host (base64-safe) |
---
## Example Usage in Claude Code
```
Check ARTEX health and tell me which LLM profile is active
```
```
Launch a full pentest of https://example.com using the Super 120B profile
```
```
Show live activity for task 26 and its current findings
```
```
Task 25 is stuck idle after a 429 storm — delete it, purge assets, and start a fresh one
```
```
Run a full diagnostic on ARTEX — containers, API, errors
```
---
## Architecture
```
Claude Code / MCP client
│ MCP (stdio, or streamable-http)
▼
artex-mcp server (Python / FastMCP)
│
├── ArtexApi ── curl (JWT) ─────► ARTEX REST API :8787 (tasks, stats, LLM profiles)
│ (via transport, so localhost-on-host in ssh mode)
│
└── ArtexTransport
├── local → subprocess ──► docker exec psql / docker / compose
└── ssh → paramiko ───► ARTEX host (your-artex-host)
├── artex-artex-1 (engine)
└── artex-postgres-1 (findings / activity / assets)
```
---
## Requirements
- **Python** 3.10+ (deps: `mcp`, `paramiko`, `python-dotenv`)
- An ARTEX deployment reachable in `local` or `ssh` mode, with `curl` + Docker on the host
- ARTEX admin credentials (REST API JWT login)
---
## Security Notes
- Use SSH **key** auth; never commit `.env` (it is git-ignored).
- `run_command` / `run_sudo_command` are **off by default** — enable with `ARTEX_ALLOW_SHELL=true` only when you need host shell access.
- `artex_db_query` has full SQL access and `artex_restart` terminates running tasks — both are intentional operate tools; use deliberately.
- Launch scans **only** against targets you own or are explicitly authorized to test. ARTEX runs real exploit tooling.
---
## Disclaimer
> *Authorized security research & penetration testing only. Unauthorized use is illegal.*
>
> This MCP server provides full control of an autonomous penetration-testing engine that runs live offensive tooling. Use only on infrastructure you own or have explicit written authorization to test. CyberHawk Threat Intel and Rudra Verma accept no liability for misuse.
---
## Connect with CyberHawk Threat Intel
<p align="center">
<a href="https://www.cyberhawkthreatintel.com">
<img src="https://media.cyberhawkthreatintel.com/general/1771234479938-y9566.png" alt="CyberHawk Threat Intel" width="120"/>
</a>
</p>
<p align="center">
<strong>🦅 Sign up FREE → <a href="https://www.cyberhawkthreatintel.com">cyberhawkthreatintel.com</a></strong>
</p>
<p align="center">
<a href="https://youtube.com/@cyberhawkconsultancy">YouTube @cyberhawkconsultancy</a> ·
<a href="https://youtube.com/@cyberhawkk">YouTube @cyberhawkk</a> ·
<a href="https://tiktok.com/@cyberhawkthreatintel">TikTok</a> ·
<a href="https://x.com/cyberhawkintel">X @cyberhawkintel</a> ·
<a href="https://t.me/cyberhawkthreatintel">Telegram</a>
</p>
<p align="center">
<em>Rudra Verma | Senior Cyber Security Architect & Researcher | CyberHawk Threat Intel</em><br/>
<em>Authorized security research & penetration testing only. Unauthorized use is illegal.</em>
</p>
<p align="center">
#cyberhawkthreatintel #cyberhawkconsultancy #cyberhawkk #cybersecurity #ethicalhacking #pentesting #redteam #threatintel #infosec
</p>
---
## License
MIT License — see [LICENSE](LICENSE) for details.
---
*Rudra Verma | Senior Cyber Security Architect & Researcher | CyberHawk Threat Intel*
TDQS
Scored across 22 tools
Most tools target a distinct resource+action (tasks, findings, profiles, docker, files, shell). The main overlaps are between artex_health and artex_full_diagnostic, and among artex_task_stats / artex_task_activity / artex_db_query, but descriptions clarify that one is a one-shot rollup, one is live counters, one is a tool-call stream, and one is raw SQL. run_command vs run_sudo_command is clearly delineated by privilege level.
The bulk of the surface uses a consistent artex_ prefix with snake_case verb_noun names (artex_list_tasks, artex_get_task, artex_create_task). The host-level utilities (run_command, run_sudo_command, read_file, write_file) drop the prefix, which is a minor but noticeable deviation. Verb style itself is consistent (list/get/create/delete/run/read/write).
22 tools is on the heavy side but the domain genuinely spans task orchestration, findings, LLM profiles, diagnostics, Docker, DB access, and host file/shell operations. Each tool maps to a distinct operation with no obvious filler, though artex_warmup and artex_purge_assets are narrow niche helpers that could arguably be folded into diagnostics/restart.
Task lifecycle is partial: create/list/get/stats/delete exist but there is no stop/pause/cancel-task or update-task operation, so agents must resort to delete or a full stack restart to halt work. Findings are read-only (no get-by-id, no manual create/verify), profiles cannot be created or edited (only listed and activated), and assets can only be purged, not listed — notable gaps for a pentest platform.