Skip to content

Add configurable MCP transport CLI (stdio/sse/streamable-http) for network deployments - #61

Draft
universea with Copilot wants to merge 7 commits into
mainfrom
copilot/add-transport-cli-flag
Draft

Add configurable MCP transport CLI (stdio/sse/streamable-http) for network deployments#61
universea with Copilot wants to merge 7 commits into
mainfrom
copilot/add-transport-cli-flag

Conversation

Copilot AI commented Apr 21, 2026

Copy link
Copy Markdown

paper_search_mcp.server:main() was hardcoded to transport="stdio", which blocked direct use in containerized and remote MCP deployments. This PR adds an additive CLI transport surface while preserving existing subprocess behavior by default.

  • CLI transport and network options

    • Added --transport {stdio,sse,streamable-http} (default: stdio)
    • Added --host, --port, and --path flags to support networked serving modes
    • Kept default behavior unchanged for existing stdio consumers
  • Transport-specific runtime wiring

    • sse / streamable-http: apply host and port
    • streamable-http: apply path (streamable_http_path)
    • stdio: ignore network-only options
  • Input validation

    • Added strict port validation (1..65535) with clear argparse error messages for invalid/non-integer input
  • Dependency floor update

    • Bumped mcp[cli] minimum version from >=1.6.0 to >=1.8.0 to align with streamable-http availability
  • Docs and focused coverage

    • Updated README with example invocations for sse and streamable-http
    • Added tests/test_server_main.py to cover defaults, transport option application, and invalid port cases
# default (unchanged)
paper-search-mcp

# network transports
paper-search-mcp --transport sse --host 0.0.0.0 --port 8000
paper-search-mcp --transport streamable-http --host 0.0.0.0 --port 8000 --path /mcp

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • api.archives-ouvertes.fr
    • Triggering command: /usr/bin/python python -m unittest discover -s tests -p test_*.py (dns block)
  • api.base-search.net
    • Triggering command: /usr/bin/python python -m unittest discover -s tests -p test_*.py (dns block)
  • api.biorxiv.org
    • Triggering command: /usr/bin/python python -m unittest discover -s tests -p test_*.py (dns block)
  • api.crossref.org
    • Triggering command: /usr/bin/python python -m unittest discover -s tests -p test_*.py (dns block)
  • api.medrxiv.org
    • Triggering command: /usr/bin/python python -m unittest discover -s tests -p test_*.py (dns block)
  • api.openaire.eu
    • Triggering command: /usr/bin/python python -m unittest discover -s tests -p test_*.py (dns block)
  • api.semanticscholar.org
    • Triggering command: /usr/bin/python python -m unittest discover -s tests -p test_*.py (dns block)
  • citeseerx.ist.psu.edu
    • Triggering command: /usr/bin/python python -m unittest discover -s tests -p test_*.py (dns block)
  • dblp.org
    • Triggering command: /usr/bin/python python -m unittest discover -s tests -p test_*.py (dns block)
  • doaj.org
    • Triggering command: /usr/bin/python python -m unittest discover -s tests -p test_*.py (dns block)
  • eprint.iacr.org
    • Triggering command: /usr/bin/python python -m unittest discover -s tests -p test_*.py (dns block)
  • export.arxiv.org
    • Triggering command: /usr/bin/python python -m unittest discover -s tests -p test_*.py (dns block)
  • scholar.google.com
    • Triggering command: /usr/bin/python python -m unittest discover -s tests -p test_*.py (dns block)
  • sci-hub.se
    • Triggering command: /usr/bin/python python -m unittest discover -s tests -p test_*.py (dns block)
  • zenodo.org
    • Triggering command: /usr/bin/python python -m unittest discover -s tests -p test_*.py (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI and others added 6 commits April 21, 2026 14:56
Agent-Logs-Url: https://github.com/openags/paper-search-mcp/sessions/de1c21f4-b05f-4f21-8ebc-c8af21442afd

Co-authored-by: universea <13444641+universea@users.noreply.github.com>
Agent-Logs-Url: https://github.com/openags/paper-search-mcp/sessions/de1c21f4-b05f-4f21-8ebc-c8af21442afd

Co-authored-by: universea <13444641+universea@users.noreply.github.com>
Agent-Logs-Url: https://github.com/openags/paper-search-mcp/sessions/de1c21f4-b05f-4f21-8ebc-c8af21442afd

Co-authored-by: universea <13444641+universea@users.noreply.github.com>
Copilot AI changed the title [WIP] Add --transport CLI flag for containerized deployments Add configurable MCP transport CLI (stdio/sse/streamable-http) for network deployments Apr 21, 2026
Copilot AI requested a review from universea April 21, 2026 15:07
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.

feature: add --transport CLI flag (stdio/sse/streamable-http) for containerized deployments

2 participants