Mockfly MCP Client

An MCP (Model Context Protocol) server for managing your Mockfly projects, mock endpoints and responses.

Features

  • Create, import, update and delete projects
  • List all mock endpoints
  • Get endpoint details
  • Create and edit endpoints
  • Manage mock responses (create, edit, duplicate, delete)
  • Manage conditional rules for responses

Installation

Globally via npm

npm install -g mockfly-mcp-client

Configuration

There are two types of API keys, and the available tools depend on which ones you configure. You can set one or both, but at least one is required:

  • MOCKFLY_ACCOUNT_API_KEY (account API key) — enables the project tools (create, import, update and delete projects). Create yours at app.mockfly.dev/api-keys. The full key is only shown once at creation time.
  • MOCKFLY_API_KEY (project API key) — enables the endpoint and response tools for a specific project. You can find it in app.mockfly.dev by clicking on the configuration button of your project.

Antigravity Configuration (Google DeepMind)

To use this MCP server with Antigravity, add the following to your MCP configuration in the settings:

{
  "mcpServers": {
    "mockfly": {
      "command": "npx",
      "args": ["-y", "mockfly-mcp-client"],
      "env": {
        "MOCKFLY_API_KEY": "YOUR_PROJECT_API_KEY",
        "MOCKFLY_ACCOUNT_API_KEY": "YOUR_ACCOUNT_API_KEY"
      }
    }
  }
}

Claude Desktop Configuration

Add the following to your claude_desktop_config.json:

{
  "mcpServers": {
    "mockfly": {
      "command": "npx",
      "args": ["-y", "mockfly-mcp-client"],
      "env": {
        "MOCKFLY_API_KEY": "YOUR_PROJECT_API_KEY",
        "MOCKFLY_ACCOUNT_API_KEY": "YOUR_ACCOUNT_API_KEY"
      }
    }
  }
}

Available Tools

Project tools (require MOCKFLY_ACCOUNT_API_KEY)

  • create_project: Create a new project.
  • import_project: Import a whole project (endpoints and responses included) in a single call.
  • update_project: Update the name and/or tags of a project.
  • delete_project: Delete a project.

Endpoint and response tools (require MOCKFLY_API_KEY)

  • get_endpoints: List all mock endpoints in the project.
  • get_endpoint_detail: Get detailed information about a specific mock endpoint.
  • create_endpoint: Create a new mock endpoint.
  • edit_endpoint: Patch an existing mock endpoint.
  • delete_endpoint: Delete an existing mock endpoint.
  • create_response: Add a mock response to an endpoint.
  • edit_response: Edit an existing mock response.
  • duplicate_response: Duplicate an existing mock response.
  • delete_response: Remove a mock response from an endpoint.
  • modify_rules: Replace the conditional rules of a mock response.