mockserver-monorepo is a free, open source api development & testing project written in Java and released under Apache-2.0. It has 5,003 GitHub stars, 1,118 forks and 6 open issues, and was last pushed 13 hours ago. On this registry it ranks #49 of 187 tracked projects in API Development & Testing, with 5 head-to-head comparisons available. It gained 24 stars over the last 30 tracked days.

What is mockserver-monorepo?

MockServer is an Apache-2.0 HTTP(S) mock server and proxy that lets teams mock the APIs their applications depend on, inspect and modify live traffic, and inject failures, and it is aimed at developers, QA engineers, and platform teams testing software built on the JVM.

What it is

MockServer is an HTTP(S) mock server and proxy written in Java and released under the Apache-2.0 licence. It does three things: it mocks the APIs an application depends on, it proxies real traffic so requests and responses can be recorded, inspected, and modified in flight, and it applies chaos engineering by injecting latency, dropped connections, and errors. Protocols are auto-detected from the first bytes of each connection, so HTTP/1.1, HTTPS, HTTP/2, gRPC, gRPC-Web, WebSockets, and raw TCP are all served from one port with no per-protocol configuration. Beyond that core, the project covers HTTP/3 over QUIC (experimental, on its own UDP port), JSON-RPC for MCP and A2A mocking, AsyncAPI-driven message-broker testing against external Kafka and MQTT brokers, and mocked AI/LLM chat-completion APIs for OpenAI, Anthropic, Gemini, Bedrock, Azure OpenAI, and Ollama.

The concrete problem it solves is a dependency the application under test cannot exercise: a system that is unavailable, incomplete, or hard to reproduce. MockServer replaces that live upstream API with configured expectations, matched on method, path, query, headers, cookies, and body using JSON, XML, JSONPath, XPath, regex, or an OpenAPI specification, and it returns controlled responses instead. It also replaces ad hoc per-protocol test stubs and one-off traffic recorders with a single proxy that exposes even TLS-encrypted traffic, supports port forwarding, an HTTP web proxy, HTTPS tunneling through CONNECT, and SOCKS, and can pause an exchange at an interactive proxy breakpoint to step through, edit, or abort it. Request verification answers which requests were received, in what order, and how many times.

Key capabilities

  • Mocks HTTP/1.1, HTTPS, HTTP/2, HTTP/3, gRPC, gRPC-Web, JSON-RPC, WebSockets, raw TCP, and message brokers (Kafka, MQTT), matching on method, path, query, headers, cookies, and body.
  • Proxies and records traffic through port forwarding, an HTTP web proxy, HTTPS tunneling via CONNECT, and SOCKS, with recording and modification of requests and responses in flight.
  • Generates expectations directly from an OpenAPI/Swagger specification.
  • Builds dynamic responses with response templating in Velocity, Mustache, and JavaScript, plus class and closure callbacks and webhooks.
  • Verifies received requests by order and count, so assertions cover traffic the application actually sent.
  • Injects latency, dropped connections, slow connections, and errors for chaos and resilience testing.
  • Mocks LLM chat-completion APIs including streaming, and ships a built-in MCP server for AI coding assistants.
  • Exposes a live dashboard at /mockserver/dashboard for watching requests, expectations, and logs in real time.

Who uses it and how

  • Teams developing against third-party APIs that are unavailable, incomplete, or hard to reproduce, using expectations written by hand or generated from an OpenAPI specification.
  • QA and platform engineers running chaos and resilience tests that make a dependency degrade or fail, then checking how the application copes.
  • JVM test suites that drive MockServer inside JUnit and Spring tests through the Java, JavaScript/Node, Python, or Ruby clients.
  • AI-assisted development workflows that use the built-in MCP server, or that mock OpenAI, Anthropic, Gemini, Bedrock, Azure OpenAI, and Ollama chat-completion endpoints.
  • Kubernetes deployments using the Helm chart, with optional clustered state for multi-instance setups.

Getting started

