MCP configuration and scope
DRE MCP exposes only reports with meta.ai.expose: true. An owner should review the report SQL, connections, inputs and related tables before enabling it. AI-ready reports explains how to supply business context and typed inputs.
Expose a reviewed report
Section titled “Expose a reviewed report”A report can declare:
meta: ai: expose: true questions: - What was net revenue by region last month?Descriptions and inherited ai_context.md files explain grain, units, exclusions and reporting periods. Supply representative var_schema defaults so context compilation can resolve the report.
An inherited expose: false closes that branch: a report cannot reopen it below that layer. The most specific questions and access annotations replace earlier values. Access annotations describe intended use in personal mode; they are not authentication controls.
Review report-related tables
Section titled “Review report-related tables”Tables read by an exposed report are exposed by default, even if no extra tables are configured. To disable this globally, create .dre-mcp.yml at the project root:
expose_report_tables: falseThe companion’s --no-report-tables flag provides the same global choice. A report can also declare meta.ai.expose_report_tables: false.
Add explicit scope and limits
Section titled “Add explicit scope and limits”The following is an illustrative configuration; replace connection and object names with the ones you intend to expose:
expose_report_tables: falsetables: warehouse: [analytics.customer_targets]schemas: warehouse: [analytics_public]exclude_tables: warehouse: [analytics.customer_private]cache_ttl_seconds: 300max_rows: 1000query_timeout_seconds: 60max_runs: 100max_snapshots: 3warehouse is a connection name from profiles.yml, not a credential. Extra tables and schemas are opt-in. Explicit exclusions override both automatic report-table exposure and explicit exposure. Exclusions match resolved names using each connection’s identifier case and quoting rules.
Limits bound query output, execution time and retained state. .dre-mcp/ contains retained runs and provenance: treat it as user data rather than disposable build cache.
Validate the resolved configuration
Section titled “Validate the resolved configuration”dre mcp validatedre mcp accessSchema commands print the companion-owned JSON Schemas without loading a project or connecting to a database:
dre mcp schema meta-aidre mcp schema configAfter changing report definitions, scope or upstream comments, ask the connected agent to call refresh_context. It validates and compiles a replacement, retrieves comments and swaps the active context atomically. A failed refresh keeps the previous context; in-flight calls keep their starting snapshot.
Database permissions still matter
Section titled “Database permissions still matter”Personal mode uses the local user’s existing DRE connections. Scope configuration does not replace database permissions.
DuckDB and PostgreSQL exploration require a source plugin advertising read-only session support. Databricks uses a validated single SELECT but cannot enforce a read-only session; use a read-only database role. Unsupported sources fail closed. Exposed report SQL can contain writes, so review reports and choose an appropriate role even when delivery is disabled.
Next: tools and provenance.