Skip to main content
Glama
@mhdd_24/api-mocking-mcp

@mhdd_24/api-mocking-mcp

by Mhdd-24

@mhdd_24/api-mocking-mcp

Create mock endpoints and responses.

Same architecture as @mhdd_24/sublime-mcp.

Full documentation: docs/WIKI.md


How it works (30 seconds)

You (chat) → MCP client → api-mocking-mcp → API Mocking APIs / CLIs / local tools

Related MCP server: api-mock-generator

Prerequisites

Requirement

Notes

Node.js 18+

ESM TypeScript MCP server

Credentials / CLIs

See environment variables below


Install

Option A — npm (after publish)

npm install -g @mhdd_24/api-mocking-mcp

Option B — npx

npx @mhdd_24/api-mocking-mcp

Option C — clone and build

git clone https://github.com/Mhdd-24/API-Mocking-MCP.git
cd API-Mocking-MCP
npm install
npm run build
node dist/index.js

Configure Cursor

Edit ~/.cursor/mcp.json:

{
  "mcpServers": {
    "apimock": {
      "command": "npx",
      "args": ["-y", "@mhdd_24/api-mocking-mcp"],
      "env": {
        "PROJECT_ROOT": "..."
      }
    }
  }
}

Local development:

{
  "command": "node",
  "args": ["/absolute/path/to/API-Mocking-MCP/dist/index.js"]
}

Environment variables

Variable

Description

PROJECT_ROOT

Default project/repository root


Tools

Tool

Description

apimock_status

Health check for API Mocking MCP.

apimock_mock

Generate a mock response for an endpoint.

apimock_collection

Generate a mock collection JSON.


License

ISC

Available Tools

3 tools
apimock_collectionC

Generate a mock collection JSON.

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

apimock_mockC

Generate a mock response for an endpoint.

Inputs: path (required), method (required), schema.

apimock_statusB

Health check for API Mocking MCP.

Inputs: no named parameters.

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 3 tools

    Disambiguation5/5

    The three tools are clearly distinct: status is a health check, mock generates a single endpoint response, and collection generates a full mock collection. There is no ambiguity in their purposes.

    Naming Consistency5/5

    All tool names share the consistent apimock_ prefix and follow a simple noun pattern (status, mock, collection). This makes the toolset predictable and easy to navigate.

    Tool Count5/5

    Three tools is well-scoped for a simple API mocking utility. Each tool serves a single clear purpose without unnecessary bloat.

    Completeness4/5

    The core capabilities of checking service health, generating a single mock, and generating a collection are covered. A minor gap is the lack of configuration options (e.g., status codes or headers), but the surface is otherwise sufficient for basic mocking.

    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
      Not graded
      quality
      C
      maintenance
      Enables local agent interactions with a mock Study of Us API through tools for health checks, catalogs, current user info, reports, and voting.
      MIT