{
  "markdown": "# mockserver-mcp\n\nAn MCP (Model Context Protocol) server for interacting with [James Bloom's MockServer](https://www.mock-server.com/). This enables AI assistants to create mock HTTP expectations, verify requests, clear state, and manage MockServer instances programmatically.\n\n## Prerequisites\n\nYou need a running MockServer instance:\n\n```bash\n# Using Docker (easiest)\ndocker run -d -p 1080:1080 mockserver/mockserver\n```\n\n## Installation\n\n### Using npx (recommended)\n\n```bash\nnpx mockserver-mcp\n```\n\n### Global installation\n\n```bash\nnpm install -g mockserver-mcp\nmockserver-mcp\n```\n\n## Configuration\n\n### Environment Variables\n\n| Variable | Description | Default |\n|----------|-------------|---------|\n| `MOCKSERVER_HOST` | MockServer hostname | `localhost` |\n| `MOCKSERVER_PORT` | MockServer port | `1080` |\n\n### MCP Client Configuration\n\nAdd to your MCP client configuration file (e.g., Claude Desktop, Kiro, Cursor):\n\n```json\n{\n  \"mcpServers\": {\n    \"mockserver\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"mockserver-mcp\"],\n      \"env\": {\n        \"MOCKSERVER_HOST\": \"localhost\",\n        \"MOCKSERVER_PORT\": \"1080\"\n      }\n    }\n  }\n}\n```\n\nFor shared team MockServer, change `MOCKSERVER_HOST` to your server's address.\n\n## Available Tools\n\n### mockserver_create_expectation\n\nCreate a mock HTTP expectation on MockServer.\n\n**Parameters:**\n- `httpRequest` (required): Request matching criteria\n  - `method`: HTTP method (GET, POST, PUT, DELETE, etc.)\n  - `path`: URL path to match\n  - `queryStringParameters`: Query parameters to match\n  - `headers`: Headers to match\n  - `body`: Body matcher with `type` (STRING, JSON, REGEX, XPATH, JSON_PATH) and `value`\n- `httpResponse`: Response configuration\n  - `statusCode`: HTTP status code\n  - `headers`: Response headers\n  - `body`: Response body (string or object)\n  - `delay`: Response delay with `timeUnit` and `value`\n- `times`: How many times to match (`remainingTimes`, `unlimited`)\n- `timeToLive`: Expectation lifetime (`timeUnit`, `timeToLive`)\n\n**Example:**\n```json\n{\n  \"httpRequest\": {\n    \"method\": \"GET\",\n    \"path\": \"/api/users\"\n  },\n  \"httpResponse\": {\n    \"statusCode\": 200,\n    \"body\": { \"users\": [] }\n  }\n}\n```\n\n\n### mockserver_verify\n\nVerify that requests matching criteria were received by MockServer.\n\n**Parameters:**\n- `httpRequest` (required): Request matching criteria (same as create_expectation)\n- `times`: Expected request count\n  - `atLeast`: Minimum number of requests\n  - `atMost`: Maximum number of requests\n  - `exactly`: Exact number of requests\n\n**Example:**\n```json\n{\n  \"httpRequest\": {\n    \"method\": \"POST\",\n    \"path\": \"/api/orders\"\n  },\n  \"times\": {\n    \"atLeast\": 1\n  }\n}\n```\n\n### mockserver_clear\n\nClear expectations and recorded requests from MockServer.\n\n**Parameters:**\n- `httpRequest` (optional): Request matcher to clear specific expectations. If not provided, clears all.\n\n**Example:**\n```json\n{\n  \"httpRequest\": {\n    \"path\": \"/api/users\"\n  }\n}\n```\n\n### mockserver_reset\n\nPerform a full reset of MockServer, clearing all expectations and recorded requests.\n\n**Parameters:** None\n\n### mockserver_retrieve_requests\n\nRetrieve recorded requests from MockServer.\n\n**Parameters:**\n- `httpRequest` (optional): Request matcher to filter recorded requests\n\n**Example:**\n```json\n{\n  \"httpRequest\": {\n    \"method\": \"GET\"\n  }\n}\n```\n\n### mockserver_status\n\nGet MockServer connection status and configuration.\n\n**Parameters:** None\n\n## Why Mocking?\n\nAPI mocking enables early testing — start building and testing your frontend or integrations before the backend is ready. No more waiting. Ship faster.\n\n## Requirements\n\n- Node.js >= 18.0.0\n- A running MockServer instance\n\n## Links\n\n- npm: https://www.npmjs.com/package/mockserver-mcp\n- GitHub: https://github.com/Akkshay10/MCPClientMock\n- MCP Registry: https://registry.modelcontextprotocol.io\n\n## License\n\nMIT\n",
  "bytes": 3845,
  "sha": "6333c1ee3d67c04064044c1be9a139a9cbf290de412f40b1b5ede64ffd720d11",
  "repo_slug": "akkshay10/mcpclientmock",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_akkshay10_mcpclientmock_7353efbd/readme"
}