← all repositories
mock-server/mockserver-monorepo

The mock server that learned to speak AI

A veteran HTTP mocking tool now intercepts LLM traffic and exposes an MCP server so your AI assistant can manage stubs for you.

4.9k stars Java Coding Assistants
mockserver-monorepo
Velocity · 7d
+1.0
★ / day
Trend
steady
star history

What it does MockServer is a Netty-based HTTP(S) mock and proxy for integration testing. You define request matchers (“expectations”) and canned responses, or flip it into proxy mode to record and replay real traffic. It speaks REST, gRPC, and JSON-RPC, and ships with clients for Java, Node, Python, and Ruby plus a built-in web dashboard.

The interesting bit The project has quietly pivoted toward AI workflows. Recent releases add first-class mocking for major LLM providers—Anthropic, OpenAI, Gemini, Bedrock, Ollama—and an MCP server at /mockserver/mcp so AI coding assistants can read context and manipulate expectations directly. Chaos engineering and fault injection now apply to both mocked and forwarded responses, which is more ambition than most test doubles ever muster.

Key highlights

  • Shaded -no-dependencies artifacts relocate all transitive deps under shaded_package.*, eliminating classpath wars with your project’s Netty or Jackson versions
  • Docker one-liner gets you running; Helm chart available for Kubernetes
  • JUnit 4/5 and Spring TestExecutionListener integrations for embedding in Java test suites
  • Maven plugin to start/stop server during build lifecycle
  • Proxy mode supports SSL introspection, HTTP CONNECT tunneling, and SOCKS forwarding

Caveats

  • Java 17+ required since 6.x; Java 11 users must pin to the unmaintained 5.15.x line
  • Explicitly labeled “development and testing tool only”—the authors do not want you exposing this to the internet
  • 6.0.0 broke the old <classifier>shaded</classifier> coordinates; migration to -no-dependencies suffixes is manual

Verdict Worth a look if you need a single tool that mocks REST APIs and LLM calls in the same test suite, or if you want your AI assistant to help maintain test fixtures. Skip it if you just need a lightweight JS-only mock—this is a full Java server with the startup cost to match.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.