mockserver-monorepo
Health Pass
- License — License: Apache-2.0
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Community trust — 4879 GitHub stars
Code Pass
- Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Pass
- Permissions — No dangerous permissions requested
No AI report is available for this listing yet.
MockServer enables easy mocking of any system you integrate with via HTTP or HTTPS with clients written in Java, JavaScript and Ruby. MockServer also includes a proxy that introspects all proxied traffic including encrypted SSL traffic and supports Port Forwarding, Web Proxying (i.e. HTTP proxy), HTTPS Tunneling Proxying (using HTTP CONNECT) and SOCKS Proxying (i.e. dynamic port forwarding).
MockServer 


MockServer is an HTTP(S) mock server and proxy for testing. Mock any HTTP/HTTPS, REST, gRPC, or JSON-RPC dependency; record-and-replay real traffic as a proxy; and drive it all from a client library (Java, Node, Python, Ruby) or a built-in dashboard. Recent releases add first-class LLM / AI-agent provider mocking (Anthropic, OpenAI, Gemini, Bedrock, Ollama and more), an MCP server for AI coding assistants, and chaos / fault injection on mocked and forwarded responses — see the changelog for what has shipped in each version.
Quick Start
Run MockServer with Docker in seconds:
docker run -d --rm -p 1080:1080 mockserver/mockserver
Then create your first expectation and call it (MockServer exposes a REST control plane on the same port):
# 1. Mock an endpoint: GET /hello -> 200 "Hello World"
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" }
}'
# 2. Call your mock
curl http://localhost:1080/hello
# -> Hello World
The same can be done from any client library or the dashboard at http://localhost:1080/mockserver/dashboard. For more configuration options see the Docker documentation.
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 | ![]() |
| Issues, Bugs & Feature Requests | ![]() |
| Roadmap | ![]() |
| Security | ![]() |
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 
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:
- mockserver-netty-no-dependencies / mockserver-netty — Netty-based HTTP(S) mock + proxy server (embed in tests or run standalone)
- mockserver-war — deployable WAR for hosting MockServer in a servlet container (mock mode)
- mockserver-proxy-war — deployable WAR for hosting MockServer in a servlet container (proxy mode)
Java client:
- mockserver-client-java-no-dependencies / mockserver-client-java — Java client for the MockServer REST API
Test framework integrations:
- mockserver-junit-rule-no-dependencies / mockserver-junit-rule — JUnit 4
@Rule - mockserver-junit-jupiter-no-dependencies / mockserver-junit-jupiter — JUnit 5 extension (
@MockServerSettings,@MockServerTest) - mockserver-spring-test-listener-no-dependencies / mockserver-spring-test-listener — Spring
TestExecutionListener - mockserver-integration-testing-no-dependencies / mockserver-integration-testing — shared integration-test helpers
Build-tool plugin:
- mockserver-maven-plugin — Maven plugin to start, stop, and fork MockServer during the build lifecycle
Tip: The
-no-dependenciesartifacts bundle all dependencies into a single JAR with packages relocated undershaded_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 executablejar-with-dependenciesform for command-line use.
6.0.0 breaking change: the
<classifier>shaded</classifier>form has been removed. Replacemockserver-netty:<version>:shadedwithmockserver-netty-no-dependencies:<version>(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 https://central.sonatype.com/repository/maven-snapshots/org/mock-server/.
Node Module & Grunt Plugin
NPM Registry contains the following module:
- mockserver-node - a Node.js module and Grunt plugin to start and stop MockServer

- mockserver-client-node - a Node.js client for both the MockServer and the proxy

Docker Hub
Docker Hub contains the following artifacts:
- MockServer Docker Container - a Docker container containing the Netty MockServer and proxy
Helm Chart
- MockServer Helm Chart - a Helm Chart that installs MockServer to a Kubernetes cluster (latest: 6.1.0). See the Install MockServer Helm Chart guide for all available versions and configuration options.
MockServer Clients
- mockserver-client-java
- a Java client for both the MockServer and the proxy (use the
-no-dependenciesartifact to avoid transitive dependencies) - mockserver-client-node
- a Node.js and browser client for both the MockServer and the proxy
- mockserver-client-python - a Python client for both the MockServer and the proxy
- mockserver-client-ruby
- a Ruby client for both the MockServer and the proxy
Community Tools
- MockServer Browser Admin - a React + TypeScript SPA for managing MockServer expectations via a web UI
Previous Versions
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. 6.1.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
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found
