P13-T4: Add stdio proxy mode for compatibility with existing MCP clients#66
Merged
Conversation
…awn CLI flags, and unit tests
…ting MCP clients (PASS)
…-P13-T4-2 (reconnect param)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Implements P13-T4: stdio proxy mode for the persistent broker. Adds
BrokerProxy.run()(replacing the stub from P13-T1) and two new CLI flags (--broker-connect,--broker-spawn) so existing MCP clients (Cursor, Claude, Codex) can transparently route through the broker with a one-line config change. The legacy direct mode is the default and is unaffected.Changed areas:
src/mcpbridge_wrapper/broker/proxy.py— fullBrokerProxyimplementation (bidirectional stdio ↔ Unix socket forwarding, auto-spawn support, connection timeout)src/mcpbridge_wrapper/__main__.py—_parse_broker_args()+ broker-mode branch inmain()tests/unit/test_broker_proxy.py— 15 new unit teststests/unit/test_broker_stubs.py— updated stub test to reflect implemented classSPECS/— PRD, validation report, archive, follow-up tasksValidation report:
SPECS/ARCHIVE/P13-T4_Add_stdio_proxy_mode/P13-T4_Validation_Report.mdType of Change
Quality Gates
make test- All tests pass with ≥90% coverage (533 passed, 90.5% total coverage)make lint- No linting errors (ruff check src/— all checks passed)make format- Code is properly formattedmake typecheck- Type checking passes (mypy src/— no issues in 18 source files)make doccheck- Documentation is synced with DocC (if docs changed)Documentation Sync
Testing
test_broker_proxy.py)Checklist