akkshay10 avatar

Mcpclientmock

akkshay10/mcpclientmock

Wraps James Bloom's MockServer in an MCP interface so you can create HTTP expectations, verify request patterns, and manage mock state through natural language. Exposes operations for setting up request/response pairs with matchers for method, path, headers, and body, plus verification tools to confirm your app made the calls you expected. Useful when you're building against APIs that don't exist yet or need reproducible test scenarios without spinning up real services. Connects to any MockServer instance over configurable host and port. Think of it as programmatic control over your HTTP mocks, but driven by conversation instead of REST calls or configuration files.

GitHub stars
1
tools
6
transport
STDIO
env vars
2
last updated
Dec 16, 2025

Tools

6 tools

Public tool metadata for what this MCP can expose to an agent.

mockserver_create_expectationCreate a mock HTTP expectation on MockServer.

Create a mock HTTP expectation on MockServer.

No parameter schema in public metadata yet.

mockserver_verifyVerify that requests matching criteria were received by MockServer.

Verify that requests matching criteria were received by MockServer.

No parameter schema in public metadata yet.

mockserver_clearClear expectations and recorded requests from MockServer.

Clear expectations and recorded requests from MockServer.

No parameter schema in public metadata yet.

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

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

No parameter schema in public metadata yet.

mockserver_retrieve_requestsRetrieve recorded requests from MockServer.

Retrieve recorded requests from MockServer.

No parameter schema in public metadata yet.

mockserver_statusGet MockServer connection status and configuration.

Get MockServer connection status and configuration.

No parameter schema in public metadata yet.

Sponsors

Configuration

MOCKSERVER_HOST

MockServer hostname

MOCKSERVER_PORT

MockServer port

Readme

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

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"
      }
    }
  }
}

View the full README on GitHub

Details

Repository
github.com/akkshay10/mcpclientmock
Package
mockserver-mcp
Transport
STDIO
Registry
MCP registry, active