There isn't much documentation on testing and it isn't clear what the recommended and supported way of unit testing MCP endpoints are?
As a unit test it shouldn't involve a sub-process or actually opening an port. But it should test enough of the MCP integration to ensure the endpoint would work, and wouldn't hit unexpected serialization issues etc.