Test your integration - Guidance for testing your MCP integration before submitting to the Cortex Marketplace. - Developer Guide - Cortex - Cortex - Security Operations

MCP Integration Contributor Guide

Product
Cortex
Creation date
2026-05-20
Last date published
2026-05-20
Category
Developer Guide
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.asyncio for all async tests.

  • Use AsyncMock for 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-tool both 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.