Test MCP Servers with mcpc
Use mcpc 0.2.x as the operator-facing harness for MCP server testing. This skill is written for the 0.2.0 through 0.2.4 command family, not the older 0.1.11 target-first CLI.
Trigger Boundary
Use this skill when you need to:
- connect to a real MCP server over
stdioor Streamable HTTP and verify the live surface - inspect tools, prompts, resources, templates, logging, subscriptions, or instructions from
mcpc - reproduce auth, proxy, cleanup, task, or transport failures with the released CLI
- script repeatable smoke checks in
--jsonmode - compare a local stdio server with a deployed HTTP target
Do not use this skill when the main job is building the server or client itself. Use build-mcp-server-sdk-v1, build-mcp-server-sdk-v2, build-mcp-use-server, or build-mcp-use-client for implementation work.
Prerequisites
mcpc --version
mcpc --helpPrefer mcpc 0.2.x. This rewrite was verified against 0.2.4 and live-tested with:
https://research.yigitkonur.com/mcp@modelcontextprotocol/server-everythingover stdio and Streamable HTTP
If mcpc is missing, older, or your config shape is wrong, start with references/guides/installation.md. This skill documents raw mcpc behavior. Establish the plain CLI path first, then layer wrappers or harnesses back in only after the raw command path already works.
Minimal Read Sets
Do not load the whole skill by default. Use one of these bundles first, then widen only if the task forces you to.
Remote Streamable HTTP smoke test
Read these first:
references/commands/quick-reference.mdreferences/guides/http-testing.mdreferences/guides/discovery-search.mdreferences/guides/tool-resource-testing.mdreferences/guides/cleanup-maintenance.md
Local stdio plus task verification
Read these first:
references/commands/quick-reference.mdreferences/guides/stdio-testing.mdreferences/guides/async-tasks.mdreferences/guides/everything-server.mdreferences/guides/discovery-search.mdreferences/guides/tool-resource-testing.mdreferences/guides/cleanup-maintenance.md
Auth, proxy, or payment edge cases
Read these first:
references/commands/quick-reference.mdreferences/guides/authentication.mdreferences/guides/proxy-testing.mdreferences/guides/x402-payments.mdreferences/guides/cleanup-maintenance.md
Command Family Change
The 0.2.x CLI is session-first. Always create or reuse a named session before you run MCP operations.
# Remote Streamable HTTP target
mcpc connect https://research.yigitkonur.com/mcp @research
mcpc @research ping
mcpc @research tools-list
# Local stdio target from a standard mcpServers config
mcpc connect .vscode/mcp.json:filesystem @fs
mcpc @fs tools-listTreat these forms as stale 0.1.11 syntax drift:
mcpc mcp.example.com tools-listmcpc mcp.example.com connect @demomcpc --config.vscode/mcp.json filesystem connect @demomcpc --clean=sessions
Route migration work to references/patterns/session-first-syntax.md.
Standard Workflow
1. Verify the syntax family
- Confirm
mcpc --versionreports0.2.x. - Confirm examples use
mcpc connect <server-or-file:entry> @session. - Validate the released CLI contract with plain
mcpc, not a shell wrapper. - Treat old
--config file entryand direct URL one-shot commands as obsolete.
2. Connect a stable session
Default to a fresh connect. Reach for session inventory only when reuse, cleanup, or stale-state diagnosis is the actual job.
# Remote URL; https:// is added automatically for non-local hosts
mcpc connect research.yigitkonur.com/mcp @research
# Localhost keeps http:// by default
mcpc connect 127.0.0.1:3011/mcp @everything-http
# Stdio via config entry
mcpc connect /tmp/everything-mcp.json:everything @everything-stdioUse --no-profile when anonymous HTTP testing matters on a machine with saved OAuth profiles.
If you do need to inspect an existing session, narrow the lookup to the exact session name instead of reading the whole inventory first:
mcpc
mcpc --json | jq '.sessions[] | select(.name == "@research")'If an older session for the same target is not live, do not assume that session is still the right test entrypoint. Either mcpc restart @session or create a fresh session with a new name. If mcpc restart @session returns Session not found, stop retrying that name and create a fresh session immediately. For Everything-specific work, prefer a fresh stdio session unless you intentionally started the streamableHttp server yourself.
3. Inspect before deep testing
mcpc @research
mcpc @research help
mcpc @research grep search
mcpc @research tools-list --full
mcpc @research resources-list
mcpc @research prompts-listPrefer help and grep before heavy jq pipelines. If the acceptance criteria explicitly mention prompts, resources, or templates, add those list calls in the first pass instead of widening the read set later.
4. Validate schema and argument shape
mcpc @research tools-get web-search
mcpc --json @research tools-get web-search | jq '.inputSchema'
mcpc @research prompts-get some-prompt --schema ./expected-prompt-schema.jsonkey:=value still works, but arrays and objects should be sent as inline JSON literals or full JSON payloads. Route quoting edge cases to references/patterns/argument-parsing.md.
4b. Reality-check advertised capabilities
Do not trust capabilities alone. Check the server info, the tool metadata, and one real call.
mcpc --json @research | jq '.capabilities'
mcpc --json @everything-http tools-list | jq '.[] | {name, taskSupport: (.execution.taskSupport // "unspecified")}'Rules:
- if
completionsappears in server info, treat it as informational until you confirm the CLI actually exposes a command - if tasks appear in capabilities, still inspect per-tool
execution.taskSupport - if a tool is marked
task:required, prove it with one--taskor--detachcall before writing automation around it
5. Exercise the capability you care about
mcpc --json @research tools-call search-reddit '{"queries":["OpenAI MCP"]}'
mcpc @everything-http prompts-get args-prompt city:=Paris state:=Texas
mcpc @everything-http resources-read demo://resource/static/document/features.md
mcpc @everything-http logging-set-level debug6. Treat JSON payloads as truth
RESULT=$(mcpc --json @everything-http tools-call trigger-sampling-request prompt:='"hello"')
echo "$RESULT" | jq '.isError // false'A command can exit 0 and still carry "isError": true.
7. Use task mode deliberately
mcpc @everything-http tools-list --full
mcpc @everything-http tools-call simulate-research-query topic:='"mcpc tasks"' --task
mcpc @everything-http tools-call simulate-research-query topic:='"mcpc tasks"' --detach
mcpc @everything-http tasks-get <taskId>Use --task when you need the final result in the CLI. Use --detach when a task ID is enough. mcpc 0.2.4 does not have a standalone tasks-result command.
8. Close or clean explicitly
mcpc close @research
mcpc clean
mcpc clean sessions logsUse mcpc clean all only for a real reset. Do not run close and clean for the same session in parallel.
High-Signal Rules
- Connect first. If an example starts with
mcpc <server> tools-list, it is stale. - Prefer native discovery with
mcpc @session,mcpc @session help, andmcpc grepbefore custom JSON filtering. - Inspect
isError, task status, and payload text instead of trusting human-mode success banners. - Use
--no-profileto force anonymous HTTP tests when saved OAuth state would pollute the result. - Use
mcpc clean..., not legacy--clean=...flags. - If an old session is
disconnected,reconnecting,expired, orcrashed, do not reuse it blindly for a smoke test. Restart it or create a fresh session. - Treat HTTP+SSE endpoints as unsupported for
mcpc 0.2.x; use Streamable HTTP or stdio instead. - Reach for
--insecureonly when the endpoint really uses a self-signed or otherwise untrusted certificate. - When a tool is marked
task:required, expect plaintools-callto fail until you add--taskor--detach. - Use plain
mcpcas the documented baseline; wrappers can change quoting, TTY, and session-state visibility. - Treat proxy
/healthas a liveness probe only. Verify proxy auth with a real MCP request on the exact release you ship before you depend on it.
Capability Boundary
Fully testable with first-class CLI support
stdioand Streamable HTTP- tools, prompts, resources, resource templates, logging, grep, proxy, x402, JSON scripting
- task-enabled tool execution with
--task,--detach,tasks-list,tasks-get, andtasks-cancel
Nuanced or partial in mcpc 0.2.4
roots: the client advertises roots capability, so servers like Everything may expose helper tools, butmcpchas no dedicated CLI to configure rootssampling: servers may expose sampling demo tools becausemcpcadvertises sampling-related client capabilities, but the tool payload can still come back withisError: truecompletions: appears in server capabilities, but there is nomcpc completionscommand- detached task results:
tasks-getshows status, not the original tool result body
Not a first-class mcpc workflow
- HTTP+SSE transport testing
- elicitation commands from the CLI
- standalone completion browsing
- standalone detached-result retrieval after
--detach
Reference Routing
Read the smallest relevant set for the branch you are in.
Core guides
| File | Read when |
|---|---|
references/guides/installation.md | Installing mcpc, checking version drift, Linux keychain notes, or config format confusion. |
references/guides/stdio-testing.md | Testing a local stdio server from mcpServers config using file:entry syntax. |
references/guides/http-testing.md | Testing remote or localhost Streamable HTTP endpoints, path issues, TLS, headers, or --insecure. |
references/guides/discovery-search.md | Discovering tools, resources, prompts, and instructions with help, grep, and list calls. |
references/guides/tool-resource-testing.md | Running tools, prompts, resources, templates, subscriptions, and logging checks. |
references/guides/async-tasks.md | Using --task, --detach, and tasks-*, or debugging task-required tools. |
references/guides/authentication.md | OAuth, bearer headers, profile selection, scopes, client credentials, and anonymous mode. |
references/guides/session-management.md | Understanding session lifecycle, reconnect behavior, restart behavior, and multi-session workflows. |
references/guides/cleanup-maintenance.md | Safe cleanup, hard resets, logs, and local mcpc hygiene. |
references/guides/proxy-testing.md | Exposing a session as a local MCP proxy for sandboxes or agent code. |
references/guides/x402-payments.md | Wallet setup, x402 sign, and --x402 session behavior. |
references/guides/ci-cd-integration.md | CI smoke tests, isolated MCPC_HOME_DIR, scripted assertions, and cleanup traps. |
references/guides/scripting-automation.md | Shell automation patterns, error handling, JSON parsing, and reproducible scripts. |
references/guides/everything-server.md | Verifying current mcpc behavior against the official Everything reference server. |
references/guides/capability-coverage.md | Mapping advertised capabilities to actual mcpc commands and known gaps. |
references/guides/architecture.md | High-level mcpc design, session-first routing, and capability negotiation. |
references/guides/bridge-internals.md | Bridge process lifecycle, crash recovery, reconnect caveats, and log locations. |
Commands, examples, and troubleshooting
| File | Read when |
|---|---|
references/commands/quick-reference.md | You need the exact 0.2.4 syntax, flags, aliases, or cleanup forms fast. |
references/examples/real-world-workflows.md | You want complete end-to-end workflows for real targets like Research Powerpack or Everything. |
references/examples/testing-recipes.md | You want short copy-paste checks for smoke tests, schemas, tasks, grep, or cleanup. |
references/troubleshooting/common-errors.md | You hit stale syntax, bad config shape, task-required failures, expired sessions, or transport mismatches. |
Patterns and advanced details
| File | Read when |
|---|---|
references/patterns/session-first-syntax.md | Translating 0.1.11 examples to 0.2.x command-first syntax. |
references/patterns/argument-parsing.md | Quoting arrays, objects, inline JSON, stdin, and key:=value edge cases. |
references/patterns/schema-validation.md | Validating tool and prompt schemas in regression checks. |
references/patterns/config-resolution.md | Understanding mcpServers config shape, file:entry, URL normalization, and path mistakes. |
references/patterns/auth-precedence.md | Deciding between explicit headers, named profiles, default profile, --no-profile, and --x402. |
references/patterns/output-formatting.md | Understanding human vs JSON mode, stderr behavior, exit-code caveats, and isError. |
references/patterns/jq-patterns.md | Advanced JSON filtering after native grep and help are not enough. |
references/patterns/tool-filtering.md | Complementing grep with `tools-list --json |
references/patterns/logging-debugging.md | Using --verbose, bridge logs, and log inspection to explain failures. |
references/patterns/notification-handling.md | Testing list-changed notifications, subscriptions, and server log messages. |
references/patterns/pagination-caching.md | Understanding auto-pagination, tool cache refresh, and dynamic discovery behavior. |
references/patterns/python-integration.md | Driving mcpc from Python subprocess workflows. |
references/patterns/shell-advanced.md | Interactive shell behavior, discovery loops, and task usage inside shell. |
references/patterns/data-model.md | The JSON shapes behind session info, task status, cached metadata, profiles, and storage. |
Guardrails
- Do not teach
0.1.11target-first syntax unless you are explicitly documenting migration. - Do not tell users to test HTTP+SSE with
mcpc 0.2.x; use Streamable HTTP or stdio instead. - Do not assume
tasks-getcan recover the full detached result body. - Do not treat a green success banner as proof that the server call succeeded.
- Do not assume advertised capabilities always mean polished CLI support.
- Do not run
mcpc clean allcasually on machines with saved profiles.