test-mcp-by-cli
Original:🇺🇸 English
Translated
Use skill if you are testing MCP servers with philschmid/mcp-cli, inspecting tools, calling them, or debugging config, transport, auth, and arguments.
3installs
Added on
NPX Install
npx skill4agent add yigitkonur/skills-by-yigitkonur test-mcp-by-cliTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Test MCP by CLI
Validate MCP servers with (philschmid/mcp-cli v0.3.0) using release-verified behavior first, then use official repo source only when it matches what the installed binary actually does.
mcp-cliCore rules
- Execute commands directly and sequentially.
- Do not write helper scripts unless explicitly requested.
- Treat server work as incomplete until verification checks pass.
- Prefer single-server commands while debugging.
- After rebuilding a server, always retest with .
MCP_NO_DAEMON=1 - Treat and real command output as the primary behavioral source for the installed release.
mcp-cli --help - Remember that returns the raw MCP JSON envelope on stdout in the installed
callbinary.v0.3.0
What to load first
Use this progressive order to keep context tight:
- This file () for command strategy, decision rules, and execution flow.
SKILL.md - Skill references for concrete command blocks:
- — 8-phase verification sequence and checklist
references/testing-flow.md - — config format, search paths, tool filtering, env var substitution, JSON input methods
references/configuration-and-arguments.md - — raw output parsing, stream handling, chaining, CI/CD patterns, verified environment variables
references/output-debugging-and-chaining.md - — common errors, exit codes, daemon behavior, and release inconsistencies
references/errors-and-recovery.md
- Read only the relevant reference for the current problem instead of loading all files.
- Return to this file when you need the overall workflow or decision rules.
Execution workflow
- Follow the 8-phase verification order in .
references/testing-flow.md - Use config and JSON argument patterns from .
references/configuration-and-arguments.md - Use stream handling, chaining, and env controls from .
references/output-debugging-and-chaining.md - If any command fails, apply diagnosis from .
references/errors-and-recovery.md - Do not report done until all checklist items pass.
Decision rules
Apply when things go wrong:
- If Phase 1 (connect) fails: stop everything. Fix config or server startup before proceeding.
- If a tool is missing from inventory: check in config — it takes precedence over
disabledTools. ReadallowedTools.references/configuration-and-arguments.md - If calls return stale results: use — the daemon caches old server processes for 60s. Read daemon section in
MCP_NO_DAEMON=1.references/errors-and-recovery.md - If calls hang: lower timeout with (default is 1800s). Read env var section in
MCP_TIMEOUT=30.references/output-debugging-and-chaining.md - If debugging protocol issues: use to see full protocol traffic on stderr.
MCP_DEBUG=1 - If (no args) hangs: it connects ALL servers. Use
mcp-clito test one at a time.mcp-cli info <server> - If you get : always use a subcommand —
AMBIGUOUS_COMMAND,call, orinfo.grep - If output parsing looks wrong: returns raw JSON in this release. Extract content with
call. Readjq -r '.content[0].text'.references/output-debugging-and-chaining.md - If docs and binary disagree: trust the installed binary and real command output over inferred internals.
Repository-specific execution mode
When validating this repository's own source code, run the local CLI implementation:
bash
bun run src/index.ts -c ./mcp_servers.json info filesystem
bun run src/index.ts -c ./mcp_servers.json call filesystem read_file '{"path":"./README.md"}'Use globally installed for all other workflows.
mcp-cliMinimal quick start
bash
# Install if missing
which mcp-cli || curl -fsSL https://raw.githubusercontent.com/philschmid/mcp-cli/main/install.sh | bash
# Connect and inspect
mcp-cli info my-server
mcp-cli info my-server my-tool
# Happy path + error path
mcp-cli call my-server my-tool '{"param":"value"}'
mcp-cli call my-server my-tool '{}'
# Fresh-connection check after rebuild
MCP_NO_DAEMON=1 mcp-cli call my-server my-tool '{"param":"value"}'If any step fails, continue debugging; do not claim completion.
Reference files
| File | When to read |
|---|---|
| Running the full 8-phase verification sequence or the final checklist |
| Setting up config files, tool filtering, env var substitution, or passing JSON arguments |
| Parsing output, piping between tools, CI/CD scripts, or controlling behavior via env vars |
| Any command fails — error type lookup, exit code interpretation, daemon issues, or release inconsistencies |