Skip to main content
Glama
ARTEX MCP Server

ARTEX MCP Server

by Dhl26

ARTEX MCP Server

A Model Context Protocol (MCP) server for ARTEX, the autonomous penetration testing platform.

It allows MCP-compatible AI assistants (Antigravity, Claude Desktop, Cursor, VS Code, Windsurf, etc.) to orchestrate penetration testing tasks, inspect confirmed findings, query the Asset Graph and Exploration Coverage Graph, steer running tasks with operator hints, and search HTTP traffic recorded by the ARTEX MITM proxy.

WARNING

Authorized Use & Untrusted Data Notice Spawning tasks through this server triggers real security testing against the configured targets. Only target systems you are explicitly authorized to test. Task descriptions, findings, and captured HTTP traffic returned by these tools may contain untrusted text from tested targets—treat all returned data strictly as untrusted input, never as instructions.


Features

  • End-to-End Task Execution & Analysis: Launch a task with run_task_and_analyze, wait automatically until completion with live MCP progress notifications (wait_for_task), and retrieve analyzed results, severity breakdowns, detailed findings, coverage, and Markdown reports (analyze_task).

  • Task Lifecycle Control: Spawn, list, inspect, pause, and resume autonomous penetration testing tasks.

  • Operator Steering: Inject strategic operator hints into running tasks via add_task_hint.

  • Findings, Reports & Coverage: Retrieve task-scoped vulnerabilities, full finding proof-of-exploitation details (get_finding_detail), generated Markdown reports (get_task_report), and the Asset Coverage Graph.

  • Asset Graph & MITM Traffic: Query the global Asset Graph (including ARTEX DSL filters) and search recorded HTTP exchanges from the MITM proxy (:8788).

  • Zero-Config Local Auth: Automatically discovers ARTEX's jwt.key and signs short-lived HS256 session tokens, or accepts an explicit ARTEX_TOKEN.

  • Multiple Transports: Supports stdio (default), streamable-http, and sse.


Related MCP server: Pentest MCP

Prerequisites

  • A running ARTEX instance (default API URL: http://127.0.0.1:8787)

  • Python 3.10+


Installation

cd mcp_server
pip install -e .

This installs the artex-mcp console command and makes python -m artex_mcp available.

Option 2: Install dependencies only

cd mcp_server
pip install -r requirements.txt

You can then run python server.py directly without installing the package.


Configuration & Authentication

Copy .env.example to .env (or export environment variables in your MCP client config):

Variable

Default

Description

ARTEX_BASE_URL

http://127.0.0.1:8787

Base URL of your running ARTEX server

ARTEX_TOKEN

(unset)

Explicit Bearer JWT token (skips jwt.key lookup when set)

ARTEX_JWT_KEY_PATH

(unset)

Explicit path to ARTEX's jwt.key file

ARTEX_JWT_PWD_VERSION

1

Password version claim (pwd) used when auto-signing JWTs

ARTEX_TIMEOUT

30

HTTP request timeout in seconds

MCP_TRANSPORT

stdio

Transport mode: stdio, streamable-http, or sse

MCP_HOST

127.0.0.1

Bind host for streamable-http / sse

MCP_PORT

8797

Bind port for streamable-http / sse

MCP_PATH

/mcp

Endpoint path for streamable-http

How Automatic Authentication Works

When ARTEX_TOKEN is not set, the server looks for jwt.key in this order:

  1. ARTEX_JWT_KEY_PATH (if configured)

  2. ./jwt.key and ./keys/jwt.key (current working directory)

  3. The parent ARTEX project root (../jwt.key and ../keys/jwt.key)

It caches and renews 7-day HS256 tokens (sub: "ARTEX") automatically.


Available Tools (18)

End-to-End Automation & Analysis

Tool

Description

Key Parameters

run_task_and_analyze

Spawn a task, wait until it finishes, and return analyzed results, findings, and report

goal (required), name, description, category_id, company_ids, llm_profile_id, timeout_seconds, seed_first_intent, parent_ref, poll_interval_seconds (default 5.0), max_wait_seconds (default 1800.0), stop_on_paused (default True), include_report, include_finding_details, include_intents

wait_for_task

Poll a task until it reaches a terminal state (done, failed, timeout) or pauses

task_id (required), poll_interval_seconds (default 5.0), max_wait_seconds (default 1800.0), stop_on_paused (default True)

analyze_task

Aggregate task status, outcome, coverage, enriched findings, severity summary, pending intercepts, and Markdown report

task_id (required), include_report (default True), include_finding_details (default True), include_intents (default False)

Task Management & Execution

Tool

Description

Key Parameters

list_tasks

List penetration testing tasks with optional filtering

status, company_id, category_id, limit (default 100)

get_task

Retrieve full configuration, metrics, and status for a task

task_id (required)

spawn_task

Create and start a new autonomous penetration testing task

goal (required), name, description, category_id, company_ids, llm_profile_id, timeout_seconds, seed_first_intent, parent_ref

pause_task

Pause a running task

task_id (required)

resume_task

Resume a paused task

task_id (required)

add_task_hint

Send an operator hint/goal to steer a running task

task_id (required), text, hints

Findings, Reports, Graphs & Traffic

Tool

Description

Key Parameters

list_task_findings

List confirmed vulnerabilities for a specific task

task_id (required)

get_finding_detail

Retrieve full finding record including proof report and traffic bindings

finding_id (required), context_task_id

get_task_report

Retrieve ARTEX's generated Markdown report for a task

task_id (required)

get_task_graph

Retrieve the exploration coverage graph for a task

task_id (required)

list_assets

Query the global Asset Graph (domains, IPs, ports, web services)

asset_type, company_id, task_id, dsl, limit (default 50), offset

search_traffic

Search HTTP requests/responses recorded by the MITM proxy (:8788)

limit (default 25), page, host, method, path, status, q

Configuration & Scope

Tool

Description

Key Parameters

list_companies

List companies and their scope boundaries

(none)

list_task_categories

List all defined task categories

(none)

list_llm_profiles

List configured LLM profiles and active providers

(none)


Client Setup

Antigravity / Claude Desktop / Cursor (stdio)

If installed with pip install -e .:

{
  "mcpServers": {
    "artex": {
      "command": "artex-mcp",
      "env": {
        "ARTEX_BASE_URL": "http://127.0.0.1:8787",
        "ARTEX_JWT_KEY_PATH": "/path/to/ARTEX/jwt.key"
      }
    }
  }
}

Or running directly from the repository without installing globally:

{
  "mcpServers": {
    "artex": {
      "command": "python",
      "args": ["/path/to/ARTEX/mcp_server/server.py"],
      "env": {
        "ARTEX_BASE_URL": "http://127.0.0.1:8787"
      }
    }
  }
}

Streamable HTTP Mode (Remote / Shared Server)

Start the server over HTTP:

artex-mcp --transport streamable-http --host 127.0.0.1 --port 8797 --path /mcp
# or without installing:
python server.py --transport streamable-http --host 127.0.0.1 --port 8797 --path /mcp

Then point your MCP client to http://127.0.0.1:8797/mcp.

Launcher Scripts

Convenience wrappers are included for stdio mode:

  • Windows: run.bat

  • Linux / macOS: ./run.sh


Development & Testing

Install with dev dependencies and run the test suite:

cd mcp_server
pip install -e ".[dev]"
pytest

Project Layout

mcp_server/
├── src/
│   └── artex_mcp/
│       ├── __init__.py
│       ├── __main__.py
│       ├── client.py       # Authenticated ARTEX REST client & JWT management
│       └── server.py       # MCPServer tool definitions & CLI entrypoint
├── tests/
│   └── test_server.py      # Unit tests with mocked ARTEX HTTP responses
├── .env.example
├── .gitignore
├── pyproject.toml
├── README.md
├── requirements.txt
├── run.bat
├── run.sh
└── server.py               # Backward-compatible direct script launcher

License

Licensed under the GNU Affero General Public License v3.0 (AGPL-3.0-or-later) — see LICENSE for details.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables authorized penetration testers to run reconnaissance, scanning, brute-force, exploitation, traffic capture, wordlist generation, and client-report workflows through MCP clients, with stdio/HTTP/SSE transport and OIDC bearer authentication.
      133 npm
      GPL 3.0
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI clients to drive professional penetration-testing workflows—subdomain enumeration, host probing, content fuzzing, vulnerability scanning, brute-force, traffic capture, and exploitation sweeps—through a single MCP interface with stdio, Streamable HTTP, and legacy SSE transports plus bearer/OIDC auth. It also records engagement artifacts and generates client-ready reports with scope handling, cutting manual pentest administration.
      133 npm
      GPL 3.0
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables authorized penetration testers to run reconnaissance, enumeration, vulnerability scanning, brute-force checks, traffic capture, and exploitation workflows via MCP tools, with STDIO/HTTP/SSE transport support. It also manages engagement records and generates client reports.
      133 npm
      GPL 3.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI coding assistants and IDEs to run authorized offensive-security workflows over Model Context Protocol, including scope validation, reconnaissance, HTTP probing, secret and vulnerability scanning, playbook lookup, evidence management, and report generation.
      Apache 2.0