Skip to content
Home

Test MCP servers and the agents that use them ​

M3 turns MCP behavior into Python tests. Test a server directly when you need a deterministic protocol contract; put an agent in the loop when you need to check tool selection, arguments, or multi-turn behavior.

Write your first MCP test with a local server and no model credentials. The walkthrough includes a passing test, an intentional failure, and the saved evidence behind both results.

Choose a task ​

I need to…Start here
Check a local MCP serverTest a stdio server
Check a deployed endpointTest Streamable HTTP
Handle a server's elicitation requestPlan an elicitation response
Submit input to a paused agent executionUse managed input
Verify how an agent uses toolsWrite an agent test
Configure credentialsConfigure credentials
Connect an existing ACP agentConnect an ACP-compatible agent
Compare agent harnesses and their versionsCompare agent harnesses and versions
Pin a native harness versionRun a pinned agent harness
Inspect a failed runRead traces
Compare a change with an earlier runCompare with a baseline
Run tests in automationRun M3 in CI
Look up a command or objectReference

Two ways to test ​

A direct test calls the MCP protocol without a model. It is the right starting point for tool schemas, structured results, protocol errors, resources, and prompts. An agent test adds a harness and model so you can inspect the tool calls the agent actually made. The testing model explains the boundary.

The standalone m3 command runs tests in the project environment, saves run history, and serves the local viewer. The m3 Python package is the SDK used by the tests. They are installed separately; see Install and update M3.

Documentation version ​

The site header identifies the M3 release these pages describe. Commands and examples are checked against that release before publication. Use the compatibility reference for version-specific harness support and known boundaries.