Skip to content

Conversation

willccbb
Copy link
Member

Summary

  • replace the custom stdio bridge with a generic streamable HTTP helper that configures native MCP endpoints using placeholder-aware launch arguments
  • document how to spin up or connect to StreamableHTTP servers following the official MCP guidance and point to a real remote provider example
  • drop bridge-only dependencies now that the environment no longer vendors an HTTP proxy

Testing

  • python -m compileall environments/mcp_env/src
  • python - <<'PY'
    import sys
    from pathlib import Path
    sys.path.append(str(Path('environments/mcp_env').resolve()))

from mcp_env import build_streamable_http_server_config

config = build_streamable_http_server_config(
name="demo",
command="uv",
args=["run", "script.py", "--", "--port", "{port}", "--host", "{host}", "--url", "{url}"],
)
print(config["url"])
print(config["args"])
PY


https://chatgpt.com/codex/tasks/task_e_68cd8600593c83268b073194eef6feb2


formatted_args: List[str] | None = None
if args is not None:
formatted_args = [arg.format(**format_kwargs) for arg in args]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Port Placeholder Causes Malformed Command Args

When url is provided to build_streamable_http_server_config without an explicit port, the port variable remains None because port allocation is skipped. This causes {port} placeholders in command args to format as the string "None", resulting in malformed arguments for launched processes.

Fix in Cursor Fix in Web

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant