Key Capabilities
API SimulationCreate mock APIs from existing code, OpenAPI specifications, or natural language descriptions using AI assistance. Codebase Integration
Generate mocks that reflect your existing API patterns and data structures by analyzing your codebase. Testing with AI Agents
Allow AI coding assistants to validate generated code by testing against realistic mock responses. Independent Development
Work on features that depend on APIs still in development by creating temporary mock implementations.
Installation
Install the WireMock CLI and configure your AI tool:- Install the CLI:
npm i -g @wiremock/cli - Log in:
wiremock login - Configure MCP integration
Supported Tools
WireMock integrates with AI development environments via the Model Context Protocol:
VS Code
CopilotServer Configuration Options
The MCP server is started with thewiremock mcp command (see the installation guide). Append the following options to that command to control the surface the server exposes to your AI tool.
Restricting available tools
Use--disabled-tools to exclude specific tools from the server — for example, to stop an agent from deleting or clearing mock APIs. It takes a comma-separated list of tool names:
delete_mock_api, make_http_request). If the option is omitted or given an empty value, all tools are available.
Disabling HTTP authentication injection
By default, themake_http_request tool automatically attaches configured credentials for matching hosts (see HTTP Request Authentication). Use --no-http-auth-injection to turn this off:
make_http_request tool itself remains available for fetching public URLs.
wiremock mcp --disabled-tools=delete_mock_api,clear_mock_api --no-http-auth-injection.Use Cases
Creating Stateful Mock APIs
Transform static mock APIs into dynamic, stateful versions that maintain state between requests. AI assists in validating mock behavior as it evolves, enabling realistic simulation of complex API interactions and multi-step workflows.
API Discovery and Documentation
Use AI to explore and document undocumented APIs by automatically discovering endpoints, analyzing responses, and generating comprehensive documentation. This is especially valuable when working with legacy systems or third-party APIs.
Mock Drift Detection
Detect and resolve discrepancies between mock APIs and their OpenAPI specifications using AI assistance. Automatically identify when mocks drift from intended behavior and update them to maintain consistency with API contracts.
GraphQL API Behavior Definition
Prototype a GraphQL API schema, instantly simulate it then refine its data and improve realism.
API Dependency Isolation
Generate mock endpoints for your application’s API dependencies and swap real APIs for mocks during development and testing. This enables isolated development without external service dependencies, improving reliability and reducing development costs.
AI-Driven API Prototyping
Leverage AI agents to prototype APIs that don’t yet exist, allowing teams to develop against future services before backend implementation. Create realistic endpoint behaviors and response patterns to unblock frontend development and testing workflows.
Authenticated HTTP Requests
Configure automatic authentication for AI-driven HTTP requests without exposing credentials to the language model. Set up domain-based authentication with OAuth, API keys, or custom headers to enable secure API exploration and testing workflows.