CLI Reference
mimikos start [flags] <spec-path>mimikos mcp [flags]Two commands: start runs a mock server from an OpenAPI spec, mcp runs the MCP server for AI agent integration.
Start flags
Section titled “Start flags”| Flag | Type | Default | Description |
|---|---|---|---|
--port | int | 8080 | Server port |
--mode | string | deterministic | Operating mode: deterministic or stateful |
--strict | bool | false | Return 500 if a generated response fails schema validation |
--max-depth | int | 10 | Max recursion depth for nested/circular schemas |
--max-resources | int | 10000 | Max stored resources in stateful mode (LRU eviction) |
--log-level | string | info | Logging verbosity: debug, info, warn, error |
Examples
Section titled “Examples”# Basic — start on default port 8080 with default deterministic modemimikos start petstore.yaml
# Custom portmimikos start --port 3000 petstore.yaml
# Stateful mode with lower capacitymimikos start --mode stateful --max-resources 500 petstore.yaml
# Strict validationmimikos start --strict petstore.yaml
# Debug loggingmimikos start --log-level debug petstore.yamlMCP subcommand
Section titled “MCP subcommand”mimikos mcp [flags]Starts the MCP (Model Context Protocol) server for AI agent integration. The MCP server communicates over stdio and provides 8 tools for controlling mock servers programmatically.
| Flag | Type | Default | Description |
|---|---|---|---|
--log-level | string | info | Logging verbosity: debug, info, warn, error |
# Start the MCP server (typically called by your editor, not directly)mimikos mcp
# With debug logging for diagnosticsmimikos mcp --log-level debugSee the MCP Server page for setup instructions and the full tool reference.
X-Mimikos-Status header
Section titled “X-Mimikos-Status header”Request a specific response status code from any endpoint:
# Get the 404 response defined in your speccurl -H "X-Mimikos-Status: 404" http://localhost:8080/pets/42
# Get the 422 responsecurl -H "X-Mimikos-Status: 422" http://localhost:8080/pets/42Behavior:
- Returns the response schema defined in the spec for that status code
- If the status code isn’t defined in the spec for that operation, returns an error listing available codes
- In stateful mode, bypasses all state logic — no reads, no writes, no mutations
- If no response schema exists for the code, returns an RFC 7807 fallback
OpenAPI compatibility
Section titled “OpenAPI compatibility”| Feature | Support |
|---|---|
| OpenAPI 3.0 | Supported |
| OpenAPI 3.1 | Supported |
| YAML specs | Supported |
| JSON specs | Supported |
$ref resolution | Supported (including circular references) |
nullable (3.0) | Normalized to 3.1 type: ["...", "null"] |
allOf / oneOf / anyOf | Supported |
discriminator | Supported |
| Media type examples | Returned as-is when defined |
Other flags
Section titled “Other flags”mimikos --version # Show versionmimikos --help # Show usagemimikos start --help # Show start flagsmimikos mcp --help # Show MCP flagsThe mimik alias is available if you’ve installed via go install and have the symlink set up:
mimik start petstore.yamlEnvironment
Section titled “Environment”Mimikos has no environment variable configuration. All settings are passed via CLI flags. This is intentional — a single command with explicit flags is easier to reproduce and debug than implicit environment state.