Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Mockaton

    1

    A file-system based HTTP mock API server

    Free

    1 useSecurity scanned

    Mockaton

    Example session with this skill installed

    Create a mock API for a GET request to /api/users/42 that returns a user profile, and another variant for a 404 error.

    • Read your context and instructions
    • Compiled the mockaton

    I have created the mock directory structure and the two response variants (success and not found) for the user profile endpoint.

    Mock API Configuration

    TypePathFilename
    Success/api/users/42api/users/[id](default).GET.200.ts
    Error/api/users/42api/users/[id](not found).GET.404.json

    Success Variant (TypeScript)

    // api/users/[id](default).GET.200.ts
    interface User {
      id: number;
      username: string;
      email: string;
      role: string;
    }
    
    export default {
      id: 42,
      username: "jdoe_dev",
      email: "john.doe@example.com",
      role: "admin"
    } satisfies User
    

    Not Found Variant (JSON)

    // api/users/[id](not found).GET.404.json
    {
      "error": "User not found",
      "code": "USER_MISSING",
      "message": "The requested user ID does not exist in the database."
    }
    

    Next steps

    1. Run mockaton --port 2020 ./my-mocks-dir to start the server.
    2. Update your frontend environment variable to point to http://localhost:2020.
    3. Rename the (not found) file to (default) when you need to test error handling logic.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Frontend development often stalls when the backend isn't ready. Mockaton eliminates this bottleneck by serving mock HTTP APIs directly from your file system. It maps directory structures and filenames to RESTful routes, allowing you to prototype and test against realistic data without writing a full server implementation.

    What it does

    • File-system routing translates directory paths and filenames into API endpoints automatically.
    • Dynamic parameters use bracket syntax like [id] to handle variable URL segments.
    • Variant management utilizes parentheses to store multiple mock scenarios (e.g., success, error, edge cases) for the same route.
    • Multi-format support serves TypeScript, JavaScript, JSON, and static assets like images or XML.
    • Function mocks enable complex logic, URL parsing, and stateful responses using standard Node.js request/response objects.

    How it works

    1. Initialize a mocks directory and install the CLI tool via npm.
    2. Create files using the naming convention path/name(comment).[METHOD].[STATUS].[ext].
    3. Launch the server pointing the CLI at your directory to begin serving the API on a local port.
    4. Switch variants by using the (default) comment or selecting specific mocks via the programmatic API.

    Frameworks & tools

    This tool is a Node.js application with zero dependencies. It supports TypeScript, JavaScript, JSON, XML, and standard media formats.

    Why this beats prompting it yourself

    Manual mocking often results in brittle, single-use scripts or bloated hardcoded objects. This skill enforces a consistent, scalable structure that mirrors real-world routing patterns, ensuring your mocks are organized, reusable, and easy to toggle between different states.

    Use cases

    • Scaffold a backend for a new React or Next.js frontend before the API exists.
    • Simulate error states like 401 Unauthorized or 423 Locked Out to test UI resilience.
    • Create dynamic endpoints that parse URL segments to return specific data.
    • Host static assets and media files alongside JSON data for a complete frontend environment.

    Known limitations

    Requires Node.js for execution. Complex stateful logic requires manual implementation via function mocks. TypeScript files are served as JSON by default unless using the function mock syntax.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.

    Requires Node.js. Function mocks require manual implementation for stateful logic. TypeScript files default to JSON output.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    1 use

    Times used to date

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 27 days ago

    • Free with an Agensi account

    Software
    Node.js

    Permissions

    Terminal / Shell
    Write Files
    Listed27 days ago

    What's inside

    Frequently Asked Questions

    Mockaton eliminates frontend development delays by allowing developers to create a fully functional RESTful API mock simply by organizing folders and files on their local drive. It solves the 'missing backend' problem, letting you test UI states like errors and edge cases without waiting for a server team.

    Since Mockaton is a Node.js-based CLI tool, it integrates seamlessly with any AI agent capable of executing shell commands or managing local file systems. It is particularly effective for agents used in React, Next.js, or general TypeScript/JavaScript development workflows.

    Mockaton uses a specific naming convention: `path/name(comment).[METHOD].[STATUS].[ext]`. For example, creating a file named `users/[id](success).GET.200.json` automatically generates a GET endpoint for users by ID that returns a 200 status code.

    Yes, Mockaton supports function mocks using standard Node.js request and response objects. This allows you to write JavaScript or TypeScript logic to parse URL parameters, simulate delays, or return different data based on the request body.

    You receive the full Mockaton CLI tool, documentation for the file-naming convention, and a set of starter templates. This includes everything needed to initialize a mock directory and begin serving routes immediately.

    New in APIs & Backend

    Free