Development
Generate a runnable Redis-backed mock API server with 1-hour TTL, hot updates, and dynamic templated responses
Call this tool from your code in three languages.
curl -X POST 'https://api.elysiatools.com/en/api/tools/api-mock-server' \
-H 'Content-Type: application/json' \
-d '{"mockDefinitionJson":"{\n \"name\": \"User Service Mock\",\n \"basePath\": \"/api\",\n \"endpoints\": [\n {\n \"method\": \"GET\",\n \"path\": \"/users/:id\",\n \"status\": 200,\n \"responseType\": \"json\",\n \"dynamicResponse\": true,\n \"responseBody\": {\n \"id\": \"{{params.id}}\",\n \"name\": \"Mock User\",\n \"trace\": \"{{query.trace}}\",\n \"requestedAt\": \"{{now}}\"\n }\n }\n ]\n}","mockId":"Reuse an existing ID to hot-update the mock server"}'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/api-mock-server| Name | Type | Required | Description |
|---|---|---|---|
| mockDefinitionJson | textarea | Yes | — |
| mockId | text | No | — |
JSON result
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}Add this tool to your Model Context Protocol server so AI agents can list and call it.
Add this block to your MCP client configuration:
{
"mcpServers": {
"elysiatools-api-mock-server": {
"name": "api-mock-server",
"description": "Generate a runnable Redis-backed mock API server with 1-hour TTL, hot updates, and dynamic templated responses",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=api-mock-server",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}After connecting to the SSE endpoint, list the exposed tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoke the tool by its id, passing arguments built from its parameters:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "api-mock-server",
"arguments": {
"mockDefinitionJson": "{\n \"name\": \"User Service Mock\",\n \"basePath\": \"/api\",\n \"endpoints\": [\n {\n \"method\": \"GET\",\n \"path\": \"/users/:id\",\n \"status\": 200,\n \"responseType\": \"json\",\n \"dynamicResponse\": true,\n \"responseBody\": {\n \"id\": \"{{params.id}}\",\n \"name\": \"Mock User\",\n \"trace\": \"{{query.trace}}\",\n \"requestedAt\": \"{{now}}\"\n }\n }\n ]\n}",
"mockId": "Reuse an existing ID to hot-update the mock server"
}
}
}Questions or issues? Contact [email protected]