Mockserver MCP server
{
"mcpServers": {
"mockserver": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/mockserver/mockserver:7.6.0"
]
}
}
}{
"mcpServers": {
"mockserver": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/mockserver/mockserver:7.6.0"
]
}
}
}{
"mcpServers": {
"mockserver": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/mockserver/mockserver:7.6.0"
]
}
}
}{
"servers": {
"mockserver": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/mockserver/mockserver:7.6.0"
]
}
}
}{
"mcpServers": {
"mockserver": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/mockserver/mockserver:7.6.0"
]
}
}
}file .mcp.json (in your project root)file claude_desktop_config.jsonfile ~/.cursor/mcp.jsonfile .vscode/mcp.jsonfile ~/.codeium/windsurf/mcp_config.jsonversion 8.0.0
What it does
MockServer is an HTTP(S) mock server and proxy for testing that mocks APIs, records and inspects traffic, and injects failures for chaos testing. It supports HTTP/1.1, HTTPS, HTTP/2, HTTP/3, gRPC, WebSockets, JSON-RPC, and message brokers, and includes mocking for LLM/AI chat-completion APIs. It is for developers and QA engineers who need to test applications against unavailable, incomplete, or unreliable dependencies.
- Mock external APIs during development when those services are unavailable or incomplete, then verify your application calls them correctly.
- Record and replay HTTP traffic in a proxy to inspect requests and responses, set breakpoints, and modify exchanges in flight like a network debugger.
- Inject latency, dropped connections, and errors into dependencies to test how your application handles degraded or failing services.
Tools this server exposes
| Tool | Does |
|---|---|
| mockserver_create_expectation | Create a mock expectation that matches HTTP requests and returns a configured response. |
| mockserver_verify_requests | Assert which requests were received, in what order, and how many times. |
| mockserver_inject_failure | Inject latency, dropped connections, or error responses into a mock to test resilience. |
| mockserver_record_traffic | Proxy and record real traffic, with the ability to inspect and modify requests and responses. |
| mockserver_mock_from_openapi | Generate mock expectations from an OpenAPI or Swagger specification. |
| mockserver_mock_llm_api | Mock chat-completion APIs for OpenAI, Anthropic, Gemini, Bedrock, Azure OpenAI, and Ollama, including streaming responses. |
Before you enable it
An MCP server runs with whatever access you give it. Start with a development account rather than production, and check which tools the server exposes before you let an agent call them unattended.