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, HTTP/2, gRPC, WebSockets, TCP and more on a single port, with additional support for HTTP/3, message brokers, and AI/LLM APIs.
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Check it deeper on your machine
It has changed since its scan on 11 Nov 2026.
As a Claude Code plugin, install it and then ask Claude Code:
/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/mock-server/mockserver-monorepo with scanskillsafety
Or from a terminal, clone it and run it:
git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/mock-server/mockserver-monorepo'
It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.
Badge for your README
Markdown
[](/listings/mock-server--mockserver-monorepo)HTML
<a href="/listings/mock-server--mockserver-monorepo"><img src="/api/listings/mock-server--mockserver-monorepo/badge.svg" alt="findsafeskills safety rating" /></a>Install
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
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 with [Homebrew](https://brew.sh/) and run the `mockserver` command directly:
brew install mockserver mockserver run --port 1080
For every way to run MockServer — Docker, docker-compose recipes, the `mockserver` CLI, a JVM-less binary bundle, Helm/Kubernetes, the JAR, and Testcontainers — see the [Self-Hosting MockServer guide](https://www.mock-server.com/mock_server/self_hosting_mockserver.html). The same setup can be driven from any client library or the dashboard at <http://localhost:1080/mockserver/dashboard>.
One-command recipes
The [`examples/docker-compose`](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
Drive it from Postman or Bruno
- **Postman** — click the button above, or import [`examples/postman`](examples/postman) ([guide](https://www.mock-server.com/where/postman.html)). - **Bruno** (open-source, git-native) — open [`examples/bruno`](examples/bruno) in [Bruno](https://www.usebruno.com/) via **Open Collection** ([guide](https://www.mock-server.com/where/bruno.html)).
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
README.md · README · 128 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.
- MockServer [](https://buildkite.com/mockserver/mockserver)
- [](https://www.bestpractices.dev/projects/16733)
- [](https://github.com/mock-server/mockserver-monorepo/blob/master/LICENSE.md)
- [](https://github.com/mock-server/mockserver-monorepo/stargazers)
- [](https://artifacthub.io/packages/search?repo=mockserver)
- [](https://mcptoplist.com/server/com.mock-server%2Fmockserver)
- =====
- **MockServer mocks, records, and chaos-tests any HTTP(S) dependency your application talks to — one binary, no per-protocol setup.**
- ## Why MockServer
- - **One port, every protocol** — HTTP/1.1, HTTPS, HTTP/2, gRPC & gRPC-Web, WebSockets and raw TCP are auto-detected from the first bytes of each connection. Beyond that: HTTP/3 (QUIC, experimental), JSON-RPC for MCP/A2A mocking, and AsyncAPI-driven testing against Kafka/MQTT brokers.
- - **Mock, proxy, or both** — return canned/templated/callback responses, or sit as a proxy (port forwarding, HTTP proxy, HTTPS tunneling, SOCKS) and record, inspect, and modify real traffic in flight, with full visibility into TLS-encrypted exchanges.
- - **Chaos engineering built in** — inject latency, dropped connections, and errors on demand to see how your application copes when a dependency misbehaves.
- - **Mock AI too** — chat-completion APIs for OpenAI, Anthropic, Gemini, Bedrock, Azure OpenAI and Ollama (including streaming), plus a built-in MCP server so AI coding assistants can drive MockServer directly.
- - **Generate mocks, don't hand-write them** — from an OpenAPI/Swagger spec, with request matching on method, path, query, headers, cookies, and body (JSON, XML, JSONPath, XPath, regex).
- - **Fits your stack** — Java, JavaScript/Node, Python, Ruby, Go, .NET, Rust, and PHP clients, plus JUnit and Spring support; runs as Docker, Helm/Kubernetes, a JAR, or a WAR, with a live dashboard and optional clustered state for multi-instance deployments.
- See the [changelog](changelog.md) for what shipped in each version.
- ## Getting started in 60 seconds
- Run MockServer with Docker, then mock an endpoint and call it:
- ```bash
- # 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 with [Homebrew](https://brew.sh/) and run the `mockserver` command directly:
- ```bash
- brew install mockserver
- mockserver run --port 1080
- ```
- For every way to run MockServer — Docker, docker-compose recipes, the `mockserver` CLI, a JVM-less binary bundle, Helm/Kubernetes, the JAR, and Testcontainers — see the [Self-Hosting MockServer guide](https://www.mock-server.com/mock_server/self_hosting_mockserver.html). The same setup can be driven from any client library or the dashboard at <http://localhost:1080/mockserver/dashboard>.
- ### One-command recipes
- The [`examples/docker-compose`](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:
- ```bash
- cd examples/docker-compose/mock-from-openapi
- docker compose up
- curl http://localhost:1080/pets
- ```
- ### Drive it from Postman or Bruno
- [](https://god.gw.postman.com/run-collection/3256712-63a2d67a-46d6-41fd-a544-0535e7393e7d?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D3256712-63a2d67a-46d6-41fd-a544-0535e7393e7d%26entityType%3Dcollection%26workspaceId%3D1739eeee-5da1-4112-86a7-b6c094f2b527)
- - **Postman** — click the button above, or import [`examples/postman`](examples/postman) ([guide](https://www.mock-server.com/where/postman.html)).
- - **Bruno** (open-source, git-native) — open [`examples/bruno`](examples/bruno) in [Bruno](https://www.usebruno.com/) via **Open Collection** ([guide](https://www.mock-server.com/where/bruno.html)).
- ## Install
- | Channel | Command |
- |---------|---------|
- | Docker | `docker run -d --rm -p 1080:1080 mockserver/mockserver` |
- | Docker from GitHub Container Registry (avoids Docker Hub's pull limit) | `docker run -d --rm -p 1080:1080 ghcr.io/mock-server/mockserver` |
- | Homebrew (macOS/Linux) | `brew install mockserver` |
- | Helm ([chart guide](helm/mockserver/README.md)) | `helm upgrade --install --namespace mockserver mockserver oci://ghcr.io/mock-server/charts/mockserver` |
- | Maven Central [](https://central.sonatype.com/search?q=g:org.mock-server) | `org.mock-server:mockserver-netty-no-dependencies` — see [all Maven artifacts](https://www.mock-server.com/where/maven_central.html) (server, WARs, JUnit 4/5, Spring, Maven plugin) |
- | npm | [`mockserver-node`](https://www.npmjs.org/package/mockserver-node) (start/stop) |
- **Client libraries** (create expectations, verify requests, drive the control plane from your tests):
- [](https://central.sonatype.com/artifact/org.mock-server/mockserver-client-java)
- [](https://www.npmjs.org/package/mockserver-client)
- [](https://pypi.org/project/mockserver-client/)
- [](https://rubygems.org/gems/mockserver-client)
- [](https://pkg.go.dev/github.com/mock-server/mockserver-monorepo/mockserver-client-go/v9)
- [](https://packagist.org/packages/mock-server/mockserver-client)
- [](https://www.nuget.org/packages/MockServerClient)
- [](https://crates.io/crates/mockserver-client)
- Full install options (SNAPSHOT repository, WAR deployment, Testcontainers modules, package-manager channels) are on the [Self-Hosting guide](https://www.mock-server.com/mock_server/self_hosting_mockserver.html) and [Where to find MockServer](https://www.mock-server.com/where/maven_central.html).
- ## Requirements
- **Runtime:** Java 17+ (raised from Java 11 in MockServer 6.0.0 — see the [Java 17 / Jakarta upgrade guide](docs/operations/migration-java17-jakarta.md); pin to `5.15.x` if you need Java 11). The official Docker image bundles its own JVM, so containerised users need no JVM of their own.
- **Building from source:** JDK 17+.
- **Security note:** MockServer is a **development and testing tool only** — see [SECURITY.md](SECURITY.md).
- ## Documentation
- - Usage guide: [www.mock-server.com](https://www.mock-server.com/)
- - Architecture, code structure, infrastructure, and operations docs: [docs/](docs/README.md)
- - AI/MCP integration: built-in [MCP](https://modelcontextprotocol.io) server at `/mockserver/mcp` — see [llms.txt](https://www.mock-server.com/llms.txt) and the [AI Integration docs](https://www.mock-server.com/mock_server/ai_mcp_setup.html)
- ## Versions
- [](https://github.com/mock-server/mockserver-monorepo/releases)
- - **What changed:** [changelog](changelog.md) and [GitHub releases](https://github.com/mock-server/mockserver-monorepo/releases) (every version is also a [git tag](https://github.com/mock-server/mockserver-monorepo/tags) `mockserver-<version>`).
- - **API docs for a version:** Java API at `https://mock-server.com/versions/<version>/apidocs/index.html`; REST API on [SwaggerHub](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi) (one spec per `major.minor.x`).
- - **Java 11:** the last Java 11-compatible release is [5.15.0](https://github.com/mock-server/mockserver-monorepo/tree/mockserver-5.15.0) (January 2023).
- > **6.0.0 breaking change:** the `<classifier>shaded</classifier>` Maven form was removed. Replace `mockserver-netty:<version>:shaded` with `mockserver-netty-no-dependencies:<version>` (same shaded bytes, new coordinates).
- ## Community & Contributing
- - **Issues / bugs / feature requests:** [GitHub Issues](https://github.com/mock-server/mockserver-monorepo/issues?state=open) — please include your MockServer version, how you're running it (Docker, Maven plugin, etc.), and INFO-level (or higher) log output.
- - **Discussions:** [GitHub Discussions](https://github.com/mock-server/mockserver-monorepo/discussions)
- - **Roadmap:** [GitHub Project](https://github.com/orgs/mock-server/projects/1)
- - **Security policy:** [SECURITY.md](SECURITY.md)
- - **Community tools:** [MockServer Browser Admin](https://github.com/johnnywang1994/mockserver-browser-admin), a React + TypeScript web UI for managing expectations
- - **Contributing:** pull requests are very welcome — read [CONTRIBUTING.md](CONTRIBUTING.md) first, then check the [open issues](https://github.com/mock-server/mockserver-monorepo/issues?state=open) and let us know if you intend to work on something.
- ### Maintainers
- * [James D Bloom](https://blog.jamesdbloom.com)
.claude/settings.json · Bundled script · 55 lines · 2 findings marked
- {
- "permissions": {
- "allow": [
- "Bash(*)",
- "Bash(scripts/ci/bk-pipeline-status.sh:*)",
- "Bash(./scripts/ci/bk-pipeline-status.sh:*)"
- ],
- "deny": [
- "Bash(git push --force*)",
- "Bash(git reset --hard*)",
- "Bash(git clean -fd*)",
- "Bash(rm -rf .)",
- "Bash(rm -rf ..)",
- "Bash(rm -rf ~)",
- Dismissed after review: Runs `rm -rf` against a root or home-directory path
- Line 14 on GitHub
- "Bash(rm -rf /)",
- Dismissed after review: Runs `rm -rf` against a root or home-directory path
- Line 15 on GitHub
- "Bash(rm -rf /*)"
- ]
- },
- "hooks": {
- "PreToolUse": [
- {
- "matcher": "Bash|Write|Edit|MultiEdit|NotebookEdit|Task|Agent",
- "hooks": [
- {
- "type": "command",
- "command": "bash .opencode/scripts/check-halt-hook.sh"
- }
- ]
- },
- {
- "matcher": "Write|Edit|MultiEdit|NotebookEdit",
- "hooks": [
- {
- "type": "command",
- "command": "bash .opencode/scripts/check-bare-checkout-write-hook.sh"
- }
- ]
- }
- ],
- "Stop": [
- {
- "hooks": [
- {
- "type": "command",
- "command": "osascript -e 'display notification \"Task completed\" with title \"Claude Code — MockServer\"'"
- },
- {
- "type": "command",
- "command": "bash .opencode/scripts/aggregate-telemetry.sh .tmp/decisions --csv .tmp/telemetry-latest.csv >/dev/null 2>&1 || true"
- }
- ]
- }
- ]
- }
- }
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.