mockserver-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mockserver-mcp Create a mock GET /api/users returning 200 with user list"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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/mockserverRelated MCP server: httptoolkit-mcp
Installation
Using npx (recommended)
npx mockserver-mcpGlobal installation
npm install -g mockserver-mcp
mockserver-mcpConfiguration
Environment Variables
Variable | Description | Default |
| MockServer hostname |
|
| MockServer port |
|
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 criteriamethod: HTTP method (GET, POST, PUT, DELETE, etc.)path: URL path to matchqueryStringParameters: Query parameters to matchheaders: Headers to matchbody: Body matcher withtype(STRING, JSON, REGEX, XPATH, JSON_PATH) andvalue
httpResponse: Response configurationstatusCode: HTTP status codeheaders: Response headersbody: Response body (string or object)delay: Response delay withtimeUnitandvalue
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 countatLeast: Minimum number of requestsatMost: Maximum number of requestsexactly: 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
MCP Registry: https://registry.modelcontextprotocol.io
License
MIT
Available Tools
6 toolsmockserver_clearA
Clear expectations and recorded requests from MockServer. Optionally filter by request matcher.
Inputs: httpRequest.
mockserver_create_expectationB
Create a mock HTTP expectation on MockServer. Define request matching criteria and the response to return.
Inputs: httpRequest (required), id, times, timeToLive, +1 more.
mockserver_resetA
Perform a full reset of MockServer, clearing all expectations and recorded requests.
Inputs: no named parameters.
mockserver_retrieve_requestsB
Retrieve recorded requests from MockServer. Optionally filter by request matcher.
Inputs: httpRequest.
mockserver_statusA
Get MockServer connection status and configuration. Returns host, port, and reachability.
Inputs: no named parameters.
mockserver_verifyC
Verify that requests matching criteria were received by MockServer. Returns verification result with match count.
Inputs: httpRequest (required), times.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a unique purpose: creating expectations, clearing/resetting (partial vs full), retrieving requests, checking status, and verifying requests. No ambiguity.
All tools follow the pattern 'mockserver_verb' or 'mockserver_verb_noun', using snake_case consistently.
Six tools cover the essential operations for a mock server (create, clear, reset, retrieve, status, verify) without being excessive.
Core functionality is covered, but a tool to list current expectations would provide more complete lifecycle management.
Maintenance
Related MCP Connectors
AI-native mock API server with MCP. Create REST/SOAP mocks from Claude, Cursor, or Windsurf.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Build, validate, and manage API simulations in WireMock Cloud from MCP-compatible AI agents.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Related MCP Servers
- AlicenseBqualityDmaintenanceA mock MCP server for testing MCP client implementations and development workflows. Supports tools, prompts, and resources across multiple transport protocols (stdio, HTTP, SSE).1MIT
- AlicenseAqualityFmaintenanceAn MCP server that enables AI assistants to control HTTP Toolkit for intercepting, inspecting, and debugging HTTP(S) traffic from browsers, mobile devices, and Docker containers. It provides tools for server management, interceptor activation, and sending HTTP requests through natural language commands.2318 npm1MIT
- AlicenseAqualityBmaintenanceMCP server for Mockzilla. Lets coding agents like Claude Code, Claude Desktop, Cursor and Gemini CLI install the Mockzilla CLI and run API mocks from an OpenAPI spec or a single endpoint. Log in from the agent to deploy hosted mocks on mockzilla.org35205 npm6MIT
- AlicenseNot gradedqualityDmaintenanceA powerful MCP server for making HTTP requests, GraphQL queries, and TCP/Telnet connections from AI assistants.7MIT