Class HttpMcpClient
java.lang.Object
com.shaft.commandline.mcp.AbstractMcpClient
com.shaft.commandline.mcp.HttpMcpClient
- All Implemented Interfaces:
McpClient, AutoCloseable
MCP client speaking streamable HTTP to a persistent shaft-mcp daemon (session mode).
Observed transport contract (live-probed): initialize returns HTTP 200
application/json plus an Mcp-Session-Id response header that must be echoed on
every subsequent request; notifications/initialized returns 202; tools/list and
tools/call return HTTP 200 text/event-stream (SSE-framed). close() is a
no-op: the daemon and its live browser state outlive the CLI invocation.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class AbstractMcpClient
callTool, callToolRaw, initialize, listTools, listTools, listToolsRaw, listToolsRaw
-
Constructor Details
-
HttpMcpClient
- Parameters:
endpoint- the daemon MCP endpoint, e.g.http://127.0.0.1:8081/mcp
-
-
Method Details
-
close
public void close()
-