Run the container with docker run -d --rm -p 1080:1080 mockserver/mockserver, then create an expectation through the REST control plane on the same port with PUT /mockserver/expectation and call the mocked path. The project also ships as a JAR or WAR, as a Helm chart for Kubernetes, and as a Homebrew package on macOS and Linux.

How it compares

No paid products this project replaces are listed in the facts, and no similar tools are named either, so MockServer stands alone in this registry. Any comparison would have to be drawn from outside the supplied facts.

When to use it — and when not to

A self-hoster must operate the runtime, whether that is Docker, a Kubernetes cluster with the Helm chart, or a Java process running the JAR or WAR, and multi-instance deployments add optional clustered state to manage. Teams that want a managed or hosted service, or that do not want to run a JVM service at all, should look elsewhere. HTTP/3 support is flagged experimental and runs on a separate UDP port, so it is not a drop-in guarantee for production traffic.

project readme (upstream, from github) — read inline

MockServer            Build status GitHub license GitHub stars Artifact Hub MCP Toplist

MockServer is an HTTP(S) mock server and proxy for testing. It does three things:

  • Mock the APIs your application depends on, so you can develop and test against systems that are unavailable, incomplete, or hard to reproduce.
  • Proxy real traffic to record, inspect, and modify requests and responses in flight — and pause them at interactive proxy breakpoints to step through, edit, or abort each exchange like a debugger for network traffic.
  • Chaos engineering — make dependencies misbehave on demand, injecting latency, dropped connections, and errors to test how your application copes when the systems it relies on degrade or fail.

Speaks every protocol your stack uses. HTTP/1.1 & HTTPS, HTTP/2, gRPC & gRPC-Web, WebSockets and raw TCP are auto-detected from the first bytes of each connection, so one MockServer port handles them all with no per-protocol configuration. Beyond that core: HTTP/3 (QUIC — experimental, on its own UDP port), JSON-RPC for MCP/A2A mocking, AsyncAPI-driven message-broker testing against external Kafka and MQTT brokers, and mocked AI/LLM chat-completion APIs (OpenAI, Anthropic, Gemini, Bedrock, Azure OpenAI, Ollama).

Main Features

  • Mock any API — HTTP/1.1, HTTPS, HTTP/2, HTTP/3, gRPC, gRPC-Web, JSON-RPC, WebSockets, raw TCP, and message brokers (Kafka, MQTT). Match requests on method, path, query, headers, cookies and body (JSON, XML, JSONPath, XPath, regex, OpenAPI) and return configured responses.
  • Proxy & record — port forwarding, web (HTTP) proxy, HTTPS tunneling (CONNECT) and SOCKS, with full visibility of even TLS-encrypted traffic.
  • Dynamic responses — response templating (Velocity, Mustache, JavaScript), class/closure callbacks and webhooks.
  • OpenAPI — generate expectations directly from an OpenAPI/Swagger specification.
  • Verification — assert which requests were received, in what order, and how many times.
  • Chaos & resilience testing — inject latency, dropped/slow connections and failures to test how your system copes with a misbehaving dependency.
  • LLM / AI mocking — mock chat-completion APIs for OpenAI, Anthropic, Gemini, Bedrock, Azure OpenAI and Ollama (including streaming), plus a built-in MCP server for AI coding assistants.
  • Live dashboard — watch requests, expectations and logs in real time at /mockserver/dashboard.
  • Clients & integrations — Java, JavaScript/Node, Python and Ruby clients, plus JUnit and Spring support.
  • Run anywhere — Docker, Helm/Kubernetes, JAR or WAR, with optional clustered state for multi-instance deployments.

See the changelog for what has shipped in each version.

Getting started in 60 seconds

Run MockServer with Docker, then mock an endpoint and call it:

# 1. Start MockServer
docker run -d --rm -p 1080:1080 mockserver/mockserver

# 2. Mock an endpoint: GET /hello -> 200 "Hello World"
#    (MockServer exposes a REST control plane on the same port)
curl -X PUT http://localhost:1080/mockserver/expectation \
  -H 'Content-Type: application/json' \
  -d '{
        "httpRequest":  { "method": "GET", "path": "/hello" },
        "httpResponse": { "statusCode": 200, "body": "Hello World" }
      }'

