MCP Integration

Connect AI agents to your mock APIs using the Model Context Protocol

What is MCP Integration?

The Model Context Protocol (MCP) integration allows AI agents like Claude, ChatGPT, and other LLMs to directly interact with your mock APIs. This enables automated testing, API exploration, and intelligent mock data generation through natural language commands.

Key Benefits

  • • Programmatic API management via AI agents
  • • Automated mock data generation
  • • Natural language API testing
  • • Intelligent endpoint discovery
  • • Real-time API monitoring

Supported Operations

  • • Create and manage mock APIs
  • • Add and configure endpoints
  • • Generate realistic test data
  • • Import OpenAPI specifications
  • • Monitor API traffic and usage

Server URL

https://mcp.dotmock.com

Authentication

Use X-API-Key header

Rate Limits

Plan-based with clear error messages

Getting Started

Follow these steps to connect AI agents to your mock APIs

1

Create an API Key

Navigate to your team settings and create a new API key for MCP access.

Manage API Keys
2

Configure Your AI Agent

Add the MCP server URL and your API key to your AI agent's configuration.

Configuration Examples
Option 1: SSE with Direct API Key
{
  "mcpServers": {
    "dotmock": {
      "type": "sse",
      "url": "https://mcp.dotmock.com/sse",
      "headers": {
        "X-API-Key": "your-api-key-here"
      }
    }
  }
}
Option 2: SSE with Secure Input (Recommended)
{
  "inputs": [
    {
      "type": "promptString",
      "id": "dotmock-api-key", 
      "description": "DotMock API Key",
      "password": true
    }
  ],
  "mcpServers": {
    "dotmock": {
      "type": "sse",
      "url": "https://mcp.dotmock.com/sse",
      "headers": {
        "x-api-key": "${input:dotmock-api-key}"
      }
    }
  }
}
Option 3: HTTP Wrapper (Fallback)
{
  "mcpServers": {
    "dotmock": {
      "command": "npx",
      "args": [
        "-y", 
        "mcp-remote@latest", 
        "https://mcp.dotmock.com/mcp",
        "--header",
        "X-API-Key:your-api-key-here"
      ]
    }
  }
}
3

Start Using AI Commands

Your AI agent can now interact with your mock APIs using natural language commands.

Example Commands
  • • "Create a new mock API for user management"
  • • "Add a POST endpoint for creating users"
  • • "Generate realistic user data with faker.js"
  • • "Show me the traffic for the users API"

Claude Code Skill

Install the dotMock skill for enhanced AI-powered mock API creation

What the Skill Enables

  • • Automatically convert TypeScript types to mock APIs
  • • Generate OpenAPI specs from your code
  • • Create mocks before your backend exists
  • • Configure custom endpoint responses via natural language

Installation

Download the skill and add it to your project or global Claude Code skills folder:

Skill Location
# Project-level (recommended)
your-project/.claude/skills/mockito/SKILL.md

# Or global
~/.claude/skills/mockito/SKILL.md

Example Usage

User: "Create a mock API from my User and Product types in src/types/"

Claude: I'll analyze your TypeScript files and create a mock API.

1. Found interfaces: User, Product, CreateUserDto
2. Generating OpenAPI spec with CRUD endpoints...
3. Creating mock API...

Done! Your mock API is available at:
https://users-api-abc123.mock.rest

Available MCP Tools

AI agents have access to these tools for managing your mock APIs

API Management

create_api
Create new mock APIs
list_apis
List all team APIs
get_api_details
Get API configuration
update_api
Modify API settings
delete_api
Remove APIs

Endpoint Management

create_endpoint
Add new endpoints
list_endpoints
List API endpoints
update_endpoint
Modify endpoints
delete_endpoint
Remove endpoints

Code Analysis & Generation

analyze_typescript
Convert TypeScript to OpenAPI
analyze_openapi
Validate & analyze OpenAPI specs
generate_api
AI-generate API from description

Monitoring & Analytics

get_traffic_logs
View API traffic
get_team_usage
Check team usage stats

Security & Best Practices

Security Features

  • • API keys are hashed and never stored in plaintext
  • • Rate limiting prevents abuse
  • • Team-based access control
  • • Audit logs for all API operations
  • • Automatic key expiration (optional)

Best Practices

  • • Use separate keys for different environments
  • • Set appropriate permissions for each key
  • • Monitor API usage regularly
  • • Implement key rotation policies
  • • Use environment variables for key storage

Need Help?

If you encounter issues setting up MCP integration or need assistance with AI agent configuration, our support team is here to help.