Skip to content

MCP initialize returns logging:null — strict clients (Claude Code) reject the handshake #100

Description

@jrosskopf

Problem

handleInitialize (src/mcp_route_handlers.cpp:762) emits the logging capability as crow::json::wvalue(), which serializes to JSON null. Per the MCP spec, capability values must be objects. Strict clients validate this: Claude Code fails to connect to flAPI entirely with Connection failed: [{"code":"custom","path":["capabilities","logging"],"message":"Invalid input"}].

Reproduced against the released v26.07.13 wheel. This breaks the "every endpoint is an MCP tool your LLM can call" story for the most important client.

Fix

Emit an empty object instead of null (same idiom as elsewhere in the file):

result["capabilities"]["logging"] = crow::json::wvalue::object();

Found while recording the promotion demo GIFs (agent-over-MCP scenario).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions