Skip to main content
Glama

Mockery.MCP

An MCP (Model Context Protocol) server that provides tools for interacting with a Mockery HTTP mock response server. This allows AI agents like Cline to manage mock files through a standardized interface.

Features

  • get_mock - Retrieve mock content with status codes and content types

  • list_mocks - Browse directories and files on the Mockery server

  • create_mock - Create new mock files (with Git auto-commit support)

  • delete_mock - Remove mock files (with Git auto-commit support)

Related MCP server: gitbook-mcp

Prerequisites

Installation from GitHub

  1. Clone the repository:

    git clone https://github.com/busadave13/Mockery.MCP.git
    cd Mockery.MCP
  2. Install dependencies:

    npm install
  3. Build the project:

    npm run build

Using with Cline

To use this MCP server with Cline, add the following configuration to your Cline MCP settings file.

Configuration Location

  • Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json

  • macOS: ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

  • Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Configuration

Add this entry to your cline_mcp_settings.json:

{
  "mcpServers": {
    "mockery": {
      "command": "node",
      "args": ["C:/path/to/Mockery.MCP/build/index.js"],
      "env": {
        "MOCKERY_BASE_URL": "http://localhost:8080"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

Note: Replace C:/path/to/Mockery.MCP with the actual path where you cloned the repository.

Environment Variables

Variable

Description

Default

MOCKERY_BASE_URL

Base URL of your Mockery server

http://localhost:8080

Available Tools

get_mock

Retrieve mock content from the Mockery server.

Parameters:

  • mockId (required): The mock ID in format ServiceName/FileId (e.g., FooBar/1234, Products/hydrate)

    • For random selection from multiple mocks, use comma-separated values: FooBar/1234,FooBar/5678

Returns: Status code, content type, and mock content

list_mocks

List directories and files at a specified path.

Parameters:

  • path (optional): Path to list (e.g., weather/prod). Defaults to root /

Returns: Folders and files with metadata

create_mock

Create a new mock file on the Mockery server.

Parameters:

  • path (required): Path including filename (e.g., weather/prod/success.json)

  • content (required): File content (JSON, HTML, XML, text, etc.)

Returns: Confirmation of creation

delete_mock

Delete a mock file from the Mockery server.

Parameters:

  • path (required): Path to the mock file to delete (e.g., weather/prod/success.json)

Returns: Confirmation of deletion

Development

# Install dependencies
npm install

# Build the project
npm run build

# Run the server (for testing)
npm start

License

MIT License - see LICENSE for details.

Available Tools

4 tools
create_mockB

Create a new mock file on the Mockery server. Creates directories if they don't exist. In Git mode, the file is automatically committed and pushed.

Inputs: path (required), content (required).

delete_mockA

Delete a mock file from the Mockery server. Also cleans up empty parent folders. In Git mode, the deletion is automatically committed and pushed.

Inputs: path (required).

get_mockA

Retrieve mock content from the Mockery server. Returns the mock file content with its content-type and status code.

Inputs: mockId (required).

list_mocksA

List directories and files at a specified path in the Mockery server. Returns folders and files with metadata.

Inputs: path.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool maps to a distinct CRUD-style action on a single resource (mock files): get, list, create, delete. There is no realistic risk of confusing one for another, and create/delete semantics are further clarified by the Git-mode behavior.

    Naming Consistency5/5

    All four tools follow a strict verb_noun pattern (get_mock, list_mocks, create_mock, delete_mock) with consistent snake_case. The only variation is the natural plural in list_mocks, which does not break the pattern.

    Tool Count5/5

    Four tools is a well-scoped surface for a mock-file store, with each tool earning its place and no redundant variants. Nothing feels missing on the count dimension alone.

    Completeness4/5

    The surface covers read, list, create, and delete, including directory creation and cleanup, which handles most workflows. There is no explicit update/edit or move/rename operation, so modifying existing mock content depends on re-creating the file.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers