PlugWiki
MockServer logo

MockServer MCP Server: Setup for Claude Code, Cursor and Other Apps

OfficialLocal
GetDockermockserver/mockservermock-server/mockserver-monorepo

Lets Claude or Cursor create mocks, record real traffic and replay it, and check API calls on a MockServer you run.

MockServer's own MCP server lets Claude Code, Cursor, Windsurf, Cline and OpenCode create mocks, verify calls and debug failed requests by asking in plain English. It is built into MockServer and is on by default, so you start MockServer and point your assistant at its address. You also need a running MockServer first, such as the Docker image. Tools that clear mocks or stop the server are included, and nothing asks you to sign in by default.

Good for

  • Developers who want an assistant to set up mock APIs for tests
  • Testers who need to see why a request got a 404 or a mismatch
  • Teams building AI agents who want to mock and check AI model replies

Works in

12 should work

Tap an app to see how to set it up and any known problems.

Install MockServer MCP

Claude Code

  1. 1

    Copy this prompt.

    Add the MockServer MCP server to Claude Code. Run this command:
    
    claude mcp add mockserver --transport streamable-http http://localhost:1080/mockserver/mcp
    
    Then check that it loaded and tell me if I need to sign in or restart.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires A running MockServer (Docker or other).

Read-only mode: There is no read-only mode. Do not connect this to a MockServer holding mocks you need to keep.

Start MockServer first with docker run -d --rm -p 1080:1080 mockserver/mockserver; the MCP address is part of it and on by default. The vendor guide gives steps for Cursor, Claude Code, Windsurf, Cline and OpenCode; the other apps use the same address in their own format, adapted by us.

From the vendor's docs. Source.

Tools

  • Creates a mock that answers a matching request

    Sets up a mock response for requests that match a method and path. Use the raw version for header or query matching.

    Try: “Create a mock that returns 200 OK for GET /api/health.”

    Write · create_expectation

  • Forwards matching requests to another host

    Creates a rule that passes matching requests on to a host you name, so you can proxy a real service.

    Try: “Forward all /v1/* requests to api.example.com.”

    Write · create_forward_expectation

  • Builds mocks from an OpenAPI spec

    Creates mocks for the operations and response codes in an OpenAPI spec, and reports where the spec breaks the OpenAPI rules.

    Try: “Mock every endpoint in this OpenAPI spec.”

    Write · create_expectation_from_openapi

  • Turns recorded real traffic into mocks

    Converts traffic recorded through the forwarding proxy into active mocks. A preview option shows the result first.

    Try: “Turn the traffic you recorded into mocks, preview first.”

    Write · create_expectations_from_recorded_traffic

  • Creates a mock in the full JSON format

    For mocks the simple tool cannot express, you pass the whole JSON definition yourself, including templates, callbacks and overrides.

    Try: “Add this raw expectation JSON.”

    Write · raw_expectation

  • Lists the active mocks

    Shows active mocks in full JSON with their IDs, optionally filtered by method or path.

    Try: “List all active expectations for /api/users.”

    Read · list_expectations

  • Shows if MockServer is running and on which ports

    Tells you whether MockServer is up and which ports it listens on.

    Try: “Is MockServer up, and on which ports?”

    Read · get_status

  • Checks a request arrived a set number of times

    After your code has run, asserts that a request matching your method, path or other criteria reached MockServer exactly as many times as you expect.

    Try: “Verify GET /api/health was called exactly twice.”

    Read · verify_request

  • Checks requests arrived in order

    Asserts that the requests you list reached MockServer in that exact order, which catches calls made out of sequence.

    Try: “Verify login was called before profile.”

    Read · verify_request_sequence

  • Lists the requests MockServer received

    Pulls back the requests MockServer has seen so far, which you can narrow by method and path, to inspect what your code actually sent.

    Try: “Show the requests received for /api/orders.”

    Read · retrieve_recorded_requests

  • Lists recorded request and response pairs

    Returns each request MockServer recorded together with the response it sent back.

    Try: “Show the request and response pairs from the last test.”

    Read · retrieve_request_responses

  • Reads MockServer's log messages

    Returns matching, mismatch, action and error log entries, which you can narrow to one request by its correlation ID.

    Try: “Show the logs for the failed request.”

    Read · retrieve_logs

Read from the source code

Permissions

high risk · 4 things to watch

High risk

It can clear all mocks, reset logs and stop the MockServer it is connected to, and the endpoint has no sign-in by default. Use a MockServer meant for testing and keep its port off untrusted networks.

What it can do

  • Read your data
  • Create and change things
  • Delete things
  • Read-only mode

Watch out for

  • It can wipe mocks and stop the server

    The delete tools (clear_expectations and reset) only remove mocks, recorded requests and logs inside the MockServer you connect to, and stop_server shuts that instance down. Nothing outside MockServer is deleted, but use an instance meant for testing. github.com

  • The endpoint is open unless you turn on auth

    Control-plane authorization defaults to off and the bind address defaults to empty. Do not expose port 1080 to networks you do not trust, or enable authorization. github.com

  • Test tools send requests to services you name

    The contract, resiliency and MCP test tools call the target you give them, so point them only at services you own. github.com

  • Recording can capture real traffic

    Spy and capture modes forward and store real requests. Promoting recordings redacts secrets, but review fixtures before you commit them. github.com

Security advisories

No published security advisories for the MCP server as of Nov 1, 2026.

4 other advisories are about the wider mockserver-monorepo project, not this MCP server. See them on GitHub

Technical details
Talks toAny service you point the contract and resiliency tests at. Upstream hosts MockServer forwards to. An AI provider, only when drift detection is configured
Sign-in and keysNo sign-in by default. Control-plane authorization is off unless you set mockserver.controlPlaneAuthorizationEnabled.

Questions

Is this the official MockServer MCP server?

Yes, it is built into MockServer and ships from the project's own repository.

What is the MockServer MCP server URL?

http://localhost:1080/mockserver/mcp on a default install. Change the host or port if your MockServer runs elsewhere.

Do I need to install a separate MCP package?

No. The MCP endpoint is part of MockServer and on by default, so you only start MockServer and add its address to your assistant.

Can I run it read-only?

No. The MCP server has no read-only switch. With control-plane authorization on, read tools need the read role and the rest need the mutate role.

Does it need an API key?

No, not by default. Only drift detection against a real AI provider needs a provider key set on the server.

Which assistants does the setup guide cover?

The vendor guide covers Cursor, Claude Code, Windsurf, Cline, Continue and OpenCode, and shows a LangChain example. Other apps that accept a Streamable HTTP address should also work.

Can I use it from claude.ai or ChatGPT?

Not documented. The vendor setup guide covers Cursor, Claude Code, Windsurf, Cline, Continue and OpenCode, and the endpoint is a localhost address by default, so it is only reachable from tools running on the same machine or network.

Information

updated Nov 2, 2026

Publisher
Official
Package
mockserver/mockserver
Registry
Docker
Transport
Streamable HTTP
Auth
None
Version
9.2.0
License
Apache-2.0
Last commit
Oct 31, 2026
Open issues
1
Listed in
Official MCP registry

WebsiteGitHubDockerOfficial MCP RegistryChangelogIssues

Sources

Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.

Show all 3
  1. www.mock-server.com · mock-server.com
  2. github.com · github.com
  3. github.com · github.com

Facts from the official MCP registry, GitHub, npm, PyPI and the Docker catalog. Updated Nov 2, 2026.