Skip to main content
The server command group gives you a breadth-first view of any MCP server — connectivity, OAuth discovery, capabilities, tools, resources, and prompts — without writing code.

Quick start

If the server requires OAuth, doctor reports oauth_required with the discovery metadata. See OAuth login to obtain a token, then re-run with --oauth-access-token.

Commands

server probe

Stateless HTTP probe — no full client connection. Tests transport selection, OAuth discovery, and WWW-Authenticate parsing.
Use this when you want to check reachability and OAuth metadata without triggering a full MCP initialize handshake. The probe sends an unauthenticated initialize request and inspects the response. What it returns:
  • Transport type (streamable-http, SSE, or failed)
  • OAuth metadata (resource metadata URL, authorization server metadata, registration strategies, scopes)
  • WWW-Authenticate header parsing
Sensitive fields such as Authorization headers are automatically redacted to [REDACTED] in the printed result.

server doctor

Combined triage — runs probe, then attempts a full client connection, then sweeps tools, resources, resource templates, and prompts. Returns a single JSON artifact.
What it returns:
  • status: ready, oauth_required, or error
  • Probe results (transport, OAuth discovery)
  • Initialization info and negotiated capabilities
  • Counts: tools, resources, resource templates, prompts
The --out <path> flag writes the full JSON artifact to a file — useful for handoff to another engineer or agent. For stdio targets, those artifacts only record the explicit env keys you passed via -e/--env; inherited shell variables are not enumerated. Sensitive fields such as Authorization headers are automatically redacted to [REDACTED] in all printed output and written artifacts, including RPC logs attached via --rpc.

server info

Get initialization info for a connected server.
Returns the server’s serverInfo (name, version) and capabilities from the MCP initialize response.

server capabilities

Get resolved server capabilities.

server validate

Connect to a server and verify the debugger surface works.

server ping

Simple connectivity check.

server export

Export a full snapshot of the server’s tools, resources, prompts, and capabilities as JSON.

Shared server flags

Every server subcommand accepts these flags for specifying how to connect: Stdio child processes inherit the parent shell environment by default. Use -e/--env to add values or override inherited ones, and --cwd when the command must run from a project directory. If you pass --transport, the CLI validates that it matches the target flags you provided instead of silently inferring the transport.

Common patterns

Triage an unknown server

For multi-command sessions, save credentials to a file to avoid re-extracting the token:

Compare before/after a deploy

CI health check