The scripts/integration_test.py is a developer tool for validating the end-to-end functionality of the Earthdata MCP Server against a live Common Metadata Repository (CMR) backend.
Note: This is strictly a developer utility for manual verification of complex search features (pagination cursors, field filtering, response parsing). It is not intended to be run in CI/CD pipelines to avoid hitting production CMR endpoints unnecessarily.
The script verifies:
- Pagination: Ensures
limit,cursor, andnext_cursorbehave correctly across all 7 tools. - Field filtering: Validates that
fieldsparameters successfully trim response payloads while preserving mandatory fields (e.g.concept_id). - Parameter fidelity: Verifies new and complex search parameters (like spatial bounding boxes,
has_granules, sorting). - Data extraction: Checks that the tools parse the CMR JSON payloads correctly and map them to the MCP output schemas.
Start your local MCP server:
uv run uvicorn server:app --port 5001In a separate terminal, run the test script:
uv run python scripts/integration_test.pyTo run against a specific server URL:
uv run python scripts/integration_test.py --url http://localhost:5001/mcp/v1The script connects to the MCP server via SSE (Server-Sent Events) HTTP transport using the mcp client SDK. It sequentially calls MCP tools (call_tool) and asserts the expected structure, count, and content of the returned items.