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"

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

Data & Specifications

generate_fake_data
Create realistic test data
import_openapi
Import OpenAPI specs
export_openapi
Export API specifications

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.