Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
Akkshay10 avatar

MCPClientMock

  • 1 repo stars
  • Updated December 17, 2025
  • Akkshay10/MCPClientMock

io.github.Akkshay10/MCPClientMock is a MCP server that controls James Bloom MockServer for expectations, request verification, and mock state.

About

MCPClientMock is a stdio MCP server that talks to a running James Bloom MockServer so coding agents can define expectations, assert that clients sent the right requests, and manage mock lifecycle from chat. Developers shipping REST or webhook integrations can stand up MockServer locally or in CI, point the MCP at MOCKSERVER_HOST and MOCKSERVER_PORT, and use Cursor or Claude Code to iterate on test doubles without constantly switching to the MockServer UI or curl. It belongs on Ship → Testing: you add it when upstream APIs are flaky, expensive, or not ready, and you need repeatable verification before launch. It complements unit tests; it does not replace a full E2E environment unless you configure one.

  • stdio MCP via npm mockserver-mcp (v1.0.2)
  • Create expectations, verify requests, and manage mock state on James Bloom MockServer
  • MOCKSERVER_HOST and MOCKSERVER_PORT target your running MockServer instance
  • GitHub: Akkshay10/MCPClientMock

MCPClientMock by the numbers

  • Data as of Jul 7, 2026 (Skillselion catalog sync)
terminal
claude mcp add --env MOCKSERVER_HOST=YOUR_MOCKSERVER_HOST --env MOCKSERVER_PORT=YOUR_MOCKSERVER_PORT mockserver-mcp -- npx -y mockserver-mcp

Add your badge

Show developers this MCP server is listed on Skillselion. Paste this into your README.

Listed on Skillselion
repo stars1
Packagemockserver-mcp
TransportSTDIO
AuthNone
Last updatedDecember 17, 2025
RepositoryAkkshay10/MCPClientMock

What it does

Let your agent create MockServer expectations, verify HTTP traffic, and reset mock state while you ship API-dependent features.

Who is it for?

Best when you're running MockServer in dev or CI and want agent-assisted expectation setup and request verification.

Skip if: Projects with no HTTP boundaries, or teams that prefer only in-process mocks without a MockServer deployment.

What you get

Your agent can provision and verify HTTP mocks on a live MockServer instance while you refine API client code and test suites.

  • Agent-driven MockServer expectations and verifications
  • Repeatable mock state management during test sessions
  • Faster iteration on API client behavior against controlled responses

By the numbers

  • Server version 1.0.2
  • Transport: stdio
  • npm identifier: mockserver-mcp
README.md

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

Using npx (recommended)

npx mockserver-mcp

Global installation

npm install -g mockserver-mcp
mockserver-mcp

Configuration

Environment Variables

Variable Description Default
MOCKSERVER_HOST MockServer hostname localhost
MOCKSERVER_PORT MockServer port 1080

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

Links

License

MIT

Recommended MCP Servers

How it compares

MockServer control-plane MCP, not a generic HTTP client skill or production monitoring tool.

FAQ

Who is io.github.Akkshay10/MCPClientMock for?

Developers and developers who already use MockServer and want MCP agents to manage expectations and verifications.

When should I use io.github.Akkshay10/MCPClientMock?

Use it in the ship/testing phase when you are stubbing third-party APIs and need the agent to create or verify MockServer expectations.

How do I add io.github.Akkshay10/MCPClientMock to my agent?

Install mockserver-mcp from npm, start MockServer, set MOCKSERVER_HOST and MOCKSERVER_PORT, and register the stdio server in your MCP-capable editor or CLI.

Developer Toolstestingintegrationsbackend

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.