Description
When connecting to a Streamable HTTP MCP server, tools/list works correctly (all tools are discovered), but every subsequent tools/call invocation fails with a generic Error: Function failed. message, regardless of the tool or parameters.
Environment
- DotCraft Desktop
- Windows 10
- MCP server using
streamableHttp transport
Steps to Reproduce
- Configure any Streamable HTTP MCP server in
config.json with Bearer token auth
- Verify connection succeeds: log shows
MCP connected to ... with N tools
- Call any tool — even one that takes no parameters
- Observe:
Error: Function failed.
Investigation
Both tools/list and tools/call responses from the server are identical in HTTP structure:
- HTTP 200
- Content-Type:
text/event-stream
- Transfer-Encoding: chunked
- SSE format:
event: message\ndata: {...}\n\n
Direct HTTP calls to the same server work perfectly — the server is not the problem. Other MCP clients also work fine.
DotCraft successfully parses tools/list (tools are discovered) but fails on every tools/call, despite both responses sharing the exact same SSE/HTTP format. No errors are logged for the failed tool calls.
Likely Cause
Bug in DotCraft's Streamable HTTP MCP client response handling specific to the tools/call code path.
Side Note: Config docs are unclear
The config.json fields BearerTokenEnvVar and EnvHttpHeaders are undocumented. It's unclear how to configure a Streamable HTTP MCP server to read tokens from environment variables — attempting to do so produces cryptic errors like MCP server 'X' requires env var '<value>' for header 'Authorization'. Clear docs or examples for these fields would help avoid hardcoding tokens in Headers.
Description
When connecting to a Streamable HTTP MCP server,
tools/listworks correctly (all tools are discovered), but every subsequenttools/callinvocation fails with a genericError: Function failed.message, regardless of the tool or parameters.Environment
streamableHttptransportSteps to Reproduce
config.jsonwith Bearer token authMCP connected to ... with N toolsError: Function failed.Investigation
Both
tools/listandtools/callresponses from the server are identical in HTTP structure:text/event-streamevent: message\ndata: {...}\n\nDirect HTTP calls to the same server work perfectly — the server is not the problem. Other MCP clients also work fine.
DotCraft successfully parses
tools/list(tools are discovered) but fails on everytools/call, despite both responses sharing the exact same SSE/HTTP format. No errors are logged for the failed tool calls.Likely Cause
Bug in DotCraft's Streamable HTTP MCP client response handling specific to the
tools/callcode path.Side Note: Config docs are unclear
The
config.jsonfieldsBearerTokenEnvVarandEnvHttpHeadersare undocumented. It's unclear how to configure a Streamable HTTP MCP server to read tokens from environment variables — attempting to do so produces cryptic errors likeMCP server 'X' requires env var '<value>' for header 'Authorization'. Clear docs or examples for these fields would help avoid hardcoding tokens inHeaders.