Mockserver Mcp
БесплатноНе проверенMCP server for James Bloom MockServer - create expectations, verify requests, and manage mock state
Описание
MCP server for James Bloom MockServer - create expectations, verify requests, and manage mock state
README
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 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
- npm: https://www.npmjs.com/package/mockserver-mcp
- GitHub: https://github.com/Akkshay10/MCPClientMock
- MCP Registry: https://registry.modelcontextprotocol.io
License
MIT
Установить Mockserver Mcp в Claude Desktop, Claude Code, Cursor
unyly install mockserver-mcpСтавит в Claude Desktop, Claude Code, Cursor и VS Code — сам разбирается с npx, uvx и сборкой из исходников.
Впервые? Поставь CLI: curl -fsSL https://unyly.org/install | sh
Или настроить вручную
Выполни в терминале:
claude mcp add mockserver-mcp -- npx -y mockserver-mcpFAQ
Mockserver Mcp MCP бесплатный?
Да, Mockserver Mcp MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Mockserver Mcp?
Нет, Mockserver Mcp работает без API-ключей и переменных окружения.
Mockserver Mcp — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Mockserver Mcp в Claude Desktop, Claude Code или Cursor?
Открой Mockserver Mcp на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
автор: modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
автор: xuzexin-hzCompare Mockserver Mcp with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории ai
