Claude Code¶
Wire justpen-browser-mcp into Claude Code.
Prerequisites¶
- Claude Code installed and authenticated
justpen-browser-mcpinstalled and onPATH(see Install)
Registration¶
Add to your Claude Code MCP config:
{
"mcpServers": {
"justpen-browser": {
"command": "justpen-browser-mcp"
}
}
}
Running outside the install venv¶
If Claude Code runs outside the venv where justpen-browser-mcp is installed,
use an explicit interpreter path:
{
"mcpServers": {
"justpen-browser": {
"command": "/absolute/path/to/.venv/bin/python",
"args": ["-m", "justpen_browser_mcp"]
}
}
}
Telemetry¶
For stdio, add an env object inside the mcpServers.justpen-browser entry:
{
"env": {
"JUSTPEN_BROWSER_OTEL_ENABLED": "true",
"JUSTPEN_BROWSER_OTEL_ENDPOINT": "http://127.0.0.1:4318",
"JUSTPEN_SESSION_ID": "pentest-example",
"JUSTPEN_BROWSER_OTEL_RESOURCE_ATTRIBUTES": "justpen.run.id=run-example"
}
}
For HTTP, set these variables on the separately started server process. See Telemetry for session ownership, collector settings and the measured native tracing limits.
Sanity check¶
After registering, ask Claude Code to list available MCP servers / tools. The
justpen-browser server should appear with its lifecycle, navigation, and
interaction tools.
Common pitfalls¶
command not found— thejustpen-browser-mcpscript is not on thePATHClaude Code sees. Use the absolute-path form above.- Headless mode —
browser_create_instancedefaults toheadless=true. Passheadless=falseto the tool call when you want to watch the browser for debugging. - Transport selection — these examples use stdio. The server also
supports HTTP when started with
--transport http; configure your client for Streamable HTTP athttp://127.0.0.1:8931/mcpto use it. See Run the server, including its warning about the lack of built-in authentication.
Reference¶
Canonical Claude Code MCP config docs: see the Claude Code documentation site for the up-to-date config schema.