Add --host argument for Streamable HTTP mode#27
Add --host argument for Streamable HTTP mode#27sandsc wants to merge 12 commits intopydantic:mainfrom
--host argument for Streamable HTTP mode#27Conversation
mcp_run_python/main.py
Outdated
| http_host: str | None = None, | ||
| dependencies: list[str] | None = None, | ||
| return_mode: Literal['json', 'xml'] = 'xml', | ||
| return_mode: Literal["json", "xml"] = "xml", |
There was a problem hiding this comment.
Can you please revert the changes to quotes?
mcp_run_python/_cli.py
Outdated
| formatter_class=argparse.RawTextHelpFormatter, | ||
| ) | ||
|
|
||
| parser.add_argument('--host', type=str, help='Host to bind the HTTP server to (default: 127.0.0.1). Use 0.0.0.0 for Docker.') |
There was a problem hiding this comment.
This implies a bit too strongly that it's Docker-specific; what do you think about "Use 0.0.0.0 to bind to all interfaces, e.g. when using Docker"
mcp_run_python/deno/src/main.ts
Outdated
| if (args[0] === 'stdio') { | ||
| await runStdio(deps, flags['return-mode']) | ||
| return | ||
| await runStdio(deps, flags['return-mode']); |
There was a problem hiding this comment.
We've got a bunch more linter edits here, including the import sorting up top. can you please revert that so the PR only has the necessary changes?
mcp_run_python/main.py
Outdated
| allow_networking: bool = True, | ||
| ) -> list[str]: | ||
| args = ['run'] | ||
| args = ["run"] |
There was a problem hiding this comment.
All of these edits should really not be necessary, can you please make the diff as small as possible?
--host argument for Streamable HTTP mode
Head branch was pushed to by a user without write access
|
@sandsc Please have a look at the linter check |
| ) | ||
|
|
||
| parser.add_argument( | ||
| '--host', |
There was a problem hiding this comment.
Please update the example command in the readme as well
add --host parameter for streamable-http server to support host mcp-run-python in docker.