io.github.Akkshay10/MCPClientMock

Official registry Security

MCP server for James Bloom MockServer - create expectations, verify requests, and manage mock state

Install

Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).

NPM package mockserver-mcp
Claude Code
claude mcp add mcpclientmock -e 'MOCKSERVER_HOST=<MOCKSERVER_HOST>' -e 'MOCKSERVER_PORT=<MOCKSERVER_PORT>' -- npx -y mockserver-mcp@1.0.2
JSON configuration (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "mcpclientmock": {
            "command": "npx",
            "args": [
                "-y",
                "mockserver-mcp@1.0.2"
            ],
            "env": {
                "MOCKSERVER_HOST": "<MOCKSERVER_HOST>",
                "MOCKSERVER_PORT": "<MOCKSERVER_PORT>"
            }
        }
    }
}

Environment variables

  • MOCKSERVER_HOST MockServer hostname
  • MOCKSERVER_PORT MockServer port

Documentation

From the project's README on GitHub, refreshed weekly. Links open on GitHub.

Contents
  1. mockserver-mcp
  2. Prerequisites
  3. Installation
  4. Configuration
  5. Available Tools
  6. Why Mocking?
  7. Requirements
  8. Links
  9. License

mockserver-mcp

An MCP (Model Context Protocol) server for interacting with James Bloom's MockServer. This enables AI assistants to create mock HTTP expectations, verify requests, clear state, and manage MockServer instances programmatically.

Prerequisites

You need a running MockServer instance:

# Using Docker (easiest)
docker run -d -p 1080:1080 mockserver/mockserver

Installation

npx mockserver-mcp
Global installation
npm install -g mockserver-mcp
mockserver-mcp

Configuration

Environment Variables
VariableDescriptionDefault
MOCKSERVER_HOSTMockServer hostnamelocalhost
MOCKSERVER_PORTMockServer port1080
MCP Client Configuration

Add to your MCP client configuration file (e.g., Claude Desktop, Kiro, Cursor):

{
  "mcpServers": {
    "mockserver": {
      "command": "npx",
      "args": ["-y", "mockserver-mcp"],
      "env": {
        "MOCKSERVER_HOST": "localhost",
        "MOCKSERVER_PORT": "1080"
      }
    }
  }
}

For shared team MockServer, change MOCKSERVER_HOST to your server's address.

Available Tools

mockserver_create_expectation

Create a mock HTTP expectation on MockServer.

Parameters:

  • httpRequest (required): Request matching criteria
    • method: HTTP method (GET, POST, PUT, DELETE, etc.)
    • path: URL path to match
    • queryStringParameters: Query parameters to match
    • headers: Headers to match
    • body: Body matcher with type (STRING, JSON, REGEX, XPATH, JSON_PATH) and value
  • httpResponse: Response configuration
    • statusCode: HTTP status code
    • headers: Response headers
    • body: Response body (string or object)
    • delay: Response delay with timeUnit and value
  • times: How many times to match (remainingTimes, unlimited)
  • timeToLive: Expectation lifetime (timeUnit, timeToLive)

Example:

{
  "httpRequest": {
    "method": "GET",
    "path": "/api/users"
  },
  "httpResponse": {
    "statusCode": 200,
    "body": { "users": [] }
  }
}
mockserver_verify

Verify that requests matching criteria were received by MockServer.

Parameters:

  • httpRequest (required): Request matching criteria (same as create_expectation)
  • times: Expected request count
    • atLeast: Minimum number of requests
    • atMost: Maximum number of requests
    • exactly: Exact number of requests

Example:

{
  "httpRequest": {
    "method": "POST",
    "path": "/api/orders"
  },
  "times": {
    "atLeast": 1
  }
}
mockserver_clear

Clear expectations and recorded requests from MockServer.

Parameters:

  • httpRequest (optional): Request matcher to clear specific expectations. If not provided, clears all.

Example:

{
  "httpRequest": {
    "path": "/api/users"
  }
}
mockserver_reset

Perform a full reset of MockServer, clearing all expectations and recorded requests.

Parameters: None

mockserver_retrieve_requests

Retrieve recorded requests from MockServer.

Parameters:

  • httpRequest (optional): Request matcher to filter recorded requests

Example:

{
  "httpRequest": {
    "method": "GET"
  }
}
mockserver_status

Get MockServer connection status and configuration.

Parameters: None

Why Mocking?

API mocking enables early testing — start building and testing your frontend or integrations before the backend is ready. No more waiting. Ship faster.

Requirements

  • Node.js >= 18.0.0
  • A running MockServer instance

License

MIT

Frequently asked questions

What is io.github.Akkshay10/MCPClientMock?

MCP server for James Bloom MockServer - create expectations, verify requests, and manage mock state

How do I install io.github.Akkshay10/MCPClientMock?

It runs on your machine. In Claude Code: claude mcp add mcpclientmock -e 'MOCKSERVER_HOST=<MOCKSERVER_HOST>' -e 'MOCKSERVER_PORT=<MOCKSERVER_PORT>' -- npx -y mockserver-mcp@1.0.2. For other clients, paste the JSON configuration from this page into their MCP settings.

Does io.github.Akkshay10/MCPClientMock need an API key?

Its registry entry lists no required key or secret. Some features may still need an account with the service it connects to.

Is io.github.Akkshay10/MCPClientMock open source?

Yes. Its code is on GitHub under the MIT license.

Who maintains io.github.Akkshay10/MCPClientMock?

It is published by Akkshay10. AI.tn lists it but does not maintain or endorse it.

From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.