Skip to content

MCP bridge requests fail with 502 error when system proxy is enabled on Windows #41

@dzahaines

Description

@dzahaines

When system proxy is enabled on Windows, the MCP bridge makes HTTP requests through the system proxy instead of connecting directly to localhost:9009. This causes 502 Bad Gateway errors because the proxy tries to forward localhost requests externally.

The issue is in bridge/binja_mcp_bridge.py where requests.get() and requests.post() calls automatically use the system proxy settings from environment variables (HTTP_PROXY, HTTPS_PROXY) or Windows proxy configuration.

The fix is to explicitly disable proxy usage for the requests library. Create a requests.Session(), set trust_env=False to ignore environment proxy variables, and set proxies={} to ensure no proxy is used. Then use this session for all HTTP requests instead of the module-level requests functions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions