mockoon

Mockoon: A tool to create mock API servers locally using a graphical interface (GUI) or command-line interface (CLI). Use when users mention “mockoon”, API mocking, mock server, mock API, OpenAPI mocking, or local API emulation. For programmatic HTTP mocking, refer to wiremock.

Last repository push
GitHub Stars
219
Forks
38
Issues / PRs
7

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "mockoon" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-5a5deda5a94003f52acddd5872d0c3c27d41e4bdc2a27995332423c9efd70447. Verify the upstream source and version against https://github.com/TerminalSkills/skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Mockoon: A tool to create mock API servers locally using a graphical interface (GUI) or command-line interface (CLI). Use when users mention “mockoon”, API mocking, mock server, mock API, OpenAPI mocking, or local API emulation. For programmatic HTTP mocking, refer to wiremock.

0 Downloads

Introduction source: third_party · TerminalSkills · 1.0.0 Reference

SkillPi interpretation

Tasks
When the user wants to create mock API servers locally using Mockoon with its GUI or CLI. Also use when the user mentions "mockoon," "API mocking," "mock server," "mock API," "OpenAPI mock," or "local API simulation." For programmatic HTTP mocking, see wiremock.
Software, accounts and paid services
```bash
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: mockoon
description: When the user wants to create mock API servers locally using Mockoon with its GUI or CLI. Also use when the user mentions "mockoon," "API mocking," "mock server," "mock API," "OpenAPI mock," or "local API simulation." For programmatic HTTP mocking, see wiremock.
metadata:
  author: terminal-skills
  version: "1.0.0"
  category: development
  tags:
    - api-mocking
    - mock-server
    - openapi
    - development

Mockoon

Overview

You are an expert in Mockoon, the open-source tool for running mock API servers locally. You help users create mock environments using the GUI or CLI, define routes with dynamic responses, import OpenAPI specifications, use templating for realistic data, and run mocks in CI for integration testing. You understand Mockoon's data bucket system, response rules, and proxy mode.

Instructions

Initial Assessment

  1. Purpose — Frontend development, integration testing, or demo?
  2. API spec — Do you have an OpenAPI/Swagger spec to import?
  3. Complexity — Static responses or dynamic (templating, rules)?
  4. Environment — Local development, CI, or Docker?

CLI Setup

# setup-mockoon.sh — Install Mockoon CLI for headless mock servers.
npm install -g @mockoon/cli

# Or use npx
npx @mockoon/cli start --data ./mock-environment.json --port 3001

Environment Configuration

// mock-environment.json — Mockoon environment with multiple routes.
// Defines a complete mock API for user and product endpoints.
{
  "uuid": "mock-api-1",
  "lastMigration": 32,
  "name": "Mock API",
  "port": 3001,
  "hostname": "0.0.0.0",
  "routes": [
    {
      "uuid": "route-users-list",
      "method": "get",
      "endpoint": "api/users",
      "responses": [
        {
          "uuid": "resp-users-200",
          "statusCode": 200,
          "label": "Success",
          "headers": [{ "key": "Content-Type", "value": "application/json" }],
          "body": "{\n  \"users\": [\n    { \"id\": 1, \"name\": \"{{faker 'person.fullName'}}\", \"email\": \"{{faker 'internet.email'}}\" },\n    { \"id\": 2, \"name\": \"{{faker 'person.fullName'}}\", \"email\": \"{{faker 'internet.email'}}\" }\n  ]\n}",
          "default": true
        }
      ]
    },
    {
      "uuid": "route-user-by-id",
      "method": "get",
      "endpoint": "api/users/:id",
      "responses": [
        {
          "uuid": "resp-user-200",
          "statusCode": 200,
          "headers": [{ "key": "Content-Type", "value": "application/json" }],
          "body": "{ \"id\": {{urlParam 'id'}}, \"name\": \"{{faker 'person.fullName'}}\", \"email\": \"{{faker 'internet.email'}}\" }",
          "default": true
        },
        {
          "uuid": "resp-user-404",
          "statusCode": 404,
          "headers": [{ "key": "Content-Type", "value": "application/json" }],
          "body": "{ \"error\": \"User not found\" }",
          "label": "Not found",
          "rules": [{ "target": "params", "modifier": "id", "operator": "equals", "value": "999" }]
        }
      ]
    },
    {
      "uuid": "route-create-user",
      "method": "post",
      "endpoint": "api/users",
      "responses": [
        {
          "uuid": "resp-create-201",
          "statusCode": 201,
          "headers": [{ "key": "Content-Type", "value": "application/json" }],
          "body": "{ \"id\": {{faker 'number.int' min=100 max=999}}, \"name\": \"{{body 'name'}}\", \"email\": \"{{body 'email'}}\" }",
          "default": true
        }
      ]
    }
  ]
}

Templating Helpers

// mock-templating-examples.json — Mockoon response body showing templating helpers.
// Generates realistic dynamic data using Faker and Handlebars.
{
  "id": "{{faker 'string.uuid'}}",
  "name": "{{faker 'person.fullName'}}",
  "email": "{{faker 'internet.email'}}",
  "avatar": "{{faker 'image.avatar'}}",
  "createdAt": "{{now 'yyyy-MM-dd'}}",
  "requestInfo": {
    "method": "{{method}}",
    "path": "{{urlParam 'id'}}",
    "query": "{{queryParam 'search'}}",
    "header": "{{header 'Authorization'}}"
  }
}

Response Rules

// mock-with-rules.json — Route with conditional responses based on request data.
// Returns different responses based on query parameters or headers.
{
  "uuid": "route-conditional",
  "method": "get",
  "endpoint": "api/products",
  "responses": [
    {
      "uuid": "resp-empty",
      "statusCode": 200,
      "body": "{ \"products\": [], \"total\": 0 }",
      "label": "Empty results",
      "rules": [{ "target": "query", "modifier": "category", "operator": "equals", "value": "empty" }]
    },
    {
      "uuid": "resp-error",
      "statusCode": 401,
      "body": "{ \"error\": \"Unauthorized\" }",
      "label": "No auth",
      "rules": [{ "target": "header", "modifier": "Authorization", "operator": "equals", "value": "" }]
    },
    {
      "uuid": "resp-default",
      "statusCode": 200,
      "body": "{ \"products\": [{ \"id\": 1, \"name\": \"Widget\" }], \"total\": 1 }",
      "default": true
    }
  ]
}

Docker

# run-mockoon-docker.sh — Run Mockoon mock server in Docker.
# Useful for CI pipelines and shared development environments.
docker run -d --name mockoon \
  -p 3001:3001 \
  -v $(pwd)/mock-environment.json:/data/mock.json \
  mockoon/cli:latest \
  --data /data/mock.json --port 3001

CI Integration

# .github/workflows/mock-api.yml — Run integration tests against Mockoon mock server.
# Starts mock server before running tests.
name: Integration Tests
on: [push]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      - run: npm ci
      - name: Start mock server
        run: |
          npx @mockoon/cli start --data ./mocks/environment.json --port 3001 &
          sleep 3
      - run: npm test
        env:
          API_BASE_URL: http://localhost:3001

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value95/100

Highlights

  • 提供 Mockoon 的完整使用指南,涵盖 CLI、GUI、Docker 和 CI 集成
  • 解决开发者在本地模拟 API 的核心痛点,实用价值高
Trigger Precision95/100

Highlights

  • 触发词覆盖全面,包括 mockoon、API mocking、mock server 等多种变体
Structure and Standards95/100

Highlights

  • 文档结构清晰,分章节详述,含完整代码示例和配置模板
Execution Reliability95/100

Highlights

  • 提供具体可执行的命令、JSON 配置、Docker 和 CI 集成方案,可靠性高
Evidence Verifiability (mean of the first four)95/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • localhost

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

```bash

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.