Skip to main content
The mcpjam CLI is a stateless tool for inspecting, debugging, and testing MCP servers from the command line or CI. It covers the full lifecycle: connectivity checks, OAuth login, MCP Apps validation, tool/resource/prompt exploration, and protocol conformance. The easiest way to use the CLI is through the MCPJam skill, which gives your agent full context on every command and workflow.
Once installed, your agent will know how and when to invoke mcpjam commands automatically.

Install

All examples in these docs use mcpjam directly. If you installed via npx, replace mcpjam with npx -y @mcpjam/cli@latest.

Command groups

Global flags

These flags apply to every command.

Output formats

The CLI auto-detects whether stdout is a terminal:
  • Interactive terminal — defaults to --format human. For most commands this is pretty-printed JSON; server doctor and the OAuth conformance commands provide dedicated human-readable summaries.
  • Piped or redirected (CI, | jq, agent invocation) — defaults to --format json, the full structured result.
  • Conformance in CIprotocol conformance, protocol conformance-suite, oauth conformance, oauth conformance-suite, apps conformance, and apps conformance-suite support --reporter junit-xml and --reporter json-summary.
  • Explicit --format always wins over the auto-detected default.
For agents: raw JSON is the source of truth. Human format is a lossy presentation layer. If you’re parsing output programmatically, pass --quiet --format json. JSON-valued flags accept inline JSON, @path, or - for stdin. tools call also accepts --tool-args-stdin as a shorthand for --tool-args -. Use files or stdin for large payloads to avoid shell escaping issues:

Connecting to servers

The CLI supports two transport modes, selected by which flags you pass:
  • --url ... selects HTTP.
  • --command ... selects stdio.
  • --transport http|stdio is optional and acts as an explicit override/validator when you want the CLI to reject mismatched flags early.

HTTP (Streamable HTTP / SSE)

Add auth when needed:

Stdio (local subprocess)

Stdio child processes inherit the parent shell environment by default. Use -e/--env to add values or override inherited ones for the spawned server. Structured debug artifacts only record the explicit env keys you pass through -e/--env; inherited shell variables are not enumerated.
oauth ... and protocol ... are HTTP-only command groups. They do not accept stdio targets.

Update notifications

After a successful command, the CLI checks whether a newer version of @mcpjam/cli is available and prints a notice to stderr when one is found:
The check is non-blocking: version data is fetched in a detached background process and cached locally for 24 hours, so it never slows down your commands. The notice is written to stderr only and never touches stdout or JSON output, so it is safe for both interactive terminals and AI agents (Claude Code, Cursor, etc.) that capture stderr. It is suppressed automatically in CI. To opt out, set one of these environment variables before running any command:

Exit codes

Quick triage workflow

The fastest path from “I have a server URL” to “I know what’s wrong”:

Use from an MCP client instead of a shell

If your agent speaks MCP but can’t run shell commands (Claude Desktop, chat clients), run the same testing engine as a stdio MCP server:
Connections to servers under test stay open between tool calls, so agents can also observe notifications and session behavior that one-shot CLI commands can’t. See MCPJam as an MCP server.

What’s next