Labsco
MCP SERVER · OFFICIAL PROJECT

MockLoop

by MockLoop

Generate a running mock API from an OpenAPI spec, drive traffic at it, and read the request logs back as analysis.

API Specifications & HTTP ToolingOfficial source
Summary
The mock keeps the logs, so the test result is evidence rather than an assertion.

Every generated server logs full requests and responses, and query_mock_logs turns those into latency percentiles, error rates and traffic patterns — you can see what the client under test actually sent, not what it claimed to. The scenario tools are the other half: switch the mock into an error or load configuration without regenerating it.

What it is

A mock-server generator and test platform. It turns an API specification into a FastAPI mock with logging, an admin interface and Docker files, then gives you tools to run scenarios against it and analyse what happened.

What you get
  • generate_mock_api — a FastAPI mock server from a spec URL or local file, with auth, webhooks, admin UI and storage each switchable
  • query_mock_logs — request logs filtered by method, path pattern and time range, with performance metrics and traffic patterns
  • discover_mock_servers — find running mock servers and their configuration
  • manage_mock_data — update responses and create, switch and list scenarios on a running server
  • validate_scenario_config, deploy_scenario, switch_scenario, list_active_scenarios — scenario lifecycle
  • execute_test_plan, run_test_iteration, run_load_test, run_security_test — test execution
  • analyze_test_results, generate_test_report, compare_test_runs, get_performance_metrics — results and trends
  • create_test_session, end_test_session, schedule_test_suite, monitor_test_progress — workflow management
  • create_test_session_context, create_workflow_context, create_agent_context — stateful context for long runs
  • get_context_data, update_context_data, list_contexts_by_type, create_context_snapshot, restore_context_snapshot — context data with snapshot and rollback
  • get_global_context_data and update_global_context_data — state shared across sessions
  • Prompts for scenario generation, including analyze_openapi_for_testing, generate_error_scenarios and generate_security_test_scenarios
Requirements

Python 3.10+ and pip; install from PyPI as mockloop-mcp and point your client at the mockloop-mcp command. Docker and Docker Compose are needed to run the generated mock servers, which ship with their own Dockerfile and compose file. The generated server uses separate ports for the mocked API and the admin interface.

Setup effort

One command — pip install mockloop-mcp