MCP Server
Aegis ships a Model Context Protocol server that exposes nine tools to any MCP-compatible client. Connect Claude Desktop, Cursor, Cline, Hermes, or any other MCP client and run data quality validations conversationally.
Start the server
The server uses stdio transport by default — it runs as a subprocess managed by your MCP client. For remote access, use SSE:
Tools
load_pipeline
Load a pipeline.yaml manifest and return its configuration and goal as context. Use this before run_validation to let the LLM understand what the pipeline does without you re-explaining it.
Parameters
| Parameter | Type | Description |
|---|---|---|
manifest_path |
string | Path to a pipeline.yaml manifest file |
Returns: JSON object with name, description, goal, rules_path, warehouse, connection_params, kb, and a pre-built run_validation_call object ready to pass directly to run_validation.
Example
run_validation
Run a rules YAML file against a warehouse. Returns a JSON report with pass/fail per rule, LLM diagnosis, root cause analysis, and remediation SQL.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
rules_path |
string | required | Path to the rules YAML file |
warehouse |
string | "duckdb" |
Warehouse type: duckdb, bigquery, athena, databricks, postgres |
connection_params |
string (JSON) | "{}" |
Warehouse connection kwargs as a JSON object. Falls back to environment variables if omitted. |
no_llm |
bool | false |
Skip LLM diagnosis. Returns rule pass/fail only. |
Examples
Using environment variables instead
Set warehouse env vars in your client config (see MCP Clients) and omit connection_params. Aegis picks them up automatically:
list_runs
List recent run IDs from the audit trail, newest first.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit |
int | 20 |
Maximum number of run IDs to return |
Returns: JSON array of run ID strings.
get_run_report
Get the full report for a past validation run.
Parameters
| Parameter | Type | Description |
|---|---|---|
run_id |
string | Run ID from list_runs |
Returns: JSON object with run_id, summary, failures, and metadata.
get_trajectory
Get the node-by-node LLM decision log for a run — every prompt, response, cost, and latency. Useful for auditing exactly what Aegis decided and why.
Parameters
| Parameter | Type | Description |
|---|---|---|
run_id |
string | Run ID from list_runs |
Returns: JSON array of decision records, one per agent node that made an LLM call.
search_decisions
Full-text search across all LLM decisions in the audit trail.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
query |
string | required | Search terms (e.g. "null order_id", "root cause ETL") |
run_id |
string | null |
Restrict search to a specific run |
limit |
int | 20 |
Maximum results |
Returns: JSON array of matching decision records with run ID, step, and summary.
compare_reports
Compare two validation runs side by side. Shows regressions (rules that newly failed), fixes (rules that stopped failing), persistent failures, and summary deltas (pass rate, cost).
Parameters
| Parameter | Type | Description |
|---|---|---|
run_id_a |
string | Baseline run ID |
run_id_b |
string | Comparison run ID |
Returns: JSON with regressions, fixes, persistent_failures, summary_delta (pass rate diff, failed count diff, cost diff), and full summaries for both runs.
Example
summarize_reports
Compact summary of one or more runs — pass rate, severity breakdown, top failures, and cost per run. Useful for a quick multi-run overview without loading full reports.
Parameters
| Parameter | Type | Description |
|---|---|---|
run_ids |
list[string] | One or more run IDs to summarize |
Returns: JSON with a runs array — one entry per run with pass_rate, severity_breakdown, top_failures (up to 5), and cost_usd.
Example
check_consistency
Check consistency between two runs. Identifies flapping rules (different pass/fail status between runs) and rule-set drift (different number of rules evaluated). Returns a consistency_score_pct so you can tell at a glance whether the two runs agree.
Parameters
| Parameter | Type | Description |
|---|---|---|
run_id_a |
string | First run ID |
run_id_b |
string | Second run ID |
Returns: JSON with flapping_rules, consistent_failures, consistency_score_pct, rule_set_changed, and a boolean consistent flag.
Example