Skip to content

feat: add --host argument to support remote port binding#48

Open
ChineseAStar wants to merge 1 commit intozinja-coder:mainfrom
ChineseAStar:support-remote
Open

feat: add --host argument to support remote port binding#48
ChineseAStar wants to merge 1 commit intozinja-coder:mainfrom
ChineseAStar:support-remote

Conversation

@ChineseAStar
Copy link

Description

Currently, when running the server in HTTP mode (--http), it implicitly binds to 127.0.0.1. This makes it impossible to access the MCP server remotely or run it effectively within Docker containers or remote VMs.

This PR introduces a --host parameter to the command-line interface, allowing users to specify the IP address the server should bind to. Users can now easily bind to 0.0.0.0 or any specific network interface for remote access, while keeping the default behavior secure.

Changes

  • Added a --host argument to argparse with a default value of 127.0.0.1 to maintain the existing secure behavior.
  • Passed the host argument to mcp.run(transport="streamable-http", host=args.host, port=args.port) inside jadx_mcp_server.py.

How to Test

  1. Test default behavior (Localhost only):

    uv run jadx_mcp_server.py --http

    Verify that the server only listens on 127.0.0.1.

  2. Test remote access binding:

    uv run jadx_mcp_server.py --http --host 0.0.0.0

    Verify that the server successfully binds to 0.0.0.0 and can be accessed via your local network IP.

@Haicaji
Copy link

Haicaji commented Mar 16, 2026

I have made more comprehensive modifications: #49
I have also modified jadx-ai-mcp: zinja-coder/jadx-ai-mcp#86

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants