Skip to content

feat(mcp): migrate to MCP TypeScript SDK v2 with bundled skills - #57

Merged
cccadet merged 4 commits into
mainfrom
feat/mcp-sdk-v2
Dec 4, 2026
Merged

cccadet merged 4 commits into
mainfrom
feat/mcp-sdk-v2

Conversation

@cccadet

@cccadet cccadet commented Dec 3, 2026

Copy link
Copy Markdown
Owner

Summary

Migrates @omni-sql/mcp-server from @modelcontextprotocol/sdk v1 to the MCP TypeScript SDK v2 (@modelcontextprotocol/server 2.4.0, @modelcontextprotocol/node 2.1.2) and adopts the features of MCP spec 2026-07-28 that fit omni-sql.

  • Protocol: serves 2026-07-28 plus 2025-era clients (2025-11-25 … 2024-11-05) on stdio and Streamable HTTP.
  • Stateless HTTP (127.0.0.1:41922/mcp):
    • Removes our manual session management; POST only (GET/DELETE → 405 allow: POST).
    • Caps concurrent requests at 16 (503 when full).
    • A stale mcp-session-id is ignored, so clients survive an omni-sql restart.
    • Bearer auth, host/origin allowlists and body limits unchanged; chunked bodies are now really bounded.
    • Cancellation = closing the request (notifications/cancelled can no longer target a call without sessions); this aborts the pending desktop request.
  • Tools: titles, output schemas and annotations (openWorldHint: false); server instructions, description, cache hints, and the real release version (__OMNI_SQL_VERSION__ injected by build.mjs; release.yml passes VERSION).
  • Skills extension: four bundled skills (safe-execution, fix-failed-query, optimize-query, explore-schema) at skill://omni-sql/<name>/SKILL.md.
  • Contract change: McpHttpStatus.sessions → activeRequests (ts-types, backend, desktop dialog, i18n).
  • Dependencies: drops the v1 SDK's Express/ajv dependency tree.
  • Docs: docs/MCP.md, docs/ARCHITECTURE.md, CLAUDE.md.

Behavior changes for MCP clients

  • 2025-era clients over HTTP receive responses as a single SSE event instead of plain JSON (allowed by their spec; not configurable in SDK v2).
  • No sessions: HTTP status shows active requests instead of sessions.

Validation

  • mcp-server, backend, desktop, ts-types: typecheck, lint, build.
  • End-to-end simulation (real backend + real SQLite DB + simulated desktop approvals), 23/23:
    • Modern and 2025 clients over HTTP: all tools, approve/reject/write, skills, 405s.
    • Aborted call not executed when approved later; 503 cap; ingress 401/403/404/413/400.
    • Bundled dist over stdio: modern, legacy and standalone.
  • Tests:
    • mcp-server 39/39, stable across runs.
    • backend 101 pass, 10 optional integration skipped, 0 fail.
    • Desktop StatusBar 17/17.
  • Coverage: total TS 89.4%; mcp-server 97.3%.
  • Windows NSIS installer built locally (0.26.0) for manual testing.
  • Not run locally: PostgreSQL and MongoDB integration tests (updated for stateless HTTP; run in CI on main).

Release

Includes docs/releases/v0.26.0.md (also covers the SQLite connector and the colored environment badge already on main). Tag v0.26.0 on the merge commit right after merging.

🤖 Generated with Claude Code

cccadet and others added 4 commits November 30, 2026 11:08
- Serve MCP 2026-07-28 plus 2025-era clients on stdio and Streamable HTTP
- Stateless HTTP endpoint: POST only, bounded concurrent requests (503 when full),
  cancellation by closing the request; status reports active requests
- Tool titles, output schemas and annotations; server instructions, description,
  cache hints and release version injected at build time
- Bundle omni-sql skills (safe-execution, fix-failed-query, optimize-query,
  explore-schema) via the Skills extension
- Desktop MCP status shows active HTTP requests instead of sessions

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cccadet
cccadet merged commit b849a67 into main Dec 4, 2026
7 checks passed
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.

1 participant