Skip to content

fix: MCP initialize logging capability must be an object, not null#102

Open
jrosskopf wants to merge 1 commit into
mainfrom
fix/gh-100-mcp-logging-capability
Open

fix: MCP initialize logging capability must be an object, not null#102
jrosskopf wants to merge 1 commit into
mainfrom
fix/gh-100-mcp-logging-capability

Conversation

@jrosskopf

@jrosskopf jrosskopf commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • handleInitialize emitted "logging": null (default-constructed crow::json::wvalue); MCP capabilities must be objects, and strict clients (Claude Code) reject the handshake entirely — flAPI was unusable from Claude Code over HTTP.
  • One-line fix: crow::json::wvalue::object().

Test plan

  • Reproduced against v26.07.13: claude mcp add --transport http flapi ... → ✘ Failed to connect with Zod error at capabilities.logging
  • Local build: Claude Code connects and calls tools (used to record the agent demo GIF)

Closes #100

🤖 Generated with Claude Code


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

Strict MCP clients (Claude Code) validate the initialize response schema
and reject 'logging': null, failing the whole connection. Emit {} instead,
matching the spec and the wvalue::object() idiom used elsewhere.

Closes #100
jrosskopf added a commit that referenced this pull request Jul 13, 2026
…ackaging)

All real recordings via VHS with committed tapes and demo project trees:
- flapi-demo-agent.gif: Claude Code answering questions through flAPI MCP
  tools (Basic auth, per-tool RBAC) — requires fix #100
- flapi-demo-bigquery.gif: agent on top of BigQuery public data with typed
  prepared-statement params; the model never writes SQL
- flapi-demo-pack.gif: flapi pack single-binary deploy, served from /tmp
- assets/README.md documents reproduction, and why SAP/SharePoint demos
  were not recorded (no live backend / no connector) rather than staged

Recording these surfaced and fixed two launch-blocking bugs: #100 (PR #102)
and #101 (PR #103).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant