Use Relmock with AI assistants
MCP server · Claude Code, Cursor, VS Code · part of the user guide
Your AI coding assistant can build your mock backend for you. Connect it to Relmock once, then ask: "Create a mock backend for my React app." It creates the tables, fills them with realistic data and gives you a working API URL, without you opening the dashboard. It can also read your request log to tell you why your app got an error.
Connect in three steps
- In Relmock, open Account → Access tokens for AI agents and create a token. Choose Read only if the assistant should only look, or Read and write if it should build things.
- Copy the setup for your tool (the page shows it with your token filled in) and paste it into that tool.
- Ask your assistant: "List my Relmock projects." If it answers with your projects, you're connected.
Claude Code
claude mcp add --transport http relmock https://app.relmock.com/mcp \
--header "Authorization: Bearer rmk_..."
Cursor
In ~/.cursor/mcp.json, or .cursor/mcp.json in a project:
{
"mcpServers": {
"relmock": {
"url": "https://app.relmock.com/mcp",
"headers": { "Authorization": "Bearer rmk_..." }
}
}
}
VS Code
In .vscode/mcp.json. VS Code asks for the token once and stores it:
{
"servers": {
"relmock": {
"type": "http",
"url": "https://app.relmock.com/mcp",
"headers": { "Authorization": "Bearer ${input:relmock-token}" }
}
},
"inputs": [
{ "type": "promptString", "id": "relmock-token", "description": "Relmock access token", "password": true }
]
}
Any other MCP client works the same way: the server is https://app.relmock.com/mcp over HTTP, with the token in an Authorization: Bearer header.
Things to ask
Look at my components and create a Relmock project with the tables they need, then generate 20 users.
Why did my checkout page get a 500 in the last 10 minutes? Check the Relmock logs.
Turn on flaky network mode so I can test my loading states.
Import this OpenAPI file into a new Relmock project.
What the assistant can do
| Tool | What it does | Token |
|---|---|---|
list_projects | Your projects, with their mock URLs and counts | read |
get_project | A project's tables, fields, relations and endpoints | read |
list_records | Records of a table, with filters, sorting and pages | read |
get_request_logs | Recent calls to your mock, filtered by status, method or time | read |
get_request | One logged call with its response | read |
get_docs | The OpenAPI spec or TypeScript types, to wire your app to the mock | read |
create_project | A new project | write |
create_tables | Tables, fields and relations in one go | write |
generate_data | Fill the tables with realistic records | write |
create_record, update_record | One record, with the same checks as the mock API | write |
add_relation | Link two tables with a foreign key | write |
create_endpoint | A custom route like a mock login or search | write |
set_latency | Make every response wait, to test loading states | write |
set_network_mode | Healthy, flaky, outage or corrupted responses | write |
import_schema | Tables from OpenAPI, Prisma, SQL, GraphQL, JSON, CSV or Postman | write |
Questions
Is it safe?
The assistant only sees your own projects. Tokens can be read only, they expire, and you can revoke one at any time. Changing your password revokes all of them.
Can it delete my data?
No. There is no delete tool. The closest it gets is generating data, which replaces a table's records, and only a read-and-write token can do that.
Does it cost AI credits?
Not from Relmock. Your assistant does the thinking; Relmock only does the work. Calls are limited to 60 a minute per token on the free plan.
What is MCP?
The Model Context Protocol, an open standard that lets AI assistants use outside tools. Relmock is an MCP server; your editor is the client.
Start
Create a free account, then make a token under Account.