
mockserver-monorepo
MockServer is an HTTP(S) mock server and proxy for testing that lets you mock APIs, inspect and modify live traffic, and inject failures. It supports HTTP/1.1,
Sign in to rate this tool.
Overview

MockServer is a single‑container tool that mocks, proxies, and verifies any HTTP or gRPC service. It can run on any host that supports Docker, no extra SaaS account is needed. The server supports HTTP/1.1, HTTP/2, HTTP/3, HTTPS, TCP and gRPC, so you can use it for most client–server interactions in modern applications.
You start with a simple Docker command: `docker run -d --rm -p 1080:1080 mockserver/mockserver`. The server listens on port 1080 for both mock and proxy traffic. Once running, you create an expectation by sending a JSON payload to `/mockserver/expectation`. The payload describes a request pattern (method, path, headers, query params, body) and a response (status code, body, headers, delay). For example, a GET request to `/hello` can return a 200 with the body “Hello from MockServer.”. The server holds these expectations in memory and serves them for any matching request, enabling unit tests to call predictable endpoints.
MockServer is useful when the real API is unstable, slow, or not yet implemented. By providing a contract early, multiple teams can develop in parallel. If you have an OpenAPI or Swagger definition, you can generate a mock automatically, or you can import a Postman collection or HAR file to replay existing traffic. The import tools create expectations that mirror recorded requests and responses, making it easier to reproduce real‑world scenarios.
The proxy capability lets MockServer sit in front of a production or staging backend. It records incoming requests and outgoing responses to a file, which can later be replayed as a mock. During proxying, you can pause requests at interactive breakpoints in the web dashboard. When a breakpoint triggers, the request or response can be inspected, edited, or forced to fail. This is valuable for debugging or forcing edge cases without modifying client code.
Chaos injection is built in. You can configure latency, errors, dropped connections, and malformed responses for both HTTP and gRPC traffic. This allows resilience testing without a separate load tool. The server also supports declarative load scenarios: you can describe a ramp of virtual users or arrival rates in a JSON file and run the scenario, asserting Service Level Objectives over the generated traffic.
Because MockServer runs locally, it fits teams that prefer to keep dependencies in their own environment.
Details
- Pricing
- Free
- Category
- Assistant
Suggest an edit
Sign in to suggest an edit.
Pros and cons
Pros
- Fully self‑hosted; no external account needed
- Handles multiple protocols and traffic types
- Combines mock, proxy, and verification in one instance
- Live breakpoint inspection supports debugging during tests
Cons
- No published pricing or scaling guidance
- Requires manual configuration of expectations
- Limited to HTTP‑centric protocols; not a general service mocker

