ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

MockAPI - Instant REST API from JSON

Spin up a mock REST API server from JSON files in seconds. Full CRUD, filtering, pagination. Zero config. Free CLI tool for frontend developers.

skill-install โ€” Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/lxgicstudios/mockapi
Or

MockAPI

Create a REST API from a JSON file. Perfect for frontend development, testing, prototyping.

Installation

npm install -g @lxgicstudios/mockapi

Quick Start

# Create example db.json
npx @lxgicstudios/mockapi --init

# Start server
npx @lxgicstudios/mockapi db.json

Data File Format

Create db.json:

{
  "users": [
    { "id": 1, "name": "Alice", "email": "[email protected]" },
    { "id": 2, "name": "Bob", "email": "[email protected]" }
  ],
  "posts": [
    { "id": 1, "title": "Hello", "body": "Content", "userId": 1 }
  ]
}

Generated Routes

For each resource (users, posts):

MethodRouteDescription
GET/usersList all
GET/users/:idGet by id
POST/usersCreate
PUT/users/:idReplace
PATCH/users/:idUpdate
DELETE/users/:idDelete

Query Parameters

# Filter
GET /users?name=Alice

# Pagination
GET /users?_page=1&_limit=10

# Sort
GET /users?_sort=name&_order=asc

Options

OptionDescription
-p, --portPort (default: 3001)
-d, --delayResponse delay in ms
-w, --watchWatch file for changes
-r, --readonlyDisable mutations
--initCreate example db.json

Common Use Cases

Frontend development:

npx @lxgicstudios/mockapi db.json --watch

Demo with delay:

npx @lxgicstudios/mockapi db.json --delay 500

Read-only API:

npx @lxgicstudios/mockapi db.json --readonly

Features

  • Full CRUD operations
  • Automatic ID generation
  • Filtering and pagination
  • Sorting
  • CORS enabled
  • Hot reload with --watch
  • Persistent changes to JSON

Built by LXGIC Studios

๐Ÿ”— GitHub ยท Twitter

Metadata

Stars1601
Views0
Updated2026-02-27
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build โ€” we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-lxgicstudios-mockapi": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.