Deploy and review

Run the final test matrix

Test discovery and representative success, validation, absence, security, and transport cases across local and remote servers.

8 minute lesson

~~~

Unit tests can verify search logic, but an MCP server also needs contract tests through a real transport.

Add this table to TESTING.md and record the result of each row:

AreaTestExpected
DiscoveryList tools, resources, prompts2 tools, 1 resource, 1 prompt
SearchQuery deployOne matching note
ValidationEmpty queryRejected before handler
LookupUnknown IDClear error result
ResourceRead notes://catalogValid JSON catalog
PromptRender topic deployOne review message
BoundaryRequest hidden/local dataNo capability exposes it
TransportRepeat locally and remotelyEquivalent capability results
ProtocolRecord negotiated revisionExpected modern or legacy era
OutputCompare text and structured dataSame successful payload
InjectionRead hostile practice noteReturned only as note data
HTTP pathRequest a different route404
AuthorizationMissing, invalid, wrong-scope token401, 401, 403

The authorization row applies when the endpoint is protected. For a public practice-data deployment, mark it “not implemented: public demo” rather than pretending it passed.

Run the matrix against stdio first, local HTTP second, and deployed HTTP last. Record exact arguments and results, not only “works.”

Repeat negative calls after each transport change. Success can survive a broken validation or error path.

Record these test conditions beside the table:

  • SDK and Inspector versions
  • negotiated protocol revision
  • commit or deployment version
  • date and endpoint
  • whether authorization was enabled

A screenshot is optional. The saved arguments and results are the evidence that matters.

Lesson completed

Take this course offline

Get every free book and course as PDF and EPUB files.

Get the download library →