mock-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mock-mcpgenerate mock data for the /users endpoint"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mock-mcp
Mock MCP Server - AI-generated mock data based on your OpenAPI JSON Schema definitions. The project uses a Daemon + Adapter architecture that enables multiple MCP clients (Cursor, Claude Desktop, etc.) to run simultaneously without port conflicts, while providing robust claim-based concurrency control for mock batch processing.
Table of Contents
Related MCP server: Faker MCP Server
Quick Start
Install the package. Add mock-mcp as a dev dependency inside your project.
npm install -D mock-mcp
# or
yarn add -D mock-mcp
# or
pnpm add -D mock-mcpConfigure the Model Context Protocol server. Add mock-mcp to your MCP client configuration (Cursor, Claude Desktop, etc.):
{
"mcpServers": {
"mock-mcp": {
"command": "npx",
"args": ["-y", "mock-mcp@latest", "adapter"]
}
}
}Note: The
adaptercommand connects to a shared daemon process that is automatically started when needed. This eliminates port conflicts when running multiple MCP clients simultaneously.
Connect from your tests. Use
connectto retrieve a mock client and request data for intercepted calls.
import { render, screen, fireEvent } from "@testing-library/react";
import { connect } from "mock-mcp";
const userSchema = {
summary: "Fetch the current user",
response: {
type: "object",
required: ["id", "name"],
properties: {
id: { type: "number" },
name: { type: "string" },
},
},
};
it("example", async () => {
const mockClient = await connect();
const metadata = {
schemaUrl: "https://example.com/openapi.json#/paths/~1user/get",
schema: userSchema,
instructions: "Respond with a single user described by the schema.",
};
fetchMock.get("/user", async () => {
const response = await mockClient.requestMock("/user", "GET", { metadata }) // add mock via mock-mcp
return response.data
});
const result = await fetch("/user");
const data = await result.json();
expect(data).toEqual({ id: 1, name: "Jane" });
}, 10 * 60 * 1000); // 10 minute timeout for AI interactionRun with MCP enabled. Prompt your AI client to run the persistent test command and provide mocks through the tools.
Please run the persistent test: `MOCK_MCP=true npm test test/example.test.tsx` and mock fetch data with mock-mcpWhy Mock MCP
The Problem with Traditional Mock Approaches
Testing modern web applications often feels like preparing for a battle—you need the right weapons (test cases), ammunition (mock data), and strategy (test logic). But creating mock data has always been the most tedious part:
// Traditional approach: Manual fixture hell
const mockUsers = [
{ id: 1, name: "Alice", email: "alice@example.com", role: "admin", ... },
{ id: 2, name: "Bob", email: "bob@example.com", role: "user", ... },
// ... 50 more lines of boring manual data entry
];Common Pain Points:
Challenge | Traditional Solutions | Limitations |
Creating Realistic Data | Manual JSON files or faker.js | ❌ Time-consuming, lacks business logic |
Complex Scenarios | Hardcoded edge cases | ❌ Difficult to maintain, brittle |
Evolving Requirements | Update fixtures manually | ❌ High maintenance cost |
Learning Curve | New team members write fixtures | ❌ Steep learning curve for complex domains |
CI/CD Integration | Static fixtures only | ❌ Can't adapt to new scenarios |
The Mock MCP Innovation
Mock MCP introduces a paradigm shift: instead of treating mock data as static artifacts, it makes them AI-generated, interactive, and evolvable.
Traditional: Write Test → Create Fixtures → Run Test → Maintain Fixtures
↑ ↓
└──────── Pain Loop ───────┘
Mock MCP: Write Test → AI Generates Data (Schema-Compliant) → Run Test → Solidify Code
↑ ↓
└───────────── Evolution ────────────┘Schema-Driven Accuracy
Unlike "hallucinated" mocks, Mock MCP uses your actual OpenAPI JSON Schema definitions to ground the AI. This ensures that generated data not only looks real but strictly adheres to your API contracts, catching integration issues early.
What Mock MCP Does
Mock MCP uses a Daemon + Adapter architecture to move intercepted requests from tests to AI helpers and back again.
Schema-aware generation uses your provided metadata (OpenAPI JSON Schema) to ensure mocks match production behavior.
Batch-aware test client collects every network interception inside a single macrotask and waits for the full response set.
Claim-based concurrency prevents multiple AI clients from racing on the same batch through lease-based locking.
Multi-run isolation supports concurrent test processes with distinct run IDs.
IPC-based communication uses Unix Domain Sockets (macOS/Linux) or Named Pipes (Windows) instead of TCP ports, eliminating port conflicts.
Timeouts, TTLs, and cleanup guard the test runner from stale batches or disconnected clients.
Architecture
The v0.4.0 release introduces a new Daemon + Adapter architecture that fundamentally solves the "multiple MCP clients" problem:
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Test Process │ │ Daemon │ │ Adapter │
│ (your tests) │────▶│ (per-project) │◀────│ (per MCP client)│
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │ │
│ WebSocket/IPC │ JSON-RPC/IPC │ MCP stdio
│ │ │
▼ ▼ ▼
BatchMockCollector Mock Bridge Daemon MCP Tools
- Auto-discovers - Manages runs/batches - claim_next_batch
- Sends batches - Claim/lease control - provide_batch_mock_data
- Receives mocks - Multi-client safe - get_status, list_runsKey Benefits:
Single daemon per project (no per-client server instances)
IPC communication
Full multi-client support
Claim-based concurrency (no race conditions)
Auto-discovery (no manual configuration)
Configure MCP Server
Add mock-mcp to your MCP client configuration. The adapter automatically discovers or starts the daemon for your project:
{
"mcpServers": {
"mock-mcp": {
"command": "npx",
"args": ["-y", "mock-mcp", "adapter"]
}
}
}That's it! The daemon uses IPC (Unix Domain Sockets on macOS/Linux, Named Pipes on Windows) which:
Eliminates port conflicts between multiple MCP clients
Automatically shares state between all adapters in the same project
Requires no manual coordination or environment variables
Restart your MCP client and confirm that the mock-mcp server exposes the tools (get_status, claim_next_batch, provide_batch_mock_data, etc.).
Connect From Tests
Tests call connect to spin up a BatchMockCollector that automatically discovers and connects to the daemon:
// tests/mocks.ts
import { connect } from "mock-mcp";
// Auto-discovers daemon via IPC
const mockClient = await connect({
timeout: 60000,
});
await page.route("**/api/users", async (route) => {
const url = new URL(route.request().url());
const { data } = await mockClient.requestMock(
url.pathname,
route.request().method()
);
await route.fulfill({
status: 200,
contentType: "application/json",
body: JSON.stringify(data),
});
});Batch behaviour stays automatic: additional requestMock calls issued in the same macrotask are grouped, forwarded, and resolved together.
Need to pause the test until everything in-flight resolves? Call waitForPendingRequests to block on the current set of pending requests (anything started after the call is not included):
// After routing a few requests
await mockClient.waitForPendingRequests();
// Safe to assert on the results produced by the mocked responsesMultiple test processes can run concurrently - each gets a unique runId and their batches are isolated from each other.
Describe Requests with Metadata
requestMock accepts an optional third argument (RequestMockOptions) that is forwarded without modification to the MCP server. The most important field in that object is metadata, which lets the test process describe each request with the exact OpenAPI JSON Schema fragment, sample payloads, or test context that the AI client needs to build a response.
When an MCP client calls get_pending_batches, every requests[].metadata entry from the test run is included in the response. That is the channel the LLM uses to understand the requested endpoint before supplying data through provide_batch_mock_data. Metadata is also persisted when batch logging is enabled, so you can audit what was sent to the model.
const listProductsSchema = {
summary: "List products by popularity",
response: {
type: "array",
items: {
type: "object",
required: ["id", "name", "price"],
properties: {
id: { type: "string" },
name: { type: "string" },
price: { type: "number" },
},
},
},
};
await mockClient.requestMock("/api/products", "GET", {
metadata: {
// Link or embed the authoritative contract for the AI to follow.
schemaUrl:
"https://shop.example.com/openapi.json#/paths/~1api~1products/get",
schema: listProductsSchema,
instructions:
"Return 3 popular products with stable ids so the UI can snapshot them.",
testFile: expect.getState().testPath,
},
});Tips for useful metadata
Embed the OpenAPI/JSON Schema snippet (or a reference URL) that describes the response structure for the intercepted endpoint.
Include contextual hints such as the test name, scenario, user role, or seed data so the model can mirror your expected fixtures.
Keep the metadata JSON-serializable and deterministic; large binary blobs or class instances will be dropped.
Reuse helper functions to centralize schema definitions so each test only supplies the endpoint-specific instructions.
MCP Tools
The new architecture provides a richer set of tools with claim-based concurrency control:
Tool | Purpose | Input |
| Get daemon status (runs, pending, claimed) | None |
| List all active test runs | None |
| Claim the next pending batch (with lease) |
|
| Get details of a specific batch (read-only) |
|
| Provide mock data for a claimed batch |
|
| Release a claimed batch without providing mocks |
|
Workflow
The new workflow uses claim → provide to prevent race conditions:
Claim a batch - Call
claim_next_batchto acquire a lease on a pending batchReceive batch details - Get
batchId,claimToken, andrequestsarrayGenerate mocks - Create mock responses for each request
Provide mocks - Call
provide_batch_mock_datawith the claim token
// Step 1: Claim
{
"name": "claim_next_batch",
"arguments": { "leaseMs": 30000 }
}
// Returns: { "batchId": "batch:abc:1", "claimToken": "xyz", "requests": [...] }
// Step 2: Provide
{
"name": "provide_batch_mock_data",
"arguments": {
"batchId": "batch:abc:1",
"claimToken": "xyz",
"mocks": [
{ "requestId": "req-1", "data": { "id": 1, "name": "Alice" } }
]
}
}Lease expiration: If you don't provide mocks within the lease time (default 30s), the batch is automatically released for another adapter to claim.
CLI Commands
Command | Description |
| Start the MCP adapter (default, for MCP clients) |
| Start the daemon process (usually auto-started) |
| Show daemon status for current project |
| Stop the daemon for current project |
| Show help |
| Show version |
Example usage:
# Check if daemon is running
mock-mcp status
# Manually stop daemon
mock-mcp stopAvailable APIs
The library exports primitives so you can embed the workflow inside bespoke runners or scripts:
Client APIs
connect(options?)- Creates aBatchMockCollectorand waits for daemon connection.BatchMockCollector- Low-level batching client for test environments.BatchMockCollector.requestMock(endpoint, method, options?)- Request mock data for an endpoint.BatchMockCollector.waitForPendingRequests()- Wait for pending requests to settle.BatchMockCollector.getRunId()- Get the unique run ID for this collector.
Server APIs
MockMcpDaemon- The daemon process that manages runs and batches.runAdapter()- Start the MCP adapter (stdio transport).DaemonClient- JSON-RPC client for communicating with the daemon.
Discovery APIs
ensureDaemonRunning(options?)- Ensure daemon is running, start if needed.resolveProjectRoot(startDir?)- Find project root by searching for.gitorpackage.json.computeProjectId(projectRoot)- Compute stable project ID from path.
Each class accepts logger overrides, timeout tweaks, and other ergonomics.
Environment Variables
Variable | Description | Default |
| Enables the test runner hook so intercepted requests are routed to mock-mcp. | unset |
| Override the cache directory for daemon files (registry, socket, lock). |
|
How It Works
The new Daemon + Adapter architecture uses four collaborating processes:
Process | Responsibility | Technology | Communication |
Test Process | Executes test cases and intercepts HTTP requests | Playwright/Puppeteer + BatchMockCollector | WebSocket over IPC → Daemon |
Daemon | Manages runs, batches, claims with lease control | Node.js + HTTP/WS on Unix socket | IPC ↔ Test & Adapter |
Adapter | Bridges MCP protocol to daemon RPC | Node.js + MCP SDK (stdio) | stdio ↔ MCP Client, RPC → Daemon |
MCP Client | Uses AI to produce mock data via MCP tools | Cursor / Claude Desktop / custom clients | MCP protocol → Adapter |
Data flow sequence with claim-based concurrency
┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ Test Process │ │ Daemon │ │ Adapter │ │ MCP Client │
│ (Browser Test) │ │ (per-project) │ │ (per MCP client) │ │ (AI) │
└────────┬─────────┘ └────────┬─────────┘ └────────┬─────────┘ └────────┬─────────┘
│ │ │ │
│ 1. Connect via IPC │ │ │
│ HELLO_TEST │ │ │
├════════════════════════►│ │ │
│ │ │ │
│ 2. HELLO_ACK │ │ │
│◄════════════════════════┤ │ │
│ │ │ │
│ 3. BATCH_MOCK_REQUEST │ │ │
│ [req-1, req-2, ...] │ │ │
├════════════════════════►│ │ │
│ │ │ │
│ Test paused... │ 4. Store in pending │ │
│ Awaiting mocks │ queue │ │
│ │ │ │
│ │ │◄────────────────────────┤
│ │ │ 5. claim_next_batch │
│ │ │ │
│ │◄────────────────────────┤ │
│ │ 6. RPC: claimNextBatch │ │
│ │ │ │
│ ├────────────────────────►│ │
│ │ 7. {batch, claimToken} │ │
│ │ │ │
│ │ ├────────────────────────►│
│ │ │ 8. Return batch info │
│ │ │ │
│ │ │ 9. AI generates │
│ │ │ mock data │
│ │ │ │
│ │ │◄────────────────────────┤
│ │ │ 10. provide_batch_ │
│ │ │ mock_data │
│ │ │ │
│ │◄────────────────────────┤ │
│ │ 11. RPC: provideBatch │ │
│ │ + claimToken │ │
│ │ │ │
│ 12. BATCH_MOCK_RESULT │ │ │
│ [mock-1, mock-2] │ │ │
│◄════════════════════════┤ │ │
│ │ │ │
│ 13. Resolve promises │ │ │
│ Test continues │ │ │
▼ ▼ ▼ ▼
Protocol Summary:
─────────────────
- Test Process ←→ Daemon: WebSocket over IPC (Unix socket / Named pipe)
Message types: HELLO_TEST, BATCH_MOCK_REQUEST, BATCH_MOCK_RESULT
- Adapter ←→ Daemon: HTTP JSON-RPC over IPC
Methods: claimNextBatch, provideBatch, getStatus, listRuns
- MCP Client ←→ Adapter: MCP protocol (stdio)
Tools: claim_next_batch, provide_batch_mock_data, get_status, list_runs
Key Features:
──────────────
✓ uses IPC instead of TCP - No port conflicts
✓ Multi-client support - multiple MCP clients can run simultaneously
✓ Claim-based concurrency - prevents race conditions on batches
✓ Lease expiration - auto-recovery if adapter crashes
✓ Multi-run isolation - concurrent test processes are isolated
✓ Auto-discovery - no manual configuration neededUse the development scripts
yarn test # runs Vitest suites
yarn test:concurrency # runs concurrency tests specifically
yarn dev # tsx watch mode for the CLI
yarn dev:adapter # tsx watch mode for adapter
yarn lint # eslint --ext .ts
yarn build # compile TypeScriptTests create isolated daemon instances with temporary cache directories, so they can run safely without affecting your development environment.
License
MIT
Available Tools
6 toolsclaim_next_batchA
Claim the next pending mock batch for processing. This acquires a lease on the batch.
You MUST call this before provide_batch_mock_data. The batch will be locked for 30 seconds (configurable via leaseMs). If you don't provide mock data within the lease time, the batch will be released for another adapter to claim.
| Name | Required | Description | Default |
|---|---|---|---|
| runId | No | Optional: Filter to only claim batches from a specific test run. | |
| leaseMs | No | Optional: Lease duration in milliseconds. Default: 30000 (30 seconds). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It discloses that the batch is locked for a configurable lease (30s default) and that failure to provide data releases the batch for others. This explains critical side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three sentences, front-loaded with the core purpose. Each sentence adds essential information: purpose, ordering dependency, and lease behavior. No superfluous words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers the claim operation, lease, and workflow dependency. However, it does not mention the return value (likely the batch data) or error conditions (e.g., no pending batch). With no output schema, this omission slightly reduces completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%; both parameters (runId, leaseMs) are already described in the schema with identical semantics. The description reinforces the leaseMs default but adds no new information beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action: 'Claim the next pending mock batch for processing.' This distinguishes it from sibling tools like get_batch (reading) and release_batch (releasing). The verb 'claim' and resource 'mock batch' are specific.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly says 'You MUST call this before provide_batch_mock_data', providing a clear ordering requirement. It also explains the lease mechanism and timeout behavior, guiding when to use this tool in the workflow.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_batchA
Get details of a specific batch by ID (read-only, does not claim).
| Name | Required | Description | Default |
|---|---|---|---|
| batchId | Yes | The batch ID to retrieve. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description fully discloses the read-only and non-claiming behavior, which is transparent about side effects. No additional traits (e.g., rate limits) are mentioned, but for a simple read operation, this is sufficient.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that efficiently conveys the tool's purpose and safety attributes. No filler, perfectly front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter, read-only tool with no output schema, the description sufficiently covers the essential aspects. It could mention the return format, but the lack is not critical for this straightforward retrieval.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% coverage with a description for batchId. The description adds 'by ID', which is redundant with the schema. Baseline score of 3 is appropriate as no additional parameter semantics are added.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves details of a batch by ID. It explicitly adds 'read-only, does not claim', effectively distinguishing it from siblings like claim_next_batch and release_batch.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context that the tool is read-only and non-claiming, guiding use away from mutation operations. While it doesn't explicitly state when to use it, the inference is straightforward from the description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_statusA
Get the current status of the mock-mcp daemon, including active test runs and pending batches.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It indicates a read operation and specifies what data is included, but does not disclose potential side effects, authorization needs, or rate limits. The behavior is straightforward, so a score of 3 is appropriate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear, front-loaded sentence with no wasted words. It efficiently conveys the tool's purpose and scope.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read tool with no parameters and no output schema, the description adequately specifies what information is returned. It is complete enough for an agent to understand the tool's function.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With zero parameters and 100% schema coverage, the baseline is 4. The description adds no parameter information because none is needed, but it correctly avoids redundancy.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Get' and the resource 'current status of mock-mcp daemon', and specifies the contents (active test runs and pending batches). This distinguishes it from sibling tools that deal with batches and runs.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for checking daemon status but lacks explicit guidance on when to use this tool versus alternatives, or when not to use it. No exclusions or prerequisites are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_runsB
List all active test runs connected to the daemon.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It does not disclose whether the operation is read-only, destructive, or requires specific permissions. The phrase 'connected to the daemon' hints at a dependency but lacks details.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence, appropriate for a tool with no parameters. It is front-loaded and directly states the action.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema and no annotations, the description lacks completeness. It does not explain what 'active' means, the output format, or how results are returned. For a simple list tool, more context would be beneficial.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are zero parameters, and schema coverage is 100%. The description adds no additional parameter meaning beyond the schema, which is acceptable given no parameters exist.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool lists all active test runs connected to the daemon, providing a specific verb and resource. It distinguishes from siblings like claim_next_batch and get_batch which have different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for retrieving active test runs but provides no explicit guidance on when to use this tool versus alternatives or any prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
provide_batch_mock_dataA
Provide mock response data for a claimed batch.
You MUST first call claim_next_batch to get the batchId and claimToken. The mocks array must contain exactly one mock for each request in the batch.
| Name | Required | Description | Default |
|---|---|---|---|
| batchId | Yes | The batch ID (from claim_next_batch). | |
| claimToken | Yes | The claim token (from claim_next_batch). | |
| mocks | Yes | Array of mock responses, one for each request in the batch. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must cover behavioral aspects. It does not disclose side effects, error conditions, or state changes. The only behavioral constraint mentioned is the required matching of mocks to requests. This is insufficient for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very concise, consisting of two short sentences and a clear prerequisite note. It efficiently conveys essential information without unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers prerequisites and parameter alignment, but lacks information about return values, error handling, or idempotency. Given no output schema, this leaves gaps in understanding the tool's full behavior.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, but the description adds value by explaining that batchId and claimToken come from claim_next_batch and that mocks must have exactly one entry per request. This clarifies parameter context beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: providing mock response data for a claimed batch. It distinguishes from sibling tools by specifying the prerequisite (claim_next_batch) and the requirement that mocks match the batch requests.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly instructs the agent to call claim_next_batch first to obtain batchId and claimToken. Also states that the mocks array must contain exactly one mock per request. This provides clear usage context, though it does not explicitly mention when not to use the tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
release_batchA
Release a claimed batch without providing mock data. Use this if you cannot generate appropriate mocks.
| Name | Required | Description | Default |
|---|---|---|---|
| batchId | Yes | The batch ID to release. | |
| claimToken | Yes | The claim token. | |
| reason | No | Optional reason for releasing. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral traits. It states 'Release a claimed batch' but does not explain what release entails (e.g., batch becomes available again, status changes, reversibility, permissions needed). The description is too brief to inform the agent about side effects or preconditions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description consists of two sentences with no redundant words. It is front-loaded with the primary action and then provides a usage condition, making it efficient for an agent to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (no output schema, few parameters, no annotations), the description covers the minimum information needed for an agent to decide when to use it. However, it lacks details about post-release state and side effects, which would be important for a complete understanding.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, with each parameter described in the schema. The description adds no additional meaning to the parameters. Baseline score of 3 is appropriate as the description does not detract but also does not enhance understanding of the parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action: 'Release a claimed batch without providing mock data.' The resource and condition are specific, and it distinguishes from sibling tool provide_batch_mock_data by specifying the absence of mock data.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says when to use this tool: 'Use this if you cannot generate appropriate mocks.' It implies the alternative of provide_batch_mock_data for when mocks can be generated, though it doesn't explicitly state when not to use this tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
6 tool updates
v0.5.1- First observed
claim_next_batch - First observed
get_batch - First observed
get_status - First observed
list_runs - First observed
provide_batch_mock_data - First observed
release_batch
TDQS
Each tool has a clearly distinct purpose: claiming, getting details, providing data, releasing, and status queries. No overlap or ambiguity.
All tool names follow a consistent verb_noun pattern in snake_case, making the API predictable and easy to navigate.
With 6 tools covering the core workflow (claim, provide, release, inspect), the count is well-scoped and each tool serves a necessary function.
The tool set fully covers the mock batch lifecycle: claiming, providing data, releasing, plus status and batch details. No obvious gaps for the stated purpose.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Generate realistic, FK-consistent synthetic test data for your databases from your AI assistant.
AI-native mock API server with MCP. Create REST/SOAP mocks from Claude, Cursor, or Windsurf.
Deterministic validation for AI-generated artifacts: JSON Schema, OpenAPI response, SQL syntax.
AI-callable tools for API mocking, testing, monitoring, security, and automation.
Related MCP Servers
AlicenseNot gradedqualityAmaintenanceA Model Context Protocol server that generates and runs mock API servers from API documentation like OpenAPI/Swagger specs, enabling developers and AI assistants to quickly spin up mock backends for development and testing.17MIT- AlicenseBqualityDmaintenanceGenerates realistic mock data using Faker.js for database seeding, API testing, and development environments. Supports person/company data, custom patterns, multi-locale generation, and structured datasets with referential integrity.4557MIT
- AlicenseNot gradedqualityBmaintenanceMock Server AI - MCP server providing AI-powered tools and automation by MEOK AI Labs15MIT
- FlicenseNot gradedqualityDmaintenanceEnables instant creation of mock API servers from OpenAPI specs or natural language descriptions, with built-in fake data generation, CRUD endpoints, and configurable delays/errors for testing.-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mcpland/mock-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server