You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[feature] Add optional bearer auth to the MCP HTTP gateway #13
Problem this solves
The gateway (localhost:3100) and Ghidra headless (localhost:8089) currently have no authentication. The README already warns that exposing 0.0.0.0:3100 grants arbitrary command execution via shell__exec. Loopback-only binding is safe by default, but there's no safety net if someone deploys this on a shared/cloud VM or changes the port mapping.
Proposed solution
Add a GATEWAY_AUTH_TOKEN env var (mirroring GHIDRA_MCP_AUTH_TOKEN), empty by default for local dev.
When set, require Authorization: Bearer <token> on all /mcp requests.
Document in README: "required if binding to a non-loopback interface."
Acceptance criteria
Gateway rejects requests without valid token when GATEWAY_AUTH_TOKEN is set
No behavior change when the var is unset (backward compatible)
README updated with a warning + example
Affected component(s)
Container / Dockerfile
MCP gateway
Ghidra bridge (bridge_mcp_ghidra.py)
Shell server (shell-mcp.py)
r2mcp / radare2 tools
angr MCP
Agents (.claude/agents/)
CI / build
Docs
Additional context
Relevant links, upstream issues, or prior discussion.
Activity