Skip to content
MCP server

Mockserver

Mock, record, verify and chaos-test HTTP, gRPC and LLM dependencies from an AI assistant

Install
Pricing
Open source
Platforms
self-hosted, Linux, macOS
Runs
Remotely
Version
9.2.0
Listing updated
3 days ago

About Mockserver

Mockserver is an open-source MCP server for developer tools. It runs as a hosted remote server, so there is nothing to install locally.

MockServer is an open-source mock server and proxy, and its built-in MCP endpoint lets a coding assistant drive it in plain language. The registry lists a Docker image (mockserver/mockserver:9.2.0) with the MCP endpoint at localhost:1080/mockserver/mcp, so the server runs on your own machine and needs no SaaS account.

One instance can act as a mock, a proxy that records and replays traffic, or both at once. It auto-detects HTTP/1.1, HTTPS, HTTP/2, gRPC, WebSockets and raw TCP on a single port, with experimental HTTP/3. Mocks can be generated from an OpenAPI spec, and it can mock chat-completion APIs for OpenAI, Anthropic, Gemini, Bedrock, Azure OpenAI and Ollama, including streaming. Chaos options inject latency, errors and dropped connections, and breakpoints pause live requests for inspection.

Clients exist for Java, JavaScript, Python, Ruby, Go, .NET, Rust and PHP, and it runs as Docker, Helm, JAR, WAR or a Homebrew-installed command.

Install

Run in a terminal

claude mcp add mockserver -- docker run -i --rm docker.io/mockserver/mockserver:9.2.0

Add to claude_desktop_config.json

{
  "mcpServers": {
    "mockserver": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "docker.io/mockserver/mockserver:9.2.0"
      ]
    }
  }
}
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "mockserver": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "docker.io/mockserver/mockserver:9.2.0"
      ]
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

{
  "servers": {
    "mockserver": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "docker.io/mockserver/mockserver:9.2.0"
      ]
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "mockserver": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "docker.io/mockserver/mockserver:9.2.0"
      ]
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "mockserver": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "docker.io/mockserver/mockserver:9.2.0"
      ]
    }
  }
}

What it does

Mock and proxy
Return canned responses or sit in front of a real backend, even both at once.
Record and replay
Capture real traffic and replay it later.
Request verification
Assert exactly which requests your code sent.
Chaos injection
Add latency, errors and dropped connections.
LLM API mocking
Mock chat-completion APIs including streaming.
OpenAPI generation
Create mocks from an OpenAPI or Swagger spec.

Good for

  • Have an assistant create an expectation for GET /hello
  • Test an app against a mocked LLM endpoint
  • Record a live API's traffic and replay it in tests
  • Inject failures to check resilience
  • Verify a service called a dependency as expected

Pricing

Open source

Free and open source

Prices change. Check mock-server.com before you buy.

Mockserver FAQ

Is it free?

Yes. The site calls it free and open source, needing no SaaS account.

How do I start it?

Run docker run -d --rm -p 1080:1080 mockserver/mockserver, or brew install mockserver on macOS or Linux.

Which protocols are supported?

HTTP/1.1, HTTPS, HTTP/2, gRPC and gRPC-Web, WebSockets and raw TCP, with HTTP/3 experimental.

Can it import existing collections?

Yes. The site lists importing from a Postman collection or HAR file, and OpenAPI generation.

Is Mockserver free?

Yes. Mockserver is open source, so you can use and self-host it for free.

How do I add Mockserver to Claude Code?

Run this command in your terminal: claude mcp add mockserver -- docker run -i --rm docker.io/mockserver/mockserver:9.2.0

What are the best alternatives to Mockserver?

The closest alternatives to Mockserver are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

Alternatives to Mockserver

  1. REA

    MCP server

    CLI and MCP server that lets coding agents reverse engineer apps and binaries

    Runs locally
    • Open source
    • 464K GitHub stars
    • Developer tools
  2. Codebase Memory

    MCP server

    Local MCP server that builds a code knowledge graph for AI coding agents

    Runs locally
    • Open source
    • 48.7K GitHub stars
    • Knowledge and memory
  3. GitHub

    MCP server

    Official MCP server connecting AI assistants to GitHub repos, issues and workflows

    Not checked yet
    • Remote
    • Open source
    • 34.5K GitHub stars
    • Developer tools
  4. MCP toolkit giving coding agents symbol-level code retrieval and editing

    Runs locally
    • Open source
    • 31.5K GitHub stars
    • Developer tools
  5. XERJ

    MCP server

    Local search engine for AI agents with cited answers over your code and docs

    Runs locally
    • Open source
    • 19.2K GitHub stars
    • Knowledge and memory
  6. Ouroboros

    MCP server

    Spec-first layer that pins requirements and verifies results of AI coding agent work

    Runs locally
    • Open source
    • 6.4K GitHub stars
    • Developer tools