# 3. Call your mock
curl http://localhost:1080/hello
# -> Hello World

…or, on macOS / Linux, install it with Homebrew and run the mockserver command directly:

brew install mockserver
mockserver run --port 1080
One-command recipes

For common end-to-end setups, the examples/docker-compose recipes are a single docker compose up each — mock from an OpenAPI spec, a record/replay proxy, a contract-validating proxy, or a chaos proxy:

cd examples/docker-compose/mock-from-openapi
docker compose up
curl http://localhost:1080/pets

The same can be done from any client library or the dashboard at . For more configuration options see the Docker documentation.

For every way to run MockServer yourself — Docker, docker-compose recipes, the mockserver CLI, the JVM-less binary bundle, Helm/Kubernetes, the JAR, and Testcontainers — see the Self-Hosting MockServer guide.

Drive it from Postman or Bruno

Explore MockServer's REST control plane from an API client — create expectations, verify requests, and inspect recorded traffic:

Run in Postman

Documentation

For usage guide please see: www.mock-server.com

Developer Documentation

Architecture, code structure, infrastructure, and operations documentation is available in the docs/ directory.

AI Integration

MockServer includes a built-in MCP server for AI coding assistant integration at /mockserver/mcp. See llms.txt and AI Integration docs.

Change Log

Please see: Change Log

Community

Discussions GitHub Discussions
Issues, Bugs & Feature Requests GitHub Issues
Roadmap GitHub Project
Security Security Policy

Requirements

Runtime: MockServer 6.x requires Java 17+. The minimum was raised from Java 11 as part of the Jakarta EE 10 / Spring 7 platform modernisation — see the Java 17 / Jakarta upgrade guide. If you are still on Java 11, pin to the 5.15.x line (no longer receiving security updates). The official Docker image already bundles a Java 17 runtime.

Building from source: requires JDK 17+; the produced bytecode targets Java 17.

Security Note: MockServer is a development and testing tool only. See SECURITY.md for important security considerations.

Versions

Maven Central mockserver

Maven Central contains the following MockServer artifacts under the org.mock-server groupId. Every artifact ships in two forms — -no-dependencies (shaded, zero transitive deps, recommended) and the plain form (transitive deps declared in the POM, for the rare case where you need to override versions yourself).

Server:

Java client:

Test framework integrations:

Build-tool plugin:

Tip: The -no-dependencies artifacts bundle all dependencies into a single JAR with packages relocated under shaded_package.*, so they declare zero transitive dependencies. This avoids classpath conflicts with versions of Netty / Jackson / Guava / Bouncy Castle that your project already uses, and it removes the noise from CVE scanners flagging unused transitive dependencies. See the Maven Central page for full coordinates, snapshot repository setup, and the executable jar-with-dependencies form for command-line use.

6.0.0 breaking change: the shaded form has been removed. Replace mockserver-netty::shaded with mockserver-netty-no-dependencies: (and likewise for the other shaded artifacts). The replacement produces the same shaded bytes; only the coordinates change.

SNAPSHOT builds are published to the Sonatype Central Portal snapshot repository at .

Node Module & Grunt Plugin

NPM Registry contains the following module:

Docker Hub

Docker Hub contains the following artifacts:

Homebrew Homebrew version

MockServer is available in Homebrew (homebrew-core), the package manager for macOS and Linux:

brew install mockserver   # then run: mockserver -serverPort 1080

See the Homebrew install page and the command-line usage guide.

Helm Chart
  • MockServer Helm Chart - installs MockServer into a Kubernetes cluster. The chart is published to the GitHub Container Registry as an OCI artifact (no helm repo add needed):

    helm upgrade --install --create-namespace --namespace mockserver --version 7.6.0 mockserver oci://ghcr.io/mock-server/charts/mockserver
    

    See the Install MockServer Helm Chart guide for all versions and configuration options. A legacy .tgz is also available from www.mock-server.com.

