Connect An MCP Client¶
The project exposes two MCP servers with separate trust boundaries:
- the generator server reads and writes only inside one workspace;
- the Trino server provides allowlisted, read-only metadata and profiling.
Start with the generator server. Add Trino only when database profiling is required.
Prepare A Workspace¶
mkdir -p /path/to/synthetic-workspace
Inputs, safe profiles, reviewed specs, rules, and outputs used through generator MCP tools must remain below this directory.
MCP Client Configuration¶
Use the installed console commands:
{
"mcpServers": {
"test-data-agent-generator": {
"command": "test-data-agent-mcp-generator",
"env": {
"TEST_DATA_AGENT_WORKSPACE_ROOT": "/path/to/synthetic-workspace"
}
},
"test-data-agent-trino": {
"command": "test-data-agent-mcp-trino",
"env": {
"TRINO_HOST": "trino.example.internal",
"TRINO_PORT": "443",
"TRINO_USER": "synthetic_data_reader",
"TRINO_HTTP_SCHEME": "https",
"TRINO_ALLOWED_CATALOGS": "hive,iceberg",
"TRINO_ALLOWED_SCHEMAS": "test_data,staging",
"TRINO_QUERY_MAX_EXECUTION_TIME": "30s",
"TRINO_QUERY_MAX_RUN_TIME": "45s",
"TRINO_QUERY_MAX_SCAN_PHYSICAL_BYTES": "1GB"
}
}
}
}
Do not place a password or token directly in a committed MCP configuration. Use the client's secret mechanism or an environment injected by the runtime.
Safe Generator Sequence¶
- Call
profile_csvwith a CSV path and a new profile path. - Call
infer_dataset_specwith that safe profile. - Stop and review the written
DatasetSpec. - Call
generate_datasetwith an explicit seed. - Call
validate_dataset. - Report summaries and artifact paths, not generated rows.
For business rules, provide exactly one of business_rules_path or a bounded
structured business_rules_payload.
Safe Trino Sequence¶
- Call
list_catalogs,list_schemas, andlist_tables. - Call
describe_table. - Call
profile_table_safefor an allowlisted table. - Pass that response to generator
plan_trino_datasetwith a new workspace, explicit count, seed, and output format. - Stop and review the written
dataset_spec.yaml. - Call
approve_dataset_planonly after review. - Do not export or relay source rows.
Both catalog and schema allowlists are mandatory by default. HTTPS is the default. Plain HTTP requires an explicit override and is intended only for an isolated local Trino instance.
The raw-SQL run_safe_select MCP tool is not exposed by default. Trusted
clients that need the separately validated query tool must explicitly set
TRINO_ENABLE_SAFE_SELECT=true. The review-first planning sequence above does
not require it.
Expected Result¶
MCP responses contain compact metadata:
rows: customers=25, orders=25
seed: 12345
validation: passed
synthetic: true
source rows copied: false
Generated files stay in the workspace. Dataset rows are not returned through MCP responses.
Failure Conditions¶
The server rejects:
- paths outside the workspace, including existing symlink escapes;
- existing output files and non-empty output directories;
- unrestricted SQL, DDL, DML, joins, CTEs, and subqueries;
- likely PII projections and raw sensitive rule literals;
- non-Trino or oversized inline planning profiles;
- missing Trino allowlists;
- requests exceeding configured input, output, query, or execution limits.
See MCP Tools and Configuration for details.