Skip to content

Add CLI host/port options for HTTP transports and enforce stdio validation#82

Closed
cccs-eric wants to merge 1 commit intoacryldata:mainfrom
cccs-eric:click_host_port
Closed

Add CLI host/port options for HTTP transports and enforce stdio validation#82
cccs-eric wants to merge 1 commit intoacryldata:mainfrom
cccs-eric:click_host_port

Conversation

@cccs-eric
Copy link
Copy Markdown

@cccs-eric cccs-eric commented Feb 17, 2026

This PR adds --host and --port CLI options to configure network binding when running the MCP server over HTTP-based transports, and prevents invalid usage with stdio. This is particularly useful in Docker based deployments.

It also partially fixes issue #28.


Note

Low Risk
Small CLI and startup-parameter change with defaults preserving existing behavior; main risk is misconfiguration of network binding for HTTP/SSE deployments.

Overview
Adds --host and --port CLI options to control bind address/port when running the server with --transport http or sse, and wires these through to mcp.run (keeping stateless_http only for http).

Rejects invalid combinations by raising a click.UsageError if --host/--port are provided with --transport stdio, and adds a CLI test to enforce this behavior.

Written by Cursor Bugbot for commit 1d77d18. This will update automatically on new commits. Configure here.

@cccs-eric
Copy link
Copy Markdown
Author

I’ve noticed that several community members want to run this MCP server in a shared mode, which the current implementation doesn’t support. I believe I’m the third person to open a similar PR, which suggests the broader vision may not be fully clear yet.

After reading @alexsku’s comment, the rationale makes sense to me. Would you consider adding a brief section to the README that articulates the project’s intended deployment model and vision? I’m happy to align with that approach—in fact, I’ve already implemented something similar while adding features I plan to contribute—but clarifying the vision for the community would go a long way.

If this approach isn’t likely to be merged, I’m happy to close the PR to keep the queue clean—please let me know.

@cccs-eric
Copy link
Copy Markdown
Author

Closing this PR in favor of #83.

@cccs-eric cccs-eric closed this Feb 18, 2026
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.

1 participant