For AI agents
A safe API sandbox your AI agents can build on
Connect Cursor, Claude Code, Claude Desktop or ChatGPT to MockAPI over the Model Context Protocol. Agents design and create mock APIs from a prompt, and test against an isolated mock instead of production.
Free forever plan · No credit card required
{
"mcpServers": {
"mockapi": {
"url": "https://mcp.mockapi.com/api/mcp",
"headers": {
"Authorization": "Bearer mockapi_mcp_YOUR_KEY"
}
}
}
}Agents hitting real systems
Autonomous code that calls production or staging APIs is a risk.
Flaky agent runs
Upstream data that changes between runs makes agent loops hard to repeat.
Context switching
Leaving the editor to click through a dashboard breaks flow.
What you get
MCP tools for everything
list_projects, create_model, create_rest_endpoint, create_graphql_endpoint and more.
Import from specs
Agents can import OpenAPI schemas and Postman collections in one call.
Stored test records
enable_stateful_mode turns on stored records. The first GET to each list endpoint seeds them (25 by default, up to your plan limit), and agents then read and change them over HTTP like a real API (Developer plan and above).
Design guidance
A built-in API design guide helps agents follow REST conventions.
Scoped API keys
MCP keys use scopes, can be revoked anytime and never touch production data.
Works with any MCP client
Sign in from Claude, ChatGPT, Cursor, Claude Code or VS Code, or use a scoped key with clients that cannot sign in.
Get started in three steps
- 01
Create an MCP key
Settings → API keys → create a key with the scopes your agent needs.
- 02
Add the server
Paste the config into Cursor, Claude Code or Claude Desktop.
- 03
Prompt
“Create a mock API for a todo app with users and tasks.”
FAQ
Common questions
What is MCP?
The Model Context Protocol is an open standard that lets AI assistants call external tools. MockAPI exposes its project, model and endpoint operations as MCP tools.
Which AI tools are supported?
Any MCP client, including Cursor, Claude Code, Claude Desktop and ChatGPT (where MCP connectors are available).
Is it safe to let agents create mocks?
Yes. Agents only reach your MockAPI projects through your MockAPI sign-in or a scoped key you can revoke, and mocks are isolated from your production systems.
Build against a mock API that behaves like your real one
Create your first endpoint in under two minutes.
Free forever · No credit card required