# Beeceptor MCP

> Beeceptor lets you build, manage, and test mock APIs and HTTP proxies right through your AI agent. You can simulate complex backend services—like payment gateways or user signups—without writing a single line of server code. Use it to intercept live webhooks, inspect payloads in real time, and debug integrations for frontend development or QA testing.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** mock-api, http-proxy, api-testing, webhook-debugger, rest-api

## Description

Connect Beeceptor via Vinkius to your AI client to treat API mocking like a natural conversation. This MCP lets you build out entirely fake endpoints that behave exactly how a real backend would. You can upload OpenAPI specifications and automatically generate the necessary mock rules. Need to simulate an edge case, like a timeout or a specific error code? Just tell your agent what needs to happen. Furthermore, it handles complex data flows by letting you manage state across multiple calls, so subsequent requests remember what happened before. It's pure API debugging power that runs entirely through conversational commands.

## Tools

### add_certificate
Adds a mutual TLS certificate to secure an endpoint connection.

### bulk_replace_rules
Replaces multiple mock rules at once for mass updates.

### create_rule
Creates a single new rule to simulate specific API responses.

### delete_all_rules
Removes every mock rule currently set up on an endpoint.

### delete_certificate
Deletes a previously added mTLS security certificate.

### delete_request
Removes one specific recorded HTTP request from the history log.

### delete_requests
Clears all historical records of incoming webhooks and requests.

### delete_rule
Removes a single, specified mock rule from an endpoint.

### delete_spec
Deletes a previously uploaded API specification file (e.g., Swagger).

### delete_state_item
Removes one specific piece of stored session data.

### delete_state
Bulk deletes multiple pieces of state or context data at once.

### download_multipart
Downloads a file that contains multiple different parts, like images and documents.

### get_job_status
Checks the current status of an API specification upload job.

### get_request
Retrieves all details for one specific recorded HTTP request.

### get_rule
Fetches the full configuration and details of a single mock rule.

### get_settings
Retrieves the current operational settings for an endpoint, including CORS status.

### get_spec_details
Gets detailed information about a previously uploaded API specification file.

### get_state_item
Retrieves the value of a single key-value context item.

### list_certificates
Lists all currently configured mTLS security certificates for the endpoint.

### list_requests
Retrieves a comprehensive list of recent incoming HTTP requests and webhooks.

### list_rules
Shows all active mock rules configured for the endpoint.

### list_state
Retrieves a list of all existing key-value state items used by the mock APIs.

### reorder_rules
Changes the sequence or priority order of multiple mock rules.

### update_rule_full
Completely overwrites all settings for an existing mock rule with new data.

### update_rule_partial
Modifies specific, selected fields of a mock rule without affecting its other settings.

### update_settings
Updates the general operational settings for an endpoint, like CORS policies.

### upload_blob
Uploads a generic binary file or asset to the system.

### upload_spec
Ingests an entire API specification document (like OpenAPI) to generate mock endpoints automatically.

### upsert_state
Creates or updates multiple pieces of state data in a single operation.

## Prompt Examples

**Prompt:** 
```
List all mock rules for the 'payment-api' endpoint.
```

**Response:** 
```
I've retrieved the rules for 'payment-api'. You have 3 active rules: 1. GET /success (200 OK), 2. POST /authorize (401 Unauthorized), and 3. GET /balance (200 OK).
```

**Prompt:** 
```
Show me the last 5 requests received at 'my-webhook-test'.
```

**Response:** 
```
Fetching recent traffic... I found 5 requests. The most recent one was a POST to /callback with a JSON payload containing 'event: user_signup'. Would you like to see the full headers for this request?
```

**Prompt:** 
```
Enable CORS and request logging for the 'dev-sandbox' endpoint.
```

**Response:** 
```
Settings updated successfully for 'dev-sandbox'. CORS is now enabled and request logging is active.
```

## Capabilities

### Simulate API Behaviors
You can create and modify mock rules to simulate any API response, handling everything from simple success codes to complex error states.

### Manage Webhook Traffic
List and inspect incoming HTTP requests in real time, letting you debug third-party webhooks and payment callbacks as they happen.

### Control Endpoint Settings
Configure security features like CORS and request logging for specific subdomains without touching server files.

### Maintain Data Context
Store session data across multiple mock calls using state management tools, ensuring your simulated APIs remember key information.

## Use Cases

### Testing a Payment Flow
A developer needs to test checkout logic but the payment gateway is down. They use Beeceptor's MCP to create several mock rules, simulating both successful authorization (200 OK) and various failure codes (401 Unauthorized), allowing them to complete the UI testing loop immediately.

### Debugging a CRM Webhook
A user's account is triggering a webhook from their CRM, but the data payload is wrong. They use Beeceptor's MCP to list incoming HTTP requests and inspect the raw JSON payloads via `get_request` until they pinpoint the missing field.

### Building a Multi-Step Form
The application needs to process user data in several steps (step 1 creates a session ID, step 2 uses that ID). The developer uses Beeceptor's MCP and `upsert_state` to ensure the mock API calls pass the required context between simulated actions.

### Simulating Rate Limiting
QA needs to test how the app handles too many requests. They configure a specific mock rule that returns a 429 Too Many Requests status, verifying the application's graceful fallback mechanism without needing actual rate-limiting infrastructure.

## Benefits

- Stop waiting on backend teams. You can mock any API dependency immediately, giving frontend developers the freedom to build against fake endpoints using `create_rule`.
- Debug webhooks instantly. When a third-party service hits your endpoint, use `list_requests` and `get_request` to see the raw payload data and headers in real time.
- Test complex workflows with state management. By using tools like `upsert_state`, you can make sure that API calls remember context—like knowing a user's ID across multiple steps.
- Simplify setup through specs. Instead of configuring rules manually, upload an OpenAPI document via `upload_spec` and let the system generate all required mock endpoints automatically.
- Ensure security testing is robust. Manage endpoint access by adding or deleting mTLS certificates using tools like `add_certificate` and `delete_certificate`, simulating enterprise-grade security checks.

## How It Works

The bottom line is: it gives you a conversational way to debug backend integrations and test APIs without needing infrastructure access.

1. First, subscribe to the Beeceptor MCP and enter your unique API Key into your client.
2. Next, tell your AI agent what you need—for example, 'Create a mock rule for GET /user/profile that returns this specific JSON payload.'
3. Finally, your agent executes the request through the MCP, simulating the endpoint behavior and returning live data or status updates.

## Frequently Asked Questions

**How do I use Beeceptor MCP to simulate a user signup?**
You can create multiple mock rules using `create_rule`—one for the initial POST request and another rule that handles success, perhaps returning a unique User ID. You'll need state management tools like `upsert_state` if later steps rely on that generated ID.

**What is the difference between list_requests and list_rules in Beeceptor MCP?**
The difference is what they track. `list_requests` shows historical incoming traffic, letting you see payloads from external webhooks. `list_rules` only shows the rules *you* have configured to handle mock responses.

**Can I test how my app handles a timeout using Beeceptor MCP?**
Yes. You can use tools like `update_rule_partial` or `create_rule` to configure specific failure responses, simulating timeouts and network errors so you can verify your application's fallback logic.

**Do I have to write code to connect Beeceptor MCP?**
No. You interact with this MCP using natural language through any compatible client, like Claude or Cursor. Your agent translates your request into the necessary tool calls for you.

**What if my API needs to remember data between requests?**
You use the state management tools provided by the MCP. Specifically, `upsert_state` lets you save a piece of context (like an account ID) that subsequent mock calls can access via `get_state_item`.