MCP & REST API AI-generated

Everything you can do in the console - create environments, services, reactions, accounts, variables - is also reachable programmatically, through two parallel transports that both call the exact same server-side logic, so they stay behaviorally identical: an MCP client/AI agent talks JSON-RPC to /console/api/mcp, while a script or CI pipeline can instead call the plain REST endpoints under /console/api/* - both routes end up in the same handler classes.

MCP

MockMotor runs an MCP (Model Context Protocol) server, so an AI coding agent can create and drive mocks directly as part of a coding session - "add a reaction that returns a 503 for every third call," "load 10,000 test accounts," "clone this environment for a load test" - without a human clicking through the console. See the full, always-current MCP Tools Reference (generated from the server's own tools/list response).

REST API

The same operations are available as a plain REST API under /console/api/ - JSON over HTTP, no JSON-RPC envelope - for CI pipelines or any HTTP client that doesn't speak MCP. See the full REST API Reference.

Authentication

Read-only (GET) calls work unauthenticated. Anything that changes state needs an API key, sent as X-MockMotor-API-Key or Authorization: Bearer <key> - find your key on your account page. A key only works for environments you're listed as an owner/editor of.

Both reference pages above carry a running "lessons learned" section - real gotchas found while driving the API from actual agent sessions (bulk-load performance, XQuery vs. JS quirks for SOAP payloads, and more). Worth skimming before writing your own integration.