mcp-combiner 0.21.0.dev2__tar.gz → 0.21.2.dev1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/CHANGELOG.md +17 -1
  2. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/PKG-INFO +8 -8
  3. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/README.md +4 -4
  4. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/asgi.py +16 -1
  5. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/binding.py +47 -0
  6. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/pyproject.toml +4 -4
  7. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_binding.py +41 -1
  8. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/uv.lock +1 -1
  9. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/.gitignore +0 -0
  10. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/.python-version +0 -0
  11. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/LICENSE +0 -0
  12. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/__init__.py +0 -0
  13. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/__main__.py +0 -0
  14. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/auth.py +0 -0
  15. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/authprompt.py +0 -0
  16. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/backing.py +0 -0
  17. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/config.py +0 -0
  18. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/connections.py +0 -0
  19. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/ctl.py +0 -0
  20. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/era.py +0 -0
  21. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/externalservers.py +0 -0
  22. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/fastvalidate.py +0 -0
  23. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/handover.py +0 -0
  24. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/heldcalls.py +0 -0
  25. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/inbound_auth.py +0 -0
  26. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/isolated.py +0 -0
  27. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/listen.py +0 -0
  28. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/listpaging.py +0 -0
  29. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/meta_tools.py +0 -0
  30. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/middleware.py +0 -0
  31. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/mockserver.py +0 -0
  32. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/mounts.py +0 -0
  33. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/notifications.py +0 -0
  34. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/nvim_channel.py +0 -0
  35. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/nvim_proxy.py +0 -0
  36. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/permissions.py +0 -0
  37. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/proxyfactory.py +0 -0
  38. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/py.typed +0 -0
  39. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/resume_transport.py +0 -0
  40. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/routes.py +0 -0
  41. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/runtime.py +0 -0
  42. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/schema.py +0 -0
  43. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/schemafix.py +0 -0
  44. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/server.py +0 -0
  45. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/sharedserver.py +0 -0
  46. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/status.py +0 -0
  47. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/toolcache.py +0 -0
  48. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/ui_host/__init__.py +0 -0
  49. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/ui_host/advertise.py +0 -0
  50. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/ui_host/holder.py +0 -0
  51. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/ui_host/routes.py +0 -0
  52. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/ui_host/sessions.py +0 -0
  53. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/ui_host/static/app-bridge.bundle.js +0 -0
  54. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/ui_host/templates.py +0 -0
  55. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/upstream_era.py +0 -0
  56. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/upstream_listen.py +0 -0
  57. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/mcp_combiner/upstream_session.py +0 -0
  58. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/pyrightconfig.json +0 -0
  59. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/conftest.py +0 -0
  60. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/fakes.py +0 -0
  61. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/fixtures/servers.json +0 -0
  62. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_advertised_origin.py +0 -0
  63. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_app_meta.py +0 -0
  64. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_auth.py +0 -0
  65. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_authprompt.py +0 -0
  66. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_combiner_reconnect.py +0 -0
  67. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_config.py +0 -0
  68. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_connections.py +0 -0
  69. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_ctl_lifecycle.py +0 -0
  70. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_elicit_e2e.py +0 -0
  71. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_era.py +0 -0
  72. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_externalservers.py +0 -0
  73. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_handover.py +0 -0
  74. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_inbound_auth.py +0 -0
  75. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_isolated.py +0 -0
  76. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_isolated_lifecycle_e2e.py +0 -0
  77. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_isolated_stdio.py +0 -0
  78. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_listpaging.py +0 -0
  79. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_live_claude.py +0 -0
  80. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_mockserver.py +0 -0
  81. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_mounts.py +0 -0
  82. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_notifications.py +0 -0
  83. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_notifications_e2e.py +0 -0
  84. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_nvim_channel.py +0 -0
  85. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_nvim_e2e.py +0 -0
  86. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_oauth_mock.py +0 -0
  87. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_permissions.py +0 -0
  88. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_public_url.py +0 -0
  89. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_reload_config.py +0 -0
  90. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_resume_transport.py +0 -0
  91. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_route_matrix.py +0 -0
  92. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_schema_fixes.py +0 -0
  93. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_session_filter.py +0 -0
  94. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_session_independence.py +0 -0
  95. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_sharedserver.py +0 -0
  96. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_tool_fetch_wedge.py +0 -0
  97. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_ui_host.py +0 -0
  98. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_upstream_restart.py +0 -0
  99. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_upstream_session.py +0 -0
  100. {mcp_combiner-0.21.0.dev2 → mcp_combiner-0.21.2.dev1}/tests/test_visibility_and_reset_e2e.py +0 -0
@@ -4,7 +4,23 @@ All notable changes to the combiner are documented here. The version moves in
4
4
  lockstep with the rest of the repo (`scripts/bump-version.sh`); releases are
