pentester4codex
v0.2.4
Published
Expose PentestAgent tools over MCP stdio for Codex (requires GH05TCREW/pentestagent installed).
Maintainers
Readme
pentester4codex
MCP stdio server wrapper for PentestAgent tools. Props to GH05TCREW (MIT) for PentestAgent.
Original project:
https://github.com/GH05TCREW/pentestagentWhat You Get
This package exposes PentestAgent tools over MCP stdio so any MCP client (like Codex) can call them. It does not install PentestAgent for you.
Prerequisites (Required)
- Python 3.10+
- PentestAgent installed (from GH05TCREW/pentestagent)
Install PentestAgent from source:
git clone https://github.com/GH05TCREW/pentestagent
cd pentestagent
python3 -m venv .venv
. .venv/bin/activate
python3 -m pip install -e ".[all]"Verify:
. .venv/bin/activate
pentestagent --helpInstall (This Package)
npm i -g pentester4codexVerify:
pentester4codex --helpStart The MCP Server
pentester4codex --timeout 300Optional:
--dockerruns tools inside Docker (requires Docker).
Codex Setup (Plug‑In)
Recommended (Codex CLI):
codex mcp add pentester4codex /path/to/pentestagent/.venv/bin/python -m pentestagent.mcp.tools_server --timeout 300Replace /path/to/pentestagent with your local clone. Example:
codex mcp add pentester4codex /Users/native/Desktop/coding/pentestagent-main/.venv/bin/python -m pentestagent.mcp.tools_server --timeout 300Then restart Codex.
Alternate (Config File): create or update ~/.codex/mcp_servers.json:
{
"mcpServers": {
"pentester4codex": {
"command": "/path/to/pentestagent/.venv/bin/python",
"args": ["-m", "pentestagent.mcp.tools_server", "--timeout", "300"]
}
}
}Restart Codex. You should now see tools from pentester4codex.
Troubleshooting
If Codex can’t find the server, confirm
pentester4codexis on PATH:which pentester4codexIf tools fail, ensure
pentestagentis installed:which pentestagentIf Codex reports an MCP handshake error, make sure you are not using
--include-mcpwhen the server is listed inside the same MCP config. It can recurse and break startup. Use the exact CLI/config commands above.
Environment
PENTESTAGENT_MCP_EXCLUDE_TOOLS: comma-separated tool names to hidePENTESTAGENT_WEBSEARCH_MCP_SERVER: forwardweb_searchto an MCP serverPENTESTAGENT_WEBSEARCH_MCP_TOOL: tool name on that server (default:web_search)
