Class ChenileMcpHeaderExtractor

java.lang.Object
org.chenile.mcp.transport.ChenileMcpHeaderExtractor
All Implemented Interfaces:
io.modelcontextprotocol.server.McpTransportContextExtractor<ServerRequest>

public class ChenileMcpHeaderExtractor extends Object implements io.modelcontextprotocol.server.McpTransportContextExtractor<ServerRequest>
Captures the headers of the HTTP request that carried an MCP message, so that the tool call can pass them on to the Chenile exchange. Only the x- headers (tenant, trajectory and other Chenile headers) and the Authorization header are kept. They are stored in the MCP transport context under Constants.MCP_TRANSPORT_HEADERS.
  • Field Details

  • Constructor Details

    • ChenileMcpHeaderExtractor

      public ChenileMcpHeaderExtractor()
  • Method Details

    • extract

      public io.modelcontextprotocol.common.McpTransportContext extract(ServerRequest request)
      Specified by:
      extract in interface io.modelcontextprotocol.server.McpTransportContextExtractor<ServerRequest>
    • keep

      private boolean keep(String headerName)