5
5
  tagged `vX.Y.Z`.
6
6
 
7
- ## [Unreleased]
7
+ ## [0.21.1] — 2026-11-03
8
+
9
+ ### Added
10
+
11
+ - Startup warning when `oauth.public_url` or the advertised widget origin is a
12
+ plain `http` URL on the combiner's own port naming an address the combiner
13
+ isn't listening on (or a name that doesn't resolve) — OAuth redirects and
14
+ widget links there would land nowhere. `https` URLs and other ports are
15
+ taken to be proxied (e.g. `tailscale serve`) and aren't checked; a wildcard
16
+ bind covers everything.
17
+
18
+ ## [0.21.0] — 2026-11-03
19
+
20
+ Upgrade note: list responses are now paged (1000 items by default). Every
21
+ client we ship follows `nextCursor`, as do Claude Code and the standard SDKs;
22
+ for a client that doesn't, `MCP_COMBINER_LIST_PAGE_SIZE=0` restores single
23
+ responses.
8
24
 
9
25
  ### Added
10
26
 
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: mcp-combiner
3
- Version: 0.21.0-dev.2
3
+ Version: 0.21.2-dev.1
4
4
  Summary: An MCP aggregator — fronts multiple MCP servers behind a single Streamable HTTP endpoint, shareable across clients.
5
- Project-URL: Homepage, https://github.com/georgeharker/mcp-companion
6
- Project-URL: Repository, https://github.com/georgeharker/mcp-companion
7
- Project-URL: Issues, https://github.com/georgeharker/mcp-companion/issues
5
+ Project-URL: Homepage, https://github.com/georgeharker/mcp-combiner
6
+ Project-URL: Repository, https://github.com/georgeharker/mcp-combiner
7
+ Project-URL: Issues, https://github.com/georgeharker/mcp-combiner/issues
8
8
  Author-email: George Harker <george@georgeharker.com>
9
9
  License-Expression: MIT
10
10
  License-File: LICENSE
@@ -27,8 +27,8 @@ Description-Content-Type: text/markdown
27
27
  An **MCP aggregator** — fronts multiple MCP servers behind a single Streamable HTTP endpoint, so
28
28
  one connection exposes every backend server's tools. Built on
