Documentation

MCP Server

Let AI agents like Claude, ChatGPT, Claude Code and Cursor create and manage your mocks

Overview#

You can think of an MCP (Model Context Protocol) server as an authenticated API that an LLM can use to work with a specific platform. In Mockulator, that means your AI agent can see your mock servers and create mock endpoints for you.

The Mockulator MCP server is hosted, so there's nothing to install or run. You connect your tool of choice to https://api.mockulator.com/mcp and sign in with your Mockulator account the first time.

Connect your client#

On claude.ai, go to Customize → Connectors → Add custom connector, name it Mockulator and use this as the server URL:

text
https://api.mockulator.com/mcp

Leave the OAuth client ID and secret empty and click Add. If Claude asks how to register its OAuth client, choose Register automatically.

Click Connect. A Mockulator window opens. Sign in if needed, then click Allow. The connector also shows up in the Claude desktop app.

Verify the connection#

Open a new chat and ask:

Create a mock endpoint that returns a list of three users as JSON.

The agent should ask which of your mock servers to use (or pick the obvious one if you've been talking about it), create the endpoint, and hand you a live https://api.mockulator.com/api/... URL. Open that URL in your browser and your mock is already serving.

Tools and capabilities#

The Mockulator MCP server exposes eight tools. Your agent uses them on its own, so you won't usually call them directly.

ToolWhat it does
list_serversLists your mock servers with their public base URLs and endpoint counts.
create_serverCreates a new, empty mock server and returns its public base URL, ready for endpoints.
list_endpointsLists the endpoints of one server with their name, method, status code, and live URL. Supports filtering by name or HTTP method, or pass an endpointId to get the full detail of a single endpoint (response bodies, headers, rules, validations).
create_endpointCreates a mock endpoint: path, method, status code, response body, and content type. Pass type "validation" with a list of field checks to reject bad requests with a 400 before the mock responds. The mock is live at its public URL immediately.
edit_endpointEdits an existing endpoint: method, status code, response body, content type, response delay, or its full list of field checks. Only the fields the agent passes are changed.
add_validationsAdds field checks to a validation endpoint without replacing the ones already there.
edit_validationChanges one field check on a validation endpoint.
delete_validationRemoves one field check from a validation endpoint. The endpoint itself stays.

Errors and troubleshooting#

Your client can't connect. Make sure the server URL is exactly https://api.mockulator.com/mcp (not mockulator.com/mcp) and that you clicked Allow in the Mockulator window. If it stops working later, disconnect and connect again so you sign in fresh.

The server shows connected but the agent says it has no tools. Restart the client (or start a new agent session). Long-running sessions are the most common cause of stale MCP state in every client.

Team accounts. However you connect, the agent acts on the same servers you see in the dashboard: your team's servers if you're on a team, your personal servers otherwise.

If you're stuck, contact support or ask your agent to troubleshoot using this page as context.

Mockulator: free mock APIs, now with an MCP server.