# Mockserver

> Mockserver is an open-source MCP server for developer tools. Mock, record, verify and chaos-test HTTP, gRPC and LLM dependencies from an AI assistant. It runs as a hosted remote server, so there is nothing to install locally.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** self-hosted, Linux, macOS, Windows, CLI, API
- **Website:** https://www.mock-server.com
- **Repository:** https://github.com/mock-server/mockserver-monorepo
- **MCP Registry name:** com.mock-server/mockserver
- **Categories:** developer tools
- **Listing updated:** 2026-11-14

## About

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.

## Features

- **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

## Install

### Claude Code (Terminal)

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

### Claude Desktop (claude_desktop_config.json)

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

### Cursor (~/.cursor/mcp.json)

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

### VS Code (.vscode/mcp.json)

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

### Windsurf (~/.codeium/windsurf/mcp_config.json)

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

### Other clients (your client's MCP settings (most use this shape))

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

## 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

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/mockserver