MockServer Clients
Community Tools
Previous Versions
Version Date Git & Docker Tag / Git Hash Documentation Java API REST API
7.6.0 (latest) 06 Jun 2026 mockserver-7.6.0 / 9755e9 Documentation Java API 7.6.x REST API
6.1.0 27 May 2026 mockserver-6.1.0 / 33c273 Documentation Java API 6.1.x REST API
6.0.0 20 May 2026 mockserver-6.0.0 / 6a254e Documentation Java API 6.0.x REST API
5.15.0 11 Jan 2023 mockserver-5.15.0 / 7c071b Documentation Java API 5.15.x REST API
5.14.0 22 Aug 2022 mockserver-5.14.0 / 808eba Documentation Java API 5.14.x REST API
5.13.2 05 Apr 2022 mockserver-5.13.2 / 81105b Documentation Java API 5.13.x REST API
5.13.1 02 Apr 2022 mockserver-5.13.1 / 39d1cc Documentation Java API 5.13.x REST API
5.13.0 17 Mar 2022 mockserver-5.13.0 / 604888 Documentation Java API 5.13.x REST API
5.12.0 12 Feb 2022 mockserver-5.12.0 / 61747f Documentation Java API 5.12.x REST API
5.11.2 08 Nov 2020 mockserver-5.11.2 / eb84f2 Documentation Java API 5.11.x REST API
5.11.1 22 Jul 2020 mockserver-5.11.1 / 361e5c Documentation Java API 5.11.x REST API
5.11.0 08 Jul 2020 mockserver-5.11.0 / 756758 Documentation Java API 5.11.x REST API
5.10.0 24 Mar 2020 mockserver-5.10.0 / 14124d Documentation Java API 5.10.x REST API
5.9.0 01 Feb 2020 mockserver-5.9.0 / eacf07 Documentation Java API 5.9.x REST API
5.8.1 23 Dec 2019 mockserver-5.8.1 / f0e9ab Documentation Java API 5.8.x REST API
5.8.0 01 Dec 2019 mockserver-5.8.0 / 7c9fc5 Documentation Java API 5.8.x REST API
5.7.2 16 Nov 2019 mockserver-5.7.2 / 7c9fc5 Documentation Java API 5.7.x REST API
5.7.1 09 Nov 2019 mockserver-5.7.1 / 0ca353 Documentation Java API 5.7.x REST API
5.7.0 01 Nov 2019 mockserver-5.7.0 / b58bc5 Documentation Java API 5.7.x REST API
5.6.1 21 Jul 2019 mockserver-5.6.1 / aec1fb Documentation Java API 5.6.x REST API
5.6.0 21 Jun 2019 mockserver-5.6.0 / 8f82dc Documentation Java API 5.6.x REST API
5.5.4 26 Apr 2019 mockserver-5.5.4 / 4ffd31 Documentation Java API 5.5.x REST API
5.5.1 29 Dec 2018 mockserver-5.5.1 / 11d8a9 Documentation Java API 5.5.x REST API
5.5.0 15 Nov 2018 mockserver-5.5.0 / 06e6fd Documentation Java API 5.5.x REST API

Issues

If you have any problems, please check the project issues and avoid opening issues that have already been fixed. When you open an issue please provide the following information:

  • MockServer version (i.e. 7.6.0)
  • How your running the MockServer (i.e maven plugin, docker, etc)
  • MockServer log output, at INFO level (or higher)
  • What the error is
  • What you are trying to do

Contributions

Pull requests are, of course, very welcome! Please read our contributing to the project guide first. Then head over to the open issues to see what we need help with. Make sure you let us know if you intend to work on something. Also check out the project roadmap to see what is already in the backlog.

Feature Requests

Feature requests are submitted to GitHub issues and tracked on the project roadmap.

Maintainers

Frequently asked questions

Is mockserver-monorepo free to use?

mockserver-monorepo is open source under the Apache-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does mockserver-monorepo do?

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,

What is mockserver-monorepo written in?

mockserver-monorepo is primarily written in Java. Its source is publicly available at https://github.com/mock-server/mockserver-monorepo, and it has 5,003 GitHub stars.