Sandbox mode: this is a test environment. Payments are in test mode and data may be reset.

Skip to content

Run and integrate

MCP server

Coming soon. Let a coding agent make checked test data with dogm mcp.

On this page

dogm mcp runs a local MCP server over stdio. A coding agent such as Claude Code or Cursor can then write a spec, check it, preview rows, generate files and read the checks report, all on your machine. It makes no network calls and needs no account.

The checks report is the point: every generated row is checked for keys, references, types and rules, and the agent gets the result, not only the files.

Set up

Install the CLI first, once it is released (CLI reference). Then point your client at dogm mcp --root <dir>.

Claude Code

Shell
claude mcp add dogm -- dogm mcp --root .

Run it in the project folder. --root . limits the server to that folder.

Cursor (.cursor/mcp.json in the project, or the global file)

JSON
{
  "mcpServers": {
    "dogm": { "command": "dogm", "args": ["mcp", "--root", "."] }
  }
}

Other clients that start a stdio server take the same command: dogm with the arguments mcp --root <dir>. If the client does not start the server in your project folder, give an absolute path for --root.

The root rule

The server reads and writes files only under --root (default: the current directory).

  • A path with .. is refused. An absolute path must lie inside the root.
  • A symlink that leads out of the root is refused.
  • generate writes only into a directory that does not exist yet. out must be new, and its parent must exist inside the root. If out exists (even empty), the call fails with E_MCP_OUT_EXISTS. Every output file is created new, and an existing file is never overwritten.
  • A new path part may not be a Windows device name (CON, PRN, AUX, NUL, COM1 to COM9, LPT1 to LPT9, with or without an extension) or end in a dot or a space. This holds on every OS and returns E_MCP_BAD_NAME.
  • A spec file (path) must be a regular .yaml, .yml or .json file, at most 1 MiB, and not a dotfile. Anything else returns E_MCP_SPEC_TYPE.
  • dogm_validate reads manifest.json and the part files only if they are regular files (a link is refused).

A refused path returns the error code E_MCP_PATH_OUTSIDE_ROOT. The error shows the root as you gave it to --root.

Tools

ToolWhat it does
dogm_compileChecks a spec (spec text or path). Returns each error with its JSON path, code and hint, or a plan summary.
dogm_previewReturns up to 20 rows per table as JSON (limit, default 5). Writes nothing.
dogm_generateWrites files into a new directory out. Takes seed (required: the same spec, seed and format give the same bytes), format (csv, jsonl, json, sql, mysql or parquet; default csv; SQLite output needs dogm generate --format sqlite in a terminal) and rows overrides. Returns the manifest summary, output_sha256 and the checks report.
dogm_validateRe-reads a generated directory (dir) and checks it against the spec.
dogm_catalogLists the generator names.
dogm_schemaReturns the spec JSON schema.

Every result is structured JSON with a short text summary. Engine errors come back as MCP tool errors (isError) with the engine's stable codes, such as E_EXPR_UNKNOWN_COLUMN. Failed checks are not errors: the call succeeds and report.passed is false.

A tool call with an argument the tool does not have (for example row for rows) is refused with an error that names the field. Preview shows decimal and money values as JSON strings with the digits the file has ("12.50"), because a JSON number would lose the trailing zero.

Results are capped so a large spec cannot flood the agent: 20 preview rows per table, 50 tables, 200 characters per preview cell, 100 checks per report (failed ones first), and 200 KB of JSON per reply. An error reply is cut to the same cap (errors_truncated: true). After dogm_generate has written files, the reply is never refused for size: it drops checks and parts until it fits and sets truncated: true.

Limits

Each call is limited, so a spec cannot fill the disk or use all the CPU. Set the limits when you start the server:

Shell
dogm mcp --root . --max-rows 5000000 --max-bytes 1073741824
FlagDefaultWhat it limits
--max-rows10,000,000Rows in all tables together, checked when the plan is built, for dogm_compile, dogm_preview, dogm_generate and dogm_validate (from the manifest). A spec over the limit fails at once.
--max-bytes2 GiBBytes dogm_generate writes in one call, and bytes dogm_validate reads. The call stops when the budget is spent.

A call over a limit returns E_MCP_LIMIT with a hint that names the flag. After a --max-bytes stop in dogm_generate, the files written so far stay in out; use a new name for the next try.

One message on stdin may be at most 16 MiB without a newline. A longer one makes the server print an error to stderr and exit with code 3.

The server ends when the client closes stdin, also while a tool is running. A cancel of one call (notifications/cancelled) does not stop a running dogm_generate; the files are still written.

What is not available

Masking. dogm mask, keys and specs with a mask block are not exposed over MCP: a key must not pass through an agent. Run those in a terminal (masking guide).

An agent skill

A skill file for Claude Code, dogm-seed-data/SKILL.md, will ship with the CLI. It tells an agent how to write a spec, check it and read the report. Copy the dogm-seed-data folder to .claude/skills/ in your project (or ~/.claude/skills/ for every project).