Test a FastMCP Server
- Run
bin/mcp-testing PATHto inventory tests and MCP surfaces, then read references/test-matrix.md. - Test pure domain functions directly without an MCP runtime.
- Use an in-memory
Client(server)for component discovery, schema, tool/resource/prompt behavior, errors, structured results, elicitation, authorization, visibility, and task semantics. - Mock at the domain adapter boundary, not FastMCP internals. Assert requested side effects and the absence of forbidden side effects.
- Add subprocess tests only for stdio lifecycle/configuration and HTTP tests only for routing, authentication, proxy, streaming, or deployment integration.
- Test every destructive or external operation across preview, approve, decline, authorization failure, timeout, retry, and duplicate request cases.
- Compare the exposed component catalog or fingerprints when compatibility matters.
Use agents/test-reviewer.md to identify missing behavioral and security cases.