Skip to content

fix(mcp): handle client notifications - #9

Merged
crup merged 1 commit into
mainfrom
next
Apr 7, 2026
Merged

fix(mcp): handle client notifications#9
crup merged 1 commit into
mainfrom
next

Conversation

@crup

@crupcrup commented Apr 7, 2026

Copy link
Copy Markdown
Owner

Hardens the MCP server for stricter clients that send initialization notifications before tools/list.

Changes:

  • Ignores notifications/* instead of replying with no-id JSON-RPC errors.
  • Adds ping handling.
  • Returns -32600 for id-bearing requests missing method.
  • Adds MCP tool titles for get_api_docs, get_recipe, and search_docs.
  • Updates README, AI docs, and llms-full with tool titles/descriptions.
  • Extends the MCP smoke test to send notifications/initialized before tools/list.

Why:

  • The reported editor error was: failed to get tools: calling tools/list: invalid request.
  • The likely cause was the server replying to notifications/initialized as an unknown method with no id, which can make strict clients mark the session invalid before tools/list completes.

Validation run locally:

  • pnpm typecheck
  • pnpm test
  • pnpm build
  • pnpm docs:build
  • pnpm readme:check
  • pnpm mcp:check
  • pnpm size
  • pnpm pack --dry-run
  • git diff --check

Release note:

  • npm latest is 0.0.5, so this should publish as 0.0.6 after merge.

@github-actions

Copy link
Copy Markdown

Bundle size report

EntryFilesRawGzipBrotliRaw deltaGzip deltaBrotli delta
core24.44 kB1.52 kB1.40 kB0 B0 B0 B
timer group add-on310.93 kB3.83 kB3.50 kB0 B0 B0 B
schedules add-on38.62 kB3.02 kB2.78 kB0 B0 B0 B
duration helper1318 B224 B192 B0 B0 B0 B
diagnostics helper1105 B115 B90 B0 B0 B0 B
MCP docs server16.95 kB2.72 kB2.36 kB+268 B+123 B+112 B
core CJS14.71 kB1.63 kB1.50 kB0 B0 B0 B
timer group CJS111.02 kB3.86 kB3.54 kB0 B0 B0 B
schedules CJS18.71 kB3.04 kB2.81 kB0 B0 B0 B
duration CJS1808 B475 B424 B0 B0 B0 B
diagnostics CJS1605 B367 B326 B0 B0 B0 B

@crup
crup merged commit e421a1f into mainApr 7, 2026
2 checks passed
Sign up for freeto 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.

1 participant

@crup