Dive

Guides

Test an MCP server

Check that Dive can reach an MCP server, list its tools, and call one directly.

Work from the connection up: confirm Dive reaches the server, then that it loads the tools you expect, then that a tool returns what you expect.

Check the connection

dive mcp list shows each configured server and how Dive reaches it:

everything	stdio: npx -y @modelcontextprotocol/server-everything
tracker	http: https://mcp.example.com/mcp

dive mcp test connects to one server and lists its tools:

dive mcp test everything
ok: 'everything' initialized in 1.37s — 13 tools (1 declare output schemas)

List the tools Dive loads

dive mcp tools shows each tool Dive loads from a server, after include_tools and exclude_tools, with its description:

dive mcp tools everything
everything — 2 tools
  echo [read-only]
  Returns the message it is given, prefixed with 'Echo: '.
  get-sum [read-only]
  Returns the sum of two numbers

To change that list, see Filter and override a server's tools.

Call a tool directly

dive tool test calls a tool by its full name and prints the result. Pass input as JSON, as @file, on stdin, or with --input key=value:

dive tool test everything__get-sum '{"a": 2, "b": 3}'
{
  "text": "The sum of 2 and 3 is 5."
}

When the server rejects the call, Dive prints tool returned an error: and the server's message:

tool returned an error:
{
  "text": "MCP error -32602: Input validation error: Invalid arguments for tool get-sum: ..."
}

A tool that returns an error still exits 0. Use --json and check isError in scripts.

When it fails

  • A missing environment variable. Dive names the variable and the setting that uses it, and connects to your other servers as usual:

    mcp server 'tracker' cannot connect: environment variable TRACKER_TOKEN (mcp.tracker.headers.Authorization) is not set; set it, or store it with `dive secret set TRACKER_TOKEN`
  • Anything else. Run with -v, or set DIVE_LOG=debug, to see Dive's log of the connection on stderr.

On this page