29
29
  [FastMCP](https://github.com/jlowin/fastmcp). Shareable across clients (via `sharedserver`), it
30
- powers the [mcp-companion](https://github.com/georgeharker/mcp-companion) Neovim plugin and the
31
- [`mcp-combiner`](https://github.com/georgeharker/mcp-companion/tree/main/plugins/claude) Claude Code plugin, and works standalone with any MCP client.
30
+ powers the [mcp-combiner](https://github.com/georgeharker/mcp-combiner) Neovim plugin and the
31
+ [`mcp-combiner`](https://github.com/georgeharker/mcp-combiner/tree/main/plugins/claude) Claude Code plugin, and works standalone with any MCP client.
32
32
 
33
33
  > PyPI package · command · import package: **`mcp-combiner`** / `mcp-combiner` / `mcp_combiner`.
34
34
 
@@ -48,11 +48,11 @@ Needs only [uv](https://docs.astral.sh/uv/) — `uvx` fetches and runs it, no ve
48
48
  ```bash
49
49
  uvx mcp-combiner --help # once published to PyPI
50
50
  # before PyPI (or to track main) — the package lives in the combiner/ subdirectory:
51
- uvx --from "git+https://github.com/georgeharker/mcp-companion#subdirectory=combiner" mcp-combiner
51
+ uvx --from "git+https://github.com/georgeharker/mcp-combiner#subdirectory=combiner" mcp-combiner
52
52
  ```
53
53
 
54
54
  Or install it: `uv pip install mcp-combiner` (PyPI), or from the repo subdir
55
- `uv pip install "git+https://github.com/georgeharker/mcp-companion#subdirectory=combiner"`.
55
+ `uv pip install "git+https://github.com/georgeharker/mcp-combiner#subdirectory=combiner"`.
56
56
 
57
57
  ## Usage
58
58
 
@@ -3,8 +3,8 @@
3
3
  An **MCP aggregator** — fronts multiple MCP servers behind a single Streamable HTTP endpoint, so
4
4
  one connection exposes every backend server's tools. Built on
5
5
  [FastMCP](https://github.com/jlowin/fastmcp). Shareable across clients (via `sharedserver`), it
6
- powers the [mcp-companion](https://github.com/georgeharker/mcp-companion) Neovim plugin and the
7
- [`mcp-combiner`](https://github.com/georgeharker/mcp-companion/tree/main/plugins/claude) Claude Code plugin, and works standalone with any MCP client.
6
+ powers the [mcp-combiner](https://github.com/georgeharker/mcp-combiner) Neovim plugin and the
7
+ [`mcp-combiner`](https://github.com/georgeharker/mcp-combiner/tree/main/plugins/claude) Claude Code plugin, and works standalone with any MCP client.
8
8
 
9
9
  > PyPI package · command · import package: **`mcp-combiner`** / `mcp-combiner` / `mcp_combiner`.
10
10
 
@@ -24,11 +24,11 @@ Needs only [uv](https://docs.astral.sh/uv/) — `uvx` fetches and runs it, no ve
24
24
  ```bash
25
25
  uvx mcp-combiner --help # once published to PyPI
26
26
  # before PyPI (or to track main) — the package lives in the combiner/ subdirectory:
27
- uvx --from "git+https://github.com/georgeharker/mcp-companion#subdirectory=combiner" mcp-combiner
27
+ uvx --from "git+https://github.com/georgeharker/mcp-combiner#subdirectory=combiner" mcp-combiner
28
28
  ```
29
29
 
30
30
  Or install it: `uv pip install mcp-combiner` (PyPI), or from the repo subdir
31
- `uv pip install "git+https://github.com/georgeharker/mcp-companion#subdirectory=combiner"`.
31
+ `uv pip install "git+https://github.com/georgeharker/mcp-combiner#subdirectory=combiner"`.
32
32
 
33
33
  ## Usage
34
34
 
@@ -391,9 +391,11 @@ def create_app(options: ServeOptions | None = None) -> Starlette:
391
391
  from mcp_combiner.ui_host import attach_ui_host
392
392
  from mcp_combiner.ui_host.advertise import advertised_origin
393
393
 
394
+ base_origin = advertised_origin(options.host, options.port)
395
+ _warn_unreachable_origins(base_origin, options)
394
396
  attach_ui_host(
395
397
  combiner,
396
- base_origin=advertised_origin(options.host, options.port),
398
+ base_origin=base_origin,
397
399
  sandbox_relay_port=options.port + 1,
398
400
  hold_timeout=_env_hold_timeout(),
399
401
  )
@@ -449,3 +451,16 @@ def create_app(options: ServeOptions | None = None) -> Starlette:
449
451
  RUNTIME.inbound_auth_token = options.auth_token
450
452
  RUNTIME.local_origin = f"http://127.0.0.1:{options.port}"
451
453
  return app
454
+
455
+
456
+ def _warn_unreachable_origins(widget_origin: str, options: ServeOptions) -> None:
457
+ """Startup check: the addresses browsers are sent to (OAuth callbacks,
458
+ widget URLs) should be ones the combiner listens on."""
459
+ from mcp_combiner.binding import unreachable_origins
460
+
461
+ origins = [("widget URLs (MCP_COMBINER_UI_ADVERTISE)", widget_origin)]
462
+ config = RUNTIME.config
463
+ if config is not None and config.oauth.public_url:
464
+ origins.append(("oauth.public_url", config.oauth.public_url))
465
+ for warning in unreachable_origins(origins, options.hosts, options.port):
466
+ logger.warning("bind: %s", warning)
@@ -126,3 +126,50 @@ def _bind_one(host: str, port: int) -> socket.socket | None:
126
126
  return None
127
127
  raise
128
128
  return sock
129
+
130
+
131
+ def unreachable_origins(
132
+ origins: Sequence[tuple[str, str]], hosts: Sequence[str], port: int
133
+ ) -> list[str]:
134
+ """Warnings for *origins* (``(what, url)``) that name an address this
135
+ combiner isn't listening on, so a browser sent there finds nothing.
136
+
137
+ Only plain ``http`` URLs on the combiner's own *port* are checked: anything
138
+ else (``https``, another port) is taken to go through a proxy such as
139
+ ``tailscale serve``, which this process can't see.
140
+ """
141
+ from urllib.parse import urlsplit
142
+
143
+ if any(h in WILDCARDS for h in hosts):
144
+ return []
145
+ bound = {_canonical(a) for h in hosts for a in _addresses(h)}
146
+ warnings: list[str] = []
147
+ for what, url in origins:
148
+ parts = urlsplit(url)
149
+ if parts.scheme != "http" or parts.hostname is None:
150
+ continue
151
+ if (parts.port or 80) != port:
152
+ continue
153
+ addresses = {_canonical(a) for a in _addresses(parts.hostname)}
154
+ if not addresses:
155
+ warnings.append(f"{what} {url}: {parts.hostname} doesn't resolve here")
156
+ elif not addresses & bound:
157
+ warnings.append(
158
+ f"{what} {url} names {', '.join(sorted(addresses))}, but the combiner "
159
+ f"listens only on {', '.join(hosts)} — add it to bind.host (e.g. 'auto')"
160
+ )
161
+ return warnings
162
+
163
+
164
+ def _addresses(host: str) -> set[str]:
165
+ try:
166
+ return {str(info[4][0]) for info in socket.getaddrinfo(host, None)}
167
+ except OSError:
168
+ return set()
169
+
170
+
171
+ def _canonical(address: str) -> str:
172
+ try:
173
+ return str(ipaddress.ip_address(address.split("%", 1)[0]))
174
+ except ValueError:
175
+ return address
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "mcp-combiner"
3
- version = "0.21.0-dev.2"
3
+ version = "0.21.2-dev.1"
4
4
  description = "An MCP aggregator — fronts multiple MCP servers behind a single Streamable HTTP endpoint, shareable across clients."
5
5
  requires-python = ">=3.12"
6
6
  license = "MIT"
@@ -27,9 +27,9 @@ dependencies = [
27
27
  ]
28
28
 
29
29
  [project.urls]
30
- Homepage = "https://github.com/georgeharker/mcp-companion"
31
- Repository = "https://github.com/georgeharker/mcp-companion"
32
- Issues = "https://github.com/georgeharker/mcp-companion/issues"
30
+ Homepage = "https://github.com/georgeharker/mcp-combiner"
31
+ Repository = "https://github.com/georgeharker/mcp-combiner"
32
+ Issues = "https://github.com/georgeharker/mcp-combiner/issues"
33
33
 
34
34
  [dependency-groups]
35
35
  dev = [
@@ -9,7 +9,7 @@ from pathlib import Path
9
9
 
10
10
  import httpx2
11
11
  import pytest
12
- from conftest import ProcFactory, free_port, write_servers_config
12
+ from conftest import ProcFactory, free_port, free_port_pair, write_servers_config
13
13
 
14
14
  from mcp_combiner import binding
15
15
  from mcp_combiner.asgi import resolve_bind_hosts
@@ -150,3 +150,43 @@ def test_an_unresolvable_name_is_skipped(caplog: pytest.LogCaptureFixture) -> No
150
150
  finally:
151
151
  for s in sockets:
152
152
  s.close()
153
+
154
+
155
+ class TestUnreachableOrigins:
156
+ PORT = 9741
157
+
158
+ def _check(self, url: str, hosts: list[str]) -> list[str]:
159
+ return binding.unreachable_origins([("oauth.public_url", url)], hosts, self.PORT)
160
+
161
+ def test_a_bound_address_is_fine(self) -> None:
162
+ assert self._check("http://127.0.0.1:9741", ["127.0.0.1"]) == []
163
+ assert self._check("http://localhost:9741", ["127.0.0.1", "::1"]) == []
164
+
165
+ def test_an_unbound_address_warns(self) -> None:
166
+ (warning,) = self._check(f"http://{TEST_NET}:9741", ["127.0.0.1"])
167
+ assert TEST_NET in warning and "listens only on 127.0.0.1" in warning
168
+
169
+ def test_an_unresolvable_name_warns(self) -> None:
170
+ (warning,) = self._check("http://no-such-host.invalid:9741", ["127.0.0.1"])
171
+ assert "doesn't resolve" in warning
172
+
173
+ def test_proxied_and_wildcard_setups_are_not_checked(self) -> None:
174
+ assert self._check(f"https://{TEST_NET}", ["127.0.0.1"]) == [] # e.g. tailscale serve
175
+ assert self._check(f"http://{TEST_NET}:8080", ["127.0.0.1"]) == [] # another port
176
+ assert self._check(f"http://{TEST_NET}:9741", ["0.0.0.0"]) == [] # every interface
177
+
178
+
179
+ @pytest.mark.e2e
180
+ async def test_startup_warns_about_an_unreachable_public_url(
181
+ procs: ProcFactory, tmp_path: Path
182
+ ) -> None:
183
+ port = free_port_pair()
184
+ config = write_servers_config(
185
+ tmp_path / "servers.json", {}, oauth={"public_url": f"http://{TEST_NET}:{port}"}
186
+ )
187
+ await procs.start_combiner(
188
+ config, port=port, extra_args=["--log-file", str(tmp_path / "combiner.log")]
189
+ )
190
+ log = (tmp_path / "combiner.log").read_text()
191
+ assert f"bind: oauth.public_url http://{TEST_NET}:{port}" in log
192
+ assert "add it to bind.host" in log
@@ -712,7 +712,7 @@ wheels = [
712
712
 
713
713
  [[package]]
714
714
  name = "mcp-combiner"
715
- version = "0.21.0-dev.2"
715
+ version = "0.21.2-dev.1"
716
716
  source = { editable = "." }
717
717
  dependencies = [
718
718
  { name = "fastmcp" },