Skip to content

How it works ​

Agent mode ​

For each request, the CLI keeps a model and an MCP server talking through it:

Details that matter when you rely on it:

  • The CLI refuses to continue if the server does not advertise the tools capability or returns no tools.
  • The tool list is fetched again for every prompt, so a server that changes its tools between prompts is picked up.
  • The model is told to use the provided MCP tools when they match, not to invent tools or arguments, to say so when no tool fits, and to answer briefly after tool calls.
  • Tool results go back to the model as text, so the final answer reflects what the server actually returned.
  • Each call is logged on stderr as tool> name {json}, which makes it easy to assert on in tests.

Smoke mode ​

Smoke mode uses the same MCP client but no model. See what it checks.

Source layout ​

PathRole
cmd/mcp-smoke-agentThe CLI entry point. Routes smoke to smoke mode and everything else to agent mode.
internal/agentcliAgent-mode flags, server specs, provider config and the interactive loop.
internal/agentThe OpenAI and Anthropic tool-calling loops.
internal/smokecliSmoke-mode flags, steps and the JSON report.
internal/mcpThe MCP client for stdio and Streamable HTTP.
cmd/mcp-test-serverThe bundled test server.

Released under the MIT License.