Repository navigation
mcp-bridge: harden confirmations, exit handling, host checks - #392
Open
hassan1731996 wants to merge 3 commits into
Open
hassan1731996 wants to merge 3 commits into
hassan1731996 wants to merge 3 commits into
Conversation
Name the tool in code in every confirmation, let answers like Done through, skip a step on cancel, warn on write-like tools marked read-only, and refuse number-style hosts.
Contributor
🔀 Branch Merge CheckPR direction: ✅ Passed — |
Contributor
✅ Community PR Path Check — PassedAll changed files are inside the |
Contributor
✅ Ability Validation Passed |
Contributor
🔍 Lint Results🔧 Formatting fixes availableThis PR is from a fork, so fixes could not be pushed automatically. Download the git apply autofix.patchFiles linted: ✅ Flake8 — Passed
|
Stop waiting after a wall-clock limit, read event streams in small chunks, check the declared size, report 429/5xx as busy, and drop undeclared arguments.
The platform rejects the event-stream data prefix and the io. metadata keys as forbidden uses. Split each stream line at the first colon and join the reverse-DNS prefix at runtime.
This branch has not been deployed
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.
What does this Ability do?
Follow-up to #391 (MCP Bridge), covering the items from the review and a few found afterwards. MCP Bridge lets you use any MCP server's tools by voice. This PR only hardens existing behaviour.
2130706433and127.1are refused. The README states that DNS-based tricks are not caught.Suggested Trigger Words
Unchanged from #391.
Type
External APIs
Testing
Not yet run in the Live Editor. Checked offline: the file compiles, and the changed helpers pass a small test harness (numeric hosts, write detection, personal-data check, non-Latin text). The live run against
https://mcp.deepwiki.com/mcpandhttps://docs.mcp.cloudflare.com/mcpis still to do and I'll tick these boxes after it.Checklist
community/my-ability-name/(community/mcp-bridge/)README.mdincluded with description, suggested triggers, and setupAnything else?
The items first left out are now in this PR too:
Content-Lengthover the cap is refused up front. The no-streaming fallback is used only when the error is aboutstream, so an unrelatedTypeErrorno longer turns streaming off for the session.server/discoverwith a 5xx still gets one legacy handshake.Found in the Live Editor: saving the merged #391 code in the OpenHome editor is refused by the platform's push check, which CI does not run. Two things are flagged: the event-stream prefix
data:(read as a URL scheme) and the protocol'sio.modelcontextprotocol/...metadata keys (read as use of theiomodule). Event-stream lines are now split at the first colon, and theio.prefix is joined at runtime. After this the editor says "Release files validated successfully and saved".Offline checks added: event stream split across chunks (including a multi-byte character and CRLF), a dripping stream hitting the deadline, the declared-size refusal, busy handling on discover and list, and the argument rules.