Skip to content

Add CI validation using the official MCP Python SDK #32

Description

@madeinplutofabio

Summary

The Phase 3A.2-E real-host validation gate caught a real bug (rmcp graceful-shutdown panic, fixed in #25) that the existing CI smoke did not. The fix added regression sentinels (graceful_shutdown_does_not_panic in tests/mcp_protocol.rs and the post-dialog exit-status assertion in ci_smoke.py), but those still use raw JSON-RPC. Adding an SDK-driven CI job would catch ecosystem-level regressions earlier.

Why this matters

  • ci_smoke.py uses hand-crafted JSON-RPC; it does not exercise the same code paths a real MCP client does.
  • An SDK-driven CI job validates the actual wire interactions adopters will see.
  • The cost is small: one extra workflow job that pip-installs the SDK.

Acceptance criteria

  • Add a CI job (could be a new job in .github/workflows/rust.yml or a separate workflow).
  • Job installs the official MCP Python SDK (pip install mcp).
  • Spawns ncp-mcp-server as a subprocess, performs initialize then tools/list then tools/call, closes stdin gracefully, asserts clean subprocess exit.
  • Decide whether the job should be a required check or an advisory check. Recommend advisory initially; promote to required after a few PRs prove stability.
  • Keep the existing stdlib-only ci_smoke.py as the required dependency-free check. Do not break it.

Where to read

  • .github/workflows/rust.yml for the existing mcp-smoke job (template)
  • examples/mcp/ci_smoke.py for the current raw-JSON-RPC smoke
  • The reference SDK client used during Phase 3A.2-E validation lived in /tmp/ncp-real-host-validation.py during the publish gate (pattern reference)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:mcpMCP adapter and MCP integration workciCI workflow or jobtype:testTest coverage or test infrastructure

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions