Skip to main content
Glama
mockoon-mcp

mockoon-mcp

by Albenzoo

MIT License npm version npm downloads

mockoon-mcp

An MCP server that lets AI assistants (Claude, GitHub Copilot, Cursor, etc.) create and manage Mockoon mock APIs through natural language.


Requirements

  • Node.js 18+

  • Mockoon Desktop — for managing environment files via the UI

  • Mockoon CLI (optional) — required only if you want to use the start_server / stop_server tools to start mock servers programmatically (npm install -g @mockoon/cli)


Related MCP server: RequestBin MCP Server

Configuration

No installation needed. Configure your AI client using npx:

VS Code / GitHub Copilot

Create .vscode/mcp.json in your workspace:

{
  "servers": {
    "mockoon": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "mockoon-mcp@latest"]
    }
  }
}

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "mockoon": {
      "command": "npx",
      "args": ["-y", "mockoon-mcp@latest"]
    }
  }
}

Cursor

Edit ~/.cursor/mcp.json (global) or .cursor/mcp.json in your project:

{
  "mcpServers": {
    "mockoon": {
      "command": "npx",
      "args": ["-y", "mockoon-mcp@latest"]
    }
  }
}

Environment variables

Variable

Description

MOCKOON_STORAGE_DIR

Override the primary storage directory (default: Mockoon Desktop's storage folder)

MOCKOON_DATA_DIRS

Semicolon-separated list of additional directories to search for environment files

Default storage path:

  • Windows: %APPDATA%\mockoon\storage

  • macOS/Linux: ~/.config/mockoon/storage

Example:

"env": {
  "MOCKOON_DATA_DIRS": "/path/to/dir1;/path/to/dir2"
}

Available Tools

Environments

Tool

Description

list_environments

List all environments with file path and port

create_environment

Create a new environment

delete_environment

Permanently delete an environment file

Routes

Tool

Description

list_routes

List all routes in an environment (UUID, method, endpoint, response count)

get_route

Inspect a single route with all responses, rules, headers and body

create_route

Create a route with a single default response

create_route_with_responses

Create a route + N responses (default + conditionals) in one call

bulk_create_routes

Create N routes in one call — ideal for scaffolding an entire API

update_route

Update method, endpoint, documentation and/or default response fields

duplicate_route

Clone a route (all responses included) with new UUIDs

delete_route

Delete a route and all its responses

add_route_response

Add a conditional/alternative response to an existing route

set_default_response

Change which response is marked as default

get_default_response

Return the current default response (quick inspect)

Databuckets (Templates)

Tool

Description

list_templates

List all databuckets in an environment

create_template

Create a new databucket

update_template

Update the content of a databucket

delete_template

Delete a databucket

Server

Tool

Description

start_server

Start a mock server for an environment

stop_server

Stop a running mock server

list_running_servers

List all currently running mock servers

Note: start_server and stop_server require Mockoon CLI to be installed globally (npm install -g @mockoon/cli). If you only use Mockoon Desktop, these tools will not work — but all other tools (environments, routes, databuckets) work without CLI.


Example Prompts

Here are some example phrases you can say to your AI assistant to interact with Mockoon via this MCP server:

Exploring environments and routes

  • "List all available Mockoon environments."

  • "Show me all the routes in the Taccuino environment."

  • "Get the full detail of route GET /users/:id, including all responses and rules."

Creating routes

  • "Create a GET /products route in the Demo API environment that returns a JSON array of 3 products with status 200."

  • "Add a POST /auth/login route with two responses: 200 with a token body and 401 Unauthorized."

  • "Scaffold a full CRUD API for a Task resource under /tasks in the Demo environment."

Updating and managing routes

  • "Change the default response of GET /users to return status 204 with an empty body."

  • "Duplicate the GET /orders route."

  • "Delete the DELETE /legacy/endpoint route from the environment."

  • "Add a conditional 403 response to POST /documents that triggers when the X-Role header equals guest."

Databuckets

  • "Create a databucket called UserList in the Demo API with a JSON array of 5 fake users."

  • "Update the ProductCatalog databucket with a new list of items."

Server management

  • "Start the mock server for the Taccuino environment."

  • "Stop all running mock servers."

  • "Which Mockoon environments are currently running?"


How It Works

The server communicates via stdio (JSON-RPC 2.0). It reads and writes Mockoon's environment JSON files directly, no REST API involved.

Changes made by the MCP server are reflected in Mockoon Desktop automatically if the Environment file watcher is enabled. Go to Application → Settings and set it to Auto for silent reloads.


License

MIT — see LICENSE.

Available Tools

21 tools
add_route_responseB

Add a new conditional or alternative response to an existing route. Use rules to define when this response is activated.

Inputs: environmentId (required), routeId (required), statusCode, body, +6 more.

bulk_create_routesA

Create multiple routes at once. Each item in the array follows the same structure as create_route_with_responses. Ideal for scaffolding an entire API in one call.

Inputs: environmentId (required), routes (required).

create_environmentB

Create a new Mockoon environment

Inputs: name (required), port (required).

create_routeA

Create a new HTTP route with a single default response. Use create_route_with_responses to add multiple responses in one call.

Inputs: environmentId (required), method (required), endpoint (required), documentation, +4 more.

create_route_with_responsesB

Create a new HTTP route together with all its responses (default + conditionals) in a single call. The first response in the list is treated as the default unless one has isDefault=true.

Inputs: environmentId (required), method (required), endpoint (required), responses (required), +1 more.

create_templateC

Create a new databucket (data template) in a Mockoon environment

Inputs: environmentId (required), name (required), value (required).

delete_environmentA

Delete a Mockoon environment by UUID. The environment file will be permanently removed from disk.

Inputs: environmentId (required).

delete_routeA

Delete a route and all its responses from a Mockoon environment.

Inputs: environmentId (required), routeId (required).

delete_templateB

Delete a databucket from a Mockoon environment

Inputs: environmentId (required), templateId (required).

duplicate_routeA

Clone an existing route (with all its responses) into the same environment. All UUIDs are regenerated. The copy gets '(copy)' appended to its documentation.

Inputs: environmentId (required), routeId (required).

get_default_responseA

Return the current default response of a route (status code, headers, body). Use get_route for full details including all responses.

Inputs: environmentId (required), routeId (required).

get_routeA

Return full details of a single route including all responses (status codes, labels, rules, headers, body).

Inputs: environmentId (required), routeId (required).

list_environmentsA

List all local Mockoon environment files. Returns the file path for each environment, which can be passed to start_mock. Searches the default storage directory and any extra directories set via MOCKOON_DATA_DIRS.

Inputs: no named parameters.

list_routesA

List all routes in a Mockoon environment with their UUIDs, method, endpoint and number of responses.

Inputs: environmentId (required).

list_running_serversA

List the UUIDs of all Mockoon environments currently running as mock servers.

Inputs: no named parameters.

list_templatesB

List all databuckets (data templates) in a Mockoon environment

Inputs: environmentId (required).

set_default_responseA

Set an existing response as the default for a route (demotes all other responses). Use get_route to list response UUIDs.

Inputs: environmentId (required), routeId (required), responseId (required).

start_serverA

Start a Mockoon mock server from a local environment JSON file. Use list_environments to find available file paths. Returns immediately with an error if the server is already running.

Inputs: environmentId (required), port.

stop_serverA

Stop a running Mockoon mock server. Returns an error message if no server is running for the given environment.

Inputs: environmentId (required).

update_routeB

Update a route's method, endpoint, documentation and/or its default response (body, status code, headers). Only provided fields are changed.

Inputs: environmentId (required), routeId (required), method, endpoint, +4 more.

update_templateD

Update the content of an existing databucket

Inputs: environmentId (required), templateId (required), value (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 21 tools

    Disambiguation5/5

    Each tool targets a specific operation on a distinct resource (environments, routes, responses, templates, servers). Tools like get_route and get_default_response are clearly differentiated by scope. No two tools have overlapping functionality.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern in snake_case (e.g., create_environment, list_routes, set_default_response). No mixed conventions or irregular names.

    Tool Count5/5

    21 tools is well-scoped for an API mocking server. It covers environment, route, response, template, and server lifecycle without excess. Each tool serves a clear purpose.

    Completeness4/5

    The tool set covers CRUD for routes, environments, and templates, plus server start/stop and response management. A notable gap is the lack of an update_environment tool, but overall the surface is comprehensive for typical mocking workflows.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Enables AI assistants to configure and manage session-based REST and WebSocket mock servers for application development and testing. It allows for dynamic endpoint setup, request history inspection, and real-time WebSocket communication through natural language commands.
      8
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      Enables AI to manage whistle mock rules, values, and inspect network sessions, facilitating API mocking and debugging through natural language.
      17
      8 npm
      1
      MIT