Skip to main content
Glama
Mhdd-24

@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.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesCollection name
endpointsYesNewline method path

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only says 'Generate' and does not reveal side effects, output behavior, required input format, or whether the operation has any state-changing consequences.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single short sentence with no filler or redundancy. It is concise and front-loaded, though it is so sparse that some context is left implicit.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no annotations and no output schema, the description should explain more about how to invoke the tool correctly. It does not clarify the endpoints string format beyond the schema's terse 'Newline method path', nor what the generated JSON will look like.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with both 'name' and 'endpoints' already described in the input schema. The description adds no extra parameter meaning, so it stays at the baseline score.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a clear verb ('Generate') and resource ('mock collection JSON'), so an agent knows what the tool produces. However, it does not distinguish this from the sibling tools apimock_mock and apimock_status, and the exact meaning of 'mock collection JSON' is somewhat ambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no guidance on when to use this tool instead of apimock_mock or apimock_status. There are no explicit use cases, exclusions, or alternative routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

apimock_mockC

Generate a mock response for an endpoint.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesPath
methodYesHTTP method
schemaNoOptional schema/fields

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description bears full responsibility for disclosing behavior. It only says 'generate a mock response,' which suggests a read-like operation but does not clarify side effects, required authentication, or what exactly 'mock' entails. This is insufficient for an unannotated tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence without filler. It front-loads the core action, though it may be overly terse given the lack of other supporting information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no output schema and no annotations, the description is too shallow. It should clarify what 'mock response' means (e.g., returns synthetic data), acceptable methods like GET/POST, and any constraints on path format, so an agent can invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents each parameter (path, method, schema). The description itself adds no further semantic detail beyond what the schema states, meeting the baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a clear verb and resource: 'Generate a mock response for an endpoint.' It implies the tool's primary function and is distinguishable from siblings like apimock_status and apimock_collection, though it does not explicitly differentiate them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus the siblings. There is no mention of alternatives, prerequisites, or typical use cases, leaving the agent to infer context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

apimock_statusB

Health check for API Mocking MCP.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It only says 'Health check', which implies a read-only operation but does not explicitly state side effects, return format, or whether it affects server state. For a health check, the agent can infer non-destructiveness, but the absence of any behavioral disclosure (e.g., what 'healthy' means or what the response contains) leaves important gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no filler. It conveys the core purpose immediately and omits unnecessary details. For a parameterless tool, this is an ideal length.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's extreme simplicity (no params, no output schema), the description is minimally sufficient but not rich. It does not describe what the health check returns (e.g., status codes, metrics) or how to interpret the result. An agent would need to infer the response from the name alone. It is not deficient enough to warrant a 2, but it leaves room for more clarity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters and the schema coverage is 100% (vacuously). Per the rules, 0 params yields a baseline of 4. The description adds no parameter-specific meaning because there are none to describe, which is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Health check') and the resource ('API Mocking MCP'). It is specific enough to distinguish from siblings (mock and collection), though it does not explicitly contrast them. The verb+resource pattern is clear and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus the siblings apimock_mock or apimock_collection. It does not mention prerequisites, typical scenarios, or conditions that would make this the right choice. The usage context is entirely implied by the name 'status'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv1.0.0
    • First observedapimock_collection
    • First observedapimock_mock
    • First observedapimock_status

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

  • F
    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
    -
  • A
    license
    Not graded
    quality
    B
    maintenance
    A lightweight mock MCP server for local testing and resilience experiments, providing predictable tool responses with simulated latency and errors.
    1
    MIT