mock-mcp

v0.6.0
mock-mcp Checked 4 days ago Published 1 month ago

An MCP server enabling LLMs to write integration tests through live test environment interaction

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_status

Get the current status of the mock-mcp daemon, including active test runs and pending batches.

list_runs

List all active test runs connected to the daemon.

claim_next_batch

Claim the next pending mock batch for processing. This acquires a lease on the batch. You MUST call this before provide_batch_mock_data. The batch will be locked for 30 seconds (configurable via leaseMs). If you don't provide mock data within the lease time, the batch will be released for another adapter to claim.

ParameterTypeDescription
leaseMsnumberOptional: Lease duration in milliseconds. Default: 30000 (30 seconds).
runIdstringOptional: Filter to only claim batches from a specific test run.

get_batch

Get details of a specific batch by ID (read-only, does not claim).

ParameterTypeDescription
batchId *stringThe batch ID to retrieve.

provide_batch_mock_data

Provide mock response data for a claimed batch. You MUST first call claim_next_batch to get the batchId and claimToken. The mocks array must contain exactly one mock for each request in the batch.

ParameterTypeDescription
batchId *stringThe batch ID (from claim_next_batch).
claimToken *stringThe claim token (from claim_next_batch).
mocks *arrayArray of mock responses, one for each request in the batch.

release_batch

Release a claimed batch without providing mock data. Use this if you cannot generate appropriate mocks.

ParameterTypeDescription
batchId *stringThe batch ID to release.
claimToken *stringThe claim token.
reasonstringOptional reason for releasing.