Skip to content

Commit d9eedb1

Browse files
committed
feat: add host option for command-line interface
1 parent b390343 commit d9eedb1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/protocols_io_mcp/__main__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33

44
@click.command()
55
@click.option("--transport", default="stdio", type=click.Choice(['stdio', 'http', 'sse']), help="Transport protocol to use [default: stdio]")
6+
@click.option("--host", default="127.0.0.1", help="Host to bind to when using http and sse transport [default: 127.0.0.1]")
67
@click.option("--port", default=8000, help="Port to bind to when using http and sse transport [default: 8000]")
7-
def main(transport: str, port: int):
8+
def main(transport: str, host: str, port: int):
89
"""Run the protocols.io MCP server."""
910
print("Starting protocols.io MCP server...")
1011
if transport == "stdio":
1112
mcp.run(transport=transport)
1213
else:
13-
mcp.run(transport=transport, port=port)
14+
mcp.run(transport=transport, host=host, port=port)
1415

1516
if __name__ == "__main__":
1617
main()

0 commit comments

Comments
 (0)