Abstract
Guidance for testing your MCP integration before submitting to the Cortex Marketplace.
You should create comprehensive unit tests in <VendorName>MCP_test.py and include the following:
Use
@pytest.mark.asynciofor all async tests.Use
AsyncMockfor mocking async client methods.Test all command branches, including
test-module,list-tools,call-tool, and OAuth commands if applicable.Test success cases, error cases, and edge cases.
Test
call-toolboth with and without the arguments parameter.
Review Packs/GitHubMCP/Integrations/GitHubMCP/GitHubMCP_test.py for a simple example and Packs/GenericMCP/Integrations/GenericMCP/GenericMCP_test.py for a comprehensive example.