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.
Test your MCP with
Choose a task
| I need to… | Start here |
|---|---|
| Check a local MCP server | Test a stdio server |
| Check a deployed endpoint | Test Streamable HTTP |
| Handle a server's elicitation request | Plan an elicitation response |
| Submit input to a paused agent execution | Use managed input |
| Verify how an agent uses tools | Write an agent test |
| Configure credentials | Configure credentials |
| Connect an existing ACP agent | Connect an ACP-compatible agent |
| Compare agent harnesses and their versions | Compare agent harnesses and versions |
| Pin a native harness version | Run a pinned agent harness |
| Inspect a failed run | Read traces |
| Compare a change with an earlier run | Compare with a baseline |
| Run tests in automation | Run M3 in CI |
| Look up a command or object | Reference |
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.