MCP Server
Let AI agents like 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 — mid-conversation, while it's building your app.
Why is this useful? When an agent is writing a frontend that needs an API that doesn't exist yet, it can now create the mock itself: it asks which of your servers to use, creates the endpoint with the right response body, and gets back a live URL it can immediately wire into your code.
The Mockulator MCP server is hosted — there's nothing to install or run. You connect your tool of choice to https://api.mockulator.com/mcp with your personal API key, and it just works.
Get your API key#
Connect your client#
claude.ai custom connectors can't send auth headers, so the key goes in the URL instead. In Settings → Connectors → Add custom connector, name it Mockulator and paste this as the server URL, replacing YOUR_MCP_KEY with your key:
https://api.mockulator.com/mcp/YOUR_MCP_KEYLeave the OAuth Client ID and Secret fields empty, then click Add.
Because the URL contains your key, treat it like a password — don't share the full URL. You can revoke or regenerate the key anytime from your account page.
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 — your mock is already serving.
Tools and capabilities#
The Mockulator MCP server exposes four tools. Your agent uses them on its own — you won't usually call them directly.
| Tool | What it does |
|---|---|
list_servers | Lists your mock servers with their public base URLs and endpoint counts. |
list_endpoints | Lists the endpoints of one server — 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_endpoint | Creates a mock endpoint: path, method, status code, response body, and content type. The mock is live at its public URL immediately. |
edit_endpoint | Edits an existing endpoint — method, status code, response body, content type, response delay. Only the fields the agent passes are changed. |
Three things worth knowing about how it behaves:
- It knows the templating language. Ask for "100 fake users" and the agent writes one faker-templated object wrapped in a repeat block — fresh random data on every request, not 100 hardcoded rows.
- It asks instead of guessing. If the conversation doesn't make clear which mock server an endpoint belongs on, the agent is instructed to list your servers and ask you to choose.
- It's deliberately scoped. The MCP server can read, create, and edit — but not delete. Destructive actions stay in the dashboard, where a human is clicking.
Errors and troubleshooting#
401 Unauthorized — the key is missing, mistyped, or was regenerated (regenerating always invalidates the previous key). Generate a fresh key at mockulator.com/account and update your client config.
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 — your key 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.