DEV.co
AI Frameworks · mock-server

mockserver-monorepo

MockServer is a Java-based HTTP(S) mock server and traffic proxy for development and testing. It auto-detects and handles HTTP/1.1, HTTP/2, gRPC, WebSockets, TCP, and message brokers on a single port, with support for chaos engineering, OpenAPI-driven mocking, and AI/LLM API simulation.

Source: GitHub — github.com/mock-server/mockserver-monorepo
4.9k
GitHub stars
1.1k
Forks
Java
Primary language
Apache-2.0
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositorymock-server/mockserver-monorepo
Ownermock-server
Primary languageJava
LicenseApache-2.0 — OSI-approved
Stars4.9k
Forks1.1k
Open issues4
Latest releasemockserver-7.4.0 (2026-07-04)
Last updated2026-07-07
Sourcehttps://github.com/mock-server/mockserver-monorepo

What mockserver-monorepo is

Written in Java, MockServer provides protocol-agnostic request matching (method, path, query, headers, body patterns including JSONPath/XPath/regex), dynamic response templating (Velocity, Mustache, JavaScript), TLS inspection, record/replay proxying, and verification APIs. Deployable as Docker, JAR, WAR, Kubernetes/Helm, or CLI binary; supports Java 17+.

Quickstart

Get the mockserver-monorepo source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/mock-server/mockserver-monorepo.gitcd mockserver-monorepo# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Multi-protocol API mocking in development

Mock HTTP/1.1, HTTP/2, gRPC, WebSockets, and TCP endpoints simultaneously on one port without per-protocol configuration, accelerating iterative development against incomplete or unavailable dependencies.

Chaos and resilience testing

Inject latency, dropped connections, and failure scenarios on demand to validate how your application degrades gracefully when external dependencies misbehave or become unavailable.

OpenAPI-driven contract testing and AI/LLM mocking

Generate mock expectations directly from OpenAPI specs for contract validation; mock chat-completion APIs (OpenAI, Anthropic, Gemini, Bedrock, Ollama) for testing AI-integrated applications with built-in MCP server support.

Implementation considerations

  • Java 17+ is a hard requirement for versions 6.x and later; ensure your build and runtime environments meet this baseline before adoption.
  • Protocol auto-detection from the first bytes of each connection simplifies multi-protocol mocking but requires careful network configuration to avoid port conflicts or ambiguity in test environments.
  • Dynamic response templating (Velocity, Mustache, JavaScript) and request matching (JSONPath, XPath, regex) are powerful but add complexity to test expectations; start with simple patterns and validate incrementally.
  • Proxy mode with TLS inspection requires certificate trust chain setup; test certificates for development are bundled, but production use requires explicit security review.
  • Verification and chaos features are REST-driven via the control plane (same port); integrate with CI/CD via client libraries (Java, JavaScript, Python, Ruby) or REST calls rather than relying on UI-only workflows.

When to avoid it — and what to weigh

  • Production traffic routing required — MockServer is explicitly a development and testing tool (per SECURITY.md). Do not use for production workload routing or expose to untrusted networks without hardening.
  • Minimal Java footprint is non-negotiable — Requires Java 17+ runtime; if you are locked to Java 11 or earlier, you must pin to the 5.15.x line (no longer receiving security updates).
  • Stateless, ephemeral mock scenarios only — While it supports clustered state deployment, managing state across multiple instances adds operational complexity; simpler for single-instance or per-test ephemeral use.
  • No native binary requirement — Although a JVM-less binary bundle exists, the core server is JVM-based; if you need a pure Go, Rust, or Node alternative, consider Prism or similar.

License & commercial use

Licensed under Apache License 2.0 (Apache-2.0), a permissive OSI-approved license allowing commercial and proprietary use with standard Apache conditions (attribution, notice of changes).

Apache-2.0 permits commercial use, including in proprietary applications, provided you retain license notices and disclaim implied warranties. No usage restrictions exist, but MockServer is explicitly a development/testing tool—do not deploy to production without security hardening review. Consult your legal team if using in regulated industries.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceActive
DocumentationStrong
License clarityClear
Deployment complexityLow
DEV.co fitStrong
Assessment confidenceHigh
Security considerations

MockServer is a development and testing tool only; SECURITY.md must be reviewed before any use. Key points: do not expose to untrusted networks, TLS inspection intercepts encrypted traffic (test certs bundled), proxy mode can inspect live traffic (privacy implications), and chaos features can disrupt systems. No exploit disclosure details are provided in the data; refer to the security policy for responsible disclosure.

Alternatives to consider

Prism (Stoplight)

Lightweight, Node/Go-based OpenAPI mock server; simpler for stateless API mocking but lacks protocol auto-detection, chaos features, and Java integration.

Wiremock

Java-based HTTP mock server with strong test framework integration; focused on HTTP/HTTPS, smaller feature set than MockServer, less native multi-protocol support.

Mitmproxy

Python-based HTTP/HTTPS proxy with scripting; strong for interactive debugging and live traffic inspection but not designed for mock expectation management or chaos engineering.

Software development agency

Build on mockserver-monorepo with DEV.co software developers

Start mocking with MockServer in 60 seconds using Docker or Homebrew. Explore the full feature set at www.mock-server.com or review the GitHub project for integration options.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related on DEV.co

Explore the category and the services that help you build with it.

mockserver-monorepo FAQ

Can MockServer run on a single port for multiple protocols?
Yes. MockServer auto-detects HTTP/1.1, HTTP/2, gRPC, gRPC-Web, WebSockets, and raw TCP from the first bytes of each connection on a single port. HTTP/3 (experimental) uses a separate UDP port.
What Java version do I need?
Java 17+ for MockServer 6.x and later. If locked to Java 11, pin to 5.15.x (no longer receiving security updates).
Can I use MockServer in production?
No. MockServer is explicitly a development and testing tool. Production use requires explicit security hardening review and is not recommended.
How do I mock OpenAI or other LLM APIs?
MockServer has built-in LLM mocking for OpenAI, Anthropic, Gemini, Bedrock, Azure OpenAI, and Ollama (including streaming responses) and a built-in MCP server for AI coding assistants.

Software developers & web developers for hire

DEV.co is a software development agency delivering custom software development services to companies building on open source. Our software developers and web developers design, integrate, and ship production systems — spanning web development, APIs, AI, data, and cloud. If mockserver-monorepo is part of your ai frameworks roadmap, our team can implement, customize, migrate, and maintain it.

Ready to simplify API testing?

Start mocking with MockServer in 60 seconds using Docker or Homebrew. Explore the full feature set at www.mock-server.com or review the GitHub project for integration options.