Teknium
ceaf622c6d
fix(mcp): same-named MCP servers with different credentials connect per profile; owner /reload-mcp keeps adopters' tools
...
Under gateway.multiplex_profiles every connection ledger in tools/mcp_tool.py
(_servers, _server_scope_keys/_server_tool_scopes, connecting/error/cooldown
maps, the circuit breaker, lazy schema-cache configs, trust metadata) was keyed
by the bare server NAME. The common per-tenant layout — each profile names its
server `github`/`notion` with its own token — gave only the first profile a
connection: the second profile's register_mcp_servers saw the name as "already
connected", refused to adopt it (different credentials, 4ddbcbd35e ), and left
the profile silently tool-less with a healthy-looking `configured` status
(#106005 Bug 1/2, #91654 ). Siblings of the same bug: profile A's failing `x`
put profile B's healthy `x` into A's 10-minute connect cooldown and A's open
circuit breaker short-circuited B's calls; toolsets._resolve_toolset_memo was
not scope-keyed, so B resolved A's `mcp-<server>` tool names.
Keys are now the connection key from the new tools/mcp_tool_scope.py: the bare
name outside a multiplexer (single-profile processes are unchanged) and
(owner_scope, name) under one. Call-time lookups (_resolve_server_key) prefer
the calling scope's own connection, then a shared connection it adopted, so
identical-route profiles still share one subprocess. _select_new_servers,
the cooldown/breaker/trust maps, lazy registration and get_mcp_status all read
and write through the composite key; teardown resolves a task's key by
identity (the MCP loop has no profile context). The toolset memo key includes
registry.current_scope_key().
An owner's scoped /reload-mcp tore down its connection and, with it, every
adopting profile's tool overlay; nothing re-ran the adopters' discovery until
they reloaded. shutdown_mcp_servers(scope=) now records the orphaned adopters
and register_mcp_servers re-registers them under their own home + secret scope
once the owner's rediscovery pass completes.
Docs: multi-profile-gateways.md states the per-profile connection rule.
Fixes #106005
Fixes #91654
Co-authored-by: Bergmann89 <info@bergmann89.de >
Co-authored-by: Izzy-Gottz <srulynj@gmail.com >
2026-09-11 15:27:23 -07:00
..
2026-09-08 17:03:01 -07:00
2026-09-11 11:19:53 +05:30
2026-09-11 15:45:43 +05:30
2026-09-07 12:50:29 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 13:49:57 -07:00
2026-09-07 14:30:41 -07:00
2026-09-07 14:30:41 -07:00
2026-09-03 13:49:57 -07:00
2026-09-03 13:49:57 -07:00
2026-09-03 13:49:57 -07:00
2026-09-03 13:49:57 -07:00
2026-09-07 08:13:38 -07:00
2026-09-03 09:44:26 -07:00
2026-09-11 06:24:54 -07:00
2026-09-03 09:44:26 -07:00
2026-09-10 10:27:07 -07:00
2026-09-10 10:27:07 -07:00
2026-09-06 13:08:31 -07:00
2026-09-10 10:27:07 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 14:16:54 -07:00
2026-09-10 10:35:07 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 13:49:57 -07:00
2026-09-03 14:16:54 -07:00
2026-09-10 10:35:07 -07:00
2026-09-03 14:16:54 -07:00
2026-09-03 14:25:33 -07:00
2026-09-03 14:16:54 -07:00
2026-09-03 14:16:54 -07:00
2026-09-06 23:31:05 +05:30
2026-09-03 14:16:54 -07:00
2026-09-03 14:16:54 -07:00
2026-09-06 23:31:05 +05:30
2026-09-03 14:16:54 -07:00
2026-09-10 10:35:07 -07:00
2026-09-03 14:16:54 -07:00
2026-09-10 10:35:07 -07:00
2026-09-11 15:26:46 -07:00
2026-09-10 11:48:01 -07:00
2026-09-03 09:44:26 -07:00
2026-09-07 06:00:46 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 09:44:26 -07:00
2026-09-04 00:15:16 -07:00
2026-09-07 07:10:28 -07:00
2026-09-07 06:12:24 -07:00
2026-09-05 18:46:53 +05:30
2026-09-10 10:35:07 -07:00
2026-09-10 02:21:16 +05:30
2026-09-10 02:21:16 +05:30
2026-09-03 09:44:26 -07:00
2026-09-07 08:18:56 -07:00
2026-09-03 09:44:26 -07:00
2026-09-10 15:32:47 +05:30
2026-09-03 09:44:26 -07:00
2026-09-09 12:17:57 +05:30
2026-09-08 02:26:05 +05:30
2026-09-10 05:02:41 -07:00
2026-09-06 05:03:20 -07:00
2026-09-10 10:23:12 -07:00
2026-09-06 12:02:43 -07:00
2026-09-03 09:44:26 -07:00
2026-09-11 11:54:49 -07:00
2026-09-10 05:02:41 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 13:24:04 -07:00
2026-09-03 17:13:22 -07:00
2026-09-09 11:46:36 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 03:31:03 -07:00
2026-09-03 13:33:47 -07:00
2026-09-07 00:28:46 +05:30
2026-09-07 00:28:46 +05:30
2026-09-03 13:28:22 -07:00
2026-09-03 13:10:52 -07:00
2026-09-03 13:30:27 -07:00
2026-09-03 13:30:27 -07:00
2026-09-06 12:05:53 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 13:53:03 -07:00
2026-09-08 14:57:15 -07:00
2026-09-09 11:46:36 -07:00
2026-09-03 13:24:04 -07:00
2026-09-05 13:51:06 -07:00
2026-09-07 04:46:54 -07:00
2026-09-09 12:18:58 -07:00
2026-09-07 06:35:14 -07:00
2026-09-10 02:21:16 +05:30
2026-09-11 03:45:33 +05:30
2026-09-07 08:22:35 -07:00
2026-09-03 09:44:26 -07:00
2026-09-08 17:44:51 -07:00
2026-09-07 08:22:35 -07:00
2026-09-03 17:13:22 -07:00
2026-09-10 02:21:16 +05:30
2026-09-10 18:12:39 -07:00
2026-09-03 13:28:47 -07:00
2026-09-11 15:27:23 -07:00
2026-09-06 13:18:19 -07:00
2026-09-11 15:27:23 -07:00
2026-09-11 15:27:23 -07:00
2026-09-11 15:27:23 -07:00
2026-09-11 15:27:23 -07:00
2026-09-11 15:27:23 -07:00
2026-09-07 22:47:33 +05:30
2026-09-03 09:44:26 -07:00
2026-09-11 15:27:23 -07:00
2026-09-11 15:27:23 -07:00
2026-09-11 15:27:23 -07:00
2026-09-11 15:27:23 -07:00
2026-09-06 14:53:13 +05:30
2026-09-09 12:19:13 +05:30
2026-09-03 01:43:42 -07:00
2026-09-04 00:15:16 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 09:44:26 -07:00
2026-09-07 22:47:33 +05:30
2026-09-04 00:15:16 -07:00
2026-09-03 17:13:22 -07:00
2026-09-07 08:25:33 -07:00
2026-09-07 12:50:29 -07:00
2026-09-07 08:25:33 -07:00
2026-09-09 10:56:37 +05:30
2026-09-03 09:44:26 -07:00
2026-09-04 00:15:16 -07:00
2026-09-11 15:26:46 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 17:13:22 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 09:44:26 -07:00
2026-09-07 08:14:51 -07:00
2026-09-03 13:49:57 -07:00
2026-09-11 11:54:49 -07:00
2026-09-03 01:36:04 -07:00
2026-09-11 15:26:46 -07:00
2026-09-11 06:24:11 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 01:41:16 -07:00
2026-09-03 17:13:22 -07:00
2026-09-04 08:15:22 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 13:33:47 -07:00
2026-09-11 11:54:49 -07:00
2026-09-09 12:19:13 +05:30
2026-09-11 11:54:49 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 00:55:09 -07:00
2026-09-03 17:13:22 -07:00
2026-09-07 07:05:59 -07:00
2026-09-03 09:44:26 -07:00
2026-09-07 05:59:43 -07:00
2026-09-11 11:54:49 -07:00
2026-09-11 11:54:49 -07:00
2026-09-03 13:22:48 -07:00
2026-09-04 00:15:16 -07:00
2026-09-06 07:17:03 -07:00
2026-09-11 11:54:49 -07:00
2026-09-04 00:15:16 -07:00
2026-09-06 07:17:03 -07:00
2026-09-06 07:17:03 -07:00
2026-09-03 01:09:55 -07:00
2026-09-03 13:27:01 -07:00
2026-09-03 01:09:55 -07:00
2026-09-11 11:54:49 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 01:09:12 -07:00
2026-09-03 09:44:26 -07:00
2026-09-05 18:04:00 +05:30
2026-09-06 13:32:51 +05:30
2026-09-07 12:50:29 -07:00
2026-09-05 19:01:22 +05:30
2026-09-07 06:05:51 -07:00
2026-09-03 13:24:04 -07:00
2026-09-03 13:24:04 -07:00
2026-09-11 11:19:53 +05:30
2026-09-06 12:06:04 -07:00
2026-09-10 11:48:01 -07:00
2026-09-07 08:09:20 -07:00
2026-09-03 01:13:51 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-11 15:26:46 -07:00
2026-09-03 01:13:51 -07:00
2026-09-03 17:13:22 -07:00
2026-09-10 02:21:15 +05:30
2026-09-10 02:21:16 +05:30
2026-09-10 02:21:16 +05:30
2026-09-03 09:44:26 -07:00
2026-09-03 13:17:25 -07:00
2026-09-03 13:17:25 -07:00
2026-09-03 13:17:25 -07:00
2026-09-03 13:30:31 -07:00
2026-09-03 13:17:25 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 13:20:22 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 01:23:19 -07:00
2026-09-03 13:20:22 -07:00
2026-09-03 01:17:43 -07:00
2026-09-03 13:20:22 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 13:20:22 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 13:17:25 -07:00
2026-09-03 13:30:31 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 13:24:36 -07:00
2026-09-03 13:24:36 -07:00
2026-09-03 17:13:22 -07:00
2026-09-10 10:35:07 -07:00
2026-09-03 13:08:53 -07:00
2026-09-05 18:46:16 +05:30
2026-09-04 07:17:00 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 17:13:22 -07:00