← Back to Overview

MCP SERVERS

Mock MCP

Expose mock server routes as MCP tools for AI clients — predictable, controlled API responses without hitting real endpoints.

Overview

Enable MCP on a mock server to expose its routes as MCP tools at /mcp. When an AI client calls a tool, it receives the canned mock response body.

Useful for giving AI assistants access to predictable, controlled API responses without hitting real endpoints.

Enabling

Mock server settings → toggle 'MCP' on (mcpEnabled: true).

Adds a /mcp endpoint alongside regular mock routes
Same port as the mock server
MCP endpoint at: http://localhost:{port}/mcp

Route as Tool

Each mock route with an mcpDescription becomes an MCP tool.

Route without mcpDescription: not exposed as a tool (still works as a normal mock route)
Tool name derived from method + path (e.g. GET_users)
Tool call returns the configured mock response body

MCP Fields on Routes

In the Route Editor, expand the 'MCP Tool' section.

FieldTypeDescription
mcpDescriptionstringWhat the tool does — shown to AI clients
mcpInputSchemaJSON SchemaWhat parameters the tool accepts

Both fields are optional. Without a description, the route is hidden from the MCP tool list.

Tool Calls

AI client calls tool → mock server returns the configured response body.

No actual HTTP request is made to a real server
Response is instant (no network latency)
Status code from route config included in response metadata
Great for testing AI integrations without backend dependencies

Use Cases

Prototyping AI agents

Give them mock API access during development

Testing tool calling

Verify AI correctly interprets schemas and parameters

Demo environments

Showcase AI integration without live APIs

Controlled responses

AI always gets consistent data for testing logic

Next

Ko-fi