dbt-MetricAccess-Gateway
Interface with the dbt Semantic Model Repository API to facilitate standardized consumption and utilization of defined organizational key performance indicators (KPIs) across diverse analytical platforms, ensuring metric consistency and simplifying data retrieval for all stakeholders.
Author

TommyBez
Quick Info
Actions
Tags
dbt Metric Access Gateway (MAG)
An intermediary service component designed to route queries to the dbt Semantic Definition Repository, allowing natural language interaction via conversational AI interfaces like Claude Desktop.
Understanding the dbt Semantic Definition Repository
The dbt Semantic Layer serves as a central authority where business measures are formally codified within your dbt infrastructure for subsequent broad application. It establishes:
- A singular, authoritative catalog for critical business performance indicators
- Uniformity in how metrics are quantified across the entire technology ecosystem
- Streamlined mechanisms for personnel to access sophisticated calculated figures
About This Project
This MAG component functions as a translation layer between advanced conversational agents (e.g., Claude) and the structured data definitions provided by the dbt Semantic Layer. Its capabilities include:
- Executing metric requests using unstructured, human language input
- Cataloging and retrieving comprehensive metadata about available metrics
- Performing granular data exploration via filtering, grouping, and ordering operations
- Rendering query outcomes in formats immediately consumable within the AI application environment
Core Capabilities
- 🔎 Indicator Indexing: Scrutinize and locate defined metrics housed within the dbt Semantic Layer structure
- ❓ Query Formulation: Construct and dispatch semantic queries derived directly from natural language prompts
- 🧮 Insight Generation: Apply conditions, aggregations, and sort parameters to facilitate detailed analytical deep dives
- 📈 Presentation Layer: Render query results in clear, easily digestible visual representations
Prerequisites for Deployment
- Active subscription to dbt Cloud with the Semantic Layer feature provisioned
- Necessary API credentials to interface with the dbt Cloud environment
- Runtime environment supporting Node.js (version 14 or newer)
Deployment Instructions
Via Smithery (Preferred Method)
Installation is most straightforward using the Smithery platform:
npx -y @smithery/cli install @TommyBez/dbt-semantic-layer-mcp --client claude
Operational Use Cases
Following setup and configuration, interaction with the dbt Semantic Layer from the Claude Desktop environment includes:
- Inquiring about definitions: "List all measurable indicators available in my semantic model repository."
- Requesting specific data sets: "Retrieve the cumulative sales figure for the preceding fiscal period, segmented by product line."
- Analyzing temporal shifts: "Determine the period-over-period rate of expansion for new user acquisition."
Remediation Steps
Should operational anomalies arise:
- Validate the correctness of all stored authentication tokens
- Confirm that the Semantic Layer service is actively enabled on the associated dbt Cloud workspace
- Review the formal metric definitions within the source dbt project files
Community Involvement
Contributions and enhancements are highly encouraged! Feel free to submit a Pull Request detailing your modifications.
Licensing
This software is distributed under the terms of the MIT License (refer to the LICENSE file for comprehensive particulars).
