Repository navigation
fix(installer): keep IPv6 brackets in generated transport URLs - #529
Merged
mrexodia merged 2 commits intoSep 21, 2026
Merged
Conversation
urlparse() strips the brackets from an IPv6 literal, so re-joining hostname and port with ":" produced authorities no client can parse (http://::1:13337/mcp). Route every authority through one helper that re-brackets a host containing a colon.
mrexodia
requested changes
Sep 21, 2026
| ":" produces an authority that no client can parse: http://::1:13337/mcp. | ||
| """ | ||
|
|
||
| import unittest |
Contributor
Author
There was a problem hiding this comment.
Removed in 593600c — the test file is gone and the installer change is untouched.
Removed at review, as requested on mrexodia#529.
Lesereingrape
had a problem deploying
to
external-pr
September 21, 2026 14:48 — with
GitHub Actions
Failure
This branch had an error being 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.
Closes #528
Problem
installer.pyrebuilt URL authorities fromurlparse(...).hostname, andurlparsestrips the brackets from an IPv6 literal. Re-joining host and portwith
":"therefore producedhttp://::1:13337/mcp, which is not a validauthority:
--configaborted with a traceback, and--installaborted afterinstall_ida_plugin()had already copied the plugin, i.e. half an install.This is the second half of #525. That change made a wildcard IPv6 bind
discoverable (
_connectable_host("::") == "::1"),server._resolve_ida_rpccopies the discovered host into
installer.IDA_HOST(server.py:245), and theinstaller then formatted it without brackets.
Change
One helper,
_transport_authority(host, port), that re-brackets a hostcontaining a colon, used at the six sites that build an authority:
normalize_transport_url,force_mcp_path, the twostreamable-http/ssebranches in
generate_mcp_config, and the two literals inprint_mcp_config.server.py:194(DEFAULT_IDA_RPC, help text) andidalib_server.py:317(download base URL) have the same shape; I left them outto keep this PR to the client-configuration path — happy to follow up if you
want them in scope.
Measurements (Windows 11, Python 3.12, base
cae2fa8)Measured with a throwaway
tests/test_installer_transport_url.py(6 tests),which the review asked to remove, so the branch now carries the
installer.pychange only:
4 failed, 2 passed— the two passing ones were the IPv4 / named-hostcontrols, so the failure was specific to IPv6
8 passed(that file + the existingtests/test_installer_scope_messages.py)Full
pytest tests -q, A/B on the same interpreter:cae2fa8without this change:1 failed, 248 passed, 114 subtests passed1 failed, 254 passed, 114 subtests passedThe one failure in both runs is pre-existing and unrelated:
tests/test_mcp_spec_http_e2e.py::Http11TransportTests::test_single_threaded_stop_closes_idle_keepalive_connection(I reproduced it on an untouched base worktree).
End to end, on base:
and with the patch the same command exits 0 and prints
"url": "http://[::1]:13337/mcp".ruff checkreports 2 findings oninstaller.py(I001on the import block,TRY002on the pre-existingraise Exception); it reports the same 2 on base,so this change adds none.
Note on CI
.github/workflows/idalib-tests.ymlis the only workflow and it runsida-mcp-testin the IDA containers, notpytest tests, so the suite above isnot exercised here. To run it without IDA installed:
Authorship disclosure
This PR was authored by an AI agent (no human reviewed the diff before
submission). All measurements above were executed and recorded by the agent on
the commits in this branch; the diff is now 1 file, +22/-6, after
593600cremoved the test file at review.