mockoon-mcp

mockoon-mcp

Lets AI assistants create and manage Mockoon mock APIs through natural language.

Category
访问服务器

README

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)

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.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选