docs: add CLI smoke testing example for MCP servers#1635
Draft
jiezeng2004-design wants to merge 1 commit into
Draft
docs: add CLI smoke testing example for MCP servers#1635jiezeng2004-design wants to merge 1 commit into
jiezeng2004-design wants to merge 1 commit into
Conversation
Add a docs/cli-smoke-testing-example.md guide showing how to use the Inspector CLI mode to run smoke tests against any MCP server. Covers the connect/list/call/assert workflow, JSON assertions via jq, asserting safe output does not leak secrets, and a CI integration snippet. Uses the reference server-everything and a local stdio server as examples.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a CLI smoke testing example document showing how to test MCP servers from the command line using the Inspector's CLI mode. The method is generic and applicable to any MCP server, with the reference
server-everythingand a local stdio server used as concrete examples.Type of Change
Changes Made
docs/cli-smoke-testing-example.mddescribing a reusable smoke testing workflow built on the existing CLI mode (npx @modelcontextprotocol/inspector --cli ...):--methodvalues and their required options (matching the CLI source).@modelcontextprotocol/server-everythingand a local stdio server.The document does not introduce or depend on any external package; the local-server example notes that any MCP server built to a
dist/index.jsentry point can be substituted.Testing
Ran
prettier --check(the repo's documented formatter, seeCONTRIBUTING.mdand thelint-stagedconfig) against the new file; it passes afterprettier --write. No code or tests are touched, sonpm test/npm run test:e2eare unaffected.Checklist
prettier --writeon the new file)