{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-and-bound-identity-aliasing-collapse-when-chaining-mcp-servers-that-multiplex-tools-over-shared-transport-sessions",
  "title": "How should an instance detect and bound identity-aliasing collapse when chaining MCP servers that multiplex tools over shared transport sessions",
  "date_of_record": "2026 November 26",
  "scope": "Applies to agent runtimes that compose two or more MCP servers into a single tool namespace and multiplex their calls across a shared transport (stdio pipe, single WebSocket, or a shared HTTP/SSE session). Does not apply to single-server deployments or to servers whose tool names are guaranteed globally unique by construction.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-bound-identity-aliasing-collapse-when-chaining-mcp-servers-that-multiplex-tools-over-shared-transport-sessions.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-bound-identity-aliasing-collapse-when-chaining-mcp-servers-that-multiplex-tools-over-shared-transport-sessions.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-bound-identity-aliasing-collapse-when-chaining-mcp-servers-that-multiplex-tools-over-shared-transport-sessions.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2008,
    "python_slice_tokens": 325,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"tool name collision\" in the trivial sense of two servers exposing `read_file`. It is **identity-aliasing collapse**: when a chaining layer flattens `(server_id, tool_name)` into a single flat `tool_name` key, the multiplexer can no longer distinguish *which server's state* a call belongs to, and it silently routes subsequent calls to whic...",
    "what_was_observed": "A runtime chained three MCP servers — a filesystem server, a git server, and a database server — over a single stdio multiplexer. Registration order was filesystem, git, database. The filesystem and git servers each exposed a tool named `status`. The multiplexer's registry was a `dict[str, ToolBinding]` keyed by bare tool name, so the second registration (`git.status`) overwrote the first (`filesystem.status`). No er...",
    "condition_of_validity": "The invariant that must hold for a chained multiplexer to be sound: > For every dispatched call, the multiplexer must be able to reconstruct the originating `(server_id, tool_name)` pair from the call alone, and that reconstruction must be stable across the full session lifetime, including across server reconnects and `tools/list_changed` notifications. This...",
    "decision_boundary": "The boundary is whether the chaining layer treats tool identity as **global** or **scoped**. Concretely: - **Global-identity (unsafe):** registry keyed by bare name; last-writer-wins on collision; `tools/list` returns a deduplicated flat list. Sound only if every server's tool names are provably disjoint — a property no MCP server declares and no chaining la...",
    "operational_effect": "When the invariant holds, a name collision produces a registration-time `ToolIdentityCollision` that the orchestrator must resolve (rename, drop a server, or require model disambiguation) *before* the session proceeds. The model never sees an aliased tool; every dispatched call is reconstructable to exactly one `(server_id, tool_name, generation)`. Error com..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "fde0094ba46a4ce9fcfa36b112e9fa40bf3aad914e934472894456d3f4881ab9",
    "verified_classes": [
      "ToolIdentityCollision",
      "StaleBindingDispatch",
      "ToolBinding",
      "ChainedMultiplexer"
    ],
    "verified_functions": [
      "register",
      "resolve",
      "dispatch"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "StaleBindingDispatch",
      "ToolIdentityCollision"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
