Skip to content

Intercept intialization requests to STDIO servers #1982

@eleftherias

Description

@eleftherias

Current Limitation

If multiple clients send an initialize request, ToolHive forwards the request to the STDIO workload, which may reject the request or behave unexpectedly, since the expected behaviour is not described by the protocol.

Proposed Solution

ToolHive can a single initialization request to the MCP server container, and intercept any initialization requests coming from the client, responding with a cached response.

Flow:

  • When an MCP server is started, ToolHive sends an initialization request and caches the response
  • When ToolHive receives an initialization request from a client:
    • It should not forward the request to the MCP server
    • It should respond with the cached response
    • It should respond with the session ID (this is already implemented)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions