ExaAiAgent quickstart: install with pip, run a scan, connect over MCP
Originally published at weeklysignalnotes.substack.com. ExaAiAgent is an open-source, AI-powered security testing agent. According to its README, it runs like a penetration tester: it executes code dynamically, finds
Originally published at weeklysignalnotes.substack.com.
ExaAiAgent is an open-source, AI-powered security testing agent. According to its README, it runs like a penetration tester: it executes code dynamically, finds vulnerabilities, and validates them with proof-of-concepts before reporting. It is licensed under Apache 2.0 and published on PyPI as exaai-agent (version 3.1.2 at the time of writing).
This guide gets you from zero to a first scan, then shows how to plug the tool into an MCP client.
Authorized testing only. Run ExaAiAgent only against applications you own or have explicit permission to test. The README carries the same warning: you are responsible for using it ethically and legally.
What you need
- Python 3.12 or newer
- Docker, installed and running (the tool runs its security tools in a Docker sandbox)
- An LLM provider: the README lists OpenAI, Anthropic, OpenRouter, Ollama, or any compatible provider, through LiteLLM
1. Install
pip install exaai-agent
# or: pipx install exaai-agent
If the shell says exaai: command not found afterwards, open a new terminal. With pipx, run pipx ensurepath once. On externally managed Linux systems, use a virtual environment (python3 -m venv venv && source venv/bin/activate).
2. Choose your model
Set the model and key in the same shell you will run the tool from:
export EXAAI_LLM="openai/gpt-5"
export LLM_API_KEY="your-openai-key"
For a local model with Ollama, the README uses:
export EXAAI_LLM="ollama/llama3"
export LLM_API_BASE="http://localhost:11434"
Modern models need a recent litellm. If you see a connection or model-not-found error, run pip install -U litellm.
3. Run your first assessment
exaai --target https://your-app.com
The first run pulls the sandbox Docker image automatically. Prompt modules are detected from the target, and results are saved to exaai_runs/. Other target forms from the README:
# Local codebase
exaai --target ./app-directory
# GitHub repository review
exaai --target https://github.com/org/repo
# Headless / CI mode
exaai -n --target https://your-app.com
# Interactive TUI
exaai tui
To keep a scan inside a scope you set, the README documents an EXAAI_TARGETS variable (enforced target scope) and a per-scan token budget, EXAAI_MAX_SCAN_TOKENS.
4. Connect it to an MCP client
Version 3.1.x adds an MCP server. One command starts it over stdio:
exaai mcp
The README says any MCP client, such as Claude or Cursor, can use it. In your client, register a stdio server whose command is exaai with the argument mcp (the exact settings screen depends on the client). The project changelog lists four tools the server exposes: exaai_run_scan, exaai_cve_lookup, exaai_list_runs and exaai_get_report. A scan started through MCP still requires the target to match EXAAI_TARGETS, and it returns a concise summary instead of the raw report.
5. Watch it live: dashboard v2
The same release adds a dashboard with live events over WebSocket. By default it binds to 127.0.0.1:8000, so open http://127.0.0.1:8000 on the same machine.
If something fails
- Docker errors: run docker info, and make sure the daemon is running
- 401 or 403 from the provider: check that EXAAI_LLM and LLM_API_KEY are exported in the same shell
- Sandbox exits immediately: check disk space and RAM, then try docker pull ghcr.io/hleliofficiel/exaai-sandbox:1.0
Links
By the PayFopus team.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.