Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

dbt-semantic-layer-mcp-server

MCP.Pizza Chef: TommyBez

The dbt-semantic-layer-mcp-server is an MCP server that bridges AI assistants with the dbt Semantic Layer, allowing users to query and explore business metrics via natural language. It provides consistent, reusable metric definitions from dbt projects, enabling seamless metric access and exploration through AI tools like Claude Desktop. This server simplifies metric querying workflows by integrating structured metric data into conversational AI environments.

Use This MCP server To

Query dbt Semantic Layer metrics via natural language Explore available business metrics interactively Integrate dbt metrics into AI assistant workflows Enable consistent metric definitions across tools Simplify complex metric access for data teams Bridge AI assistants with dbt data environments

README

dbt Semantic Layer MCP Server

smithery badge

A Model-Connector-Presenter (MCP) server for seamlessly querying the dbt Semantic Layer through Claude Desktop and other compatible AI assistants.

What is the dbt Semantic Layer?

The dbt Semantic Layer is a powerful feature that allows you to define metrics once in your dbt project and reuse them consistently across your entire data stack. It provides:

  • A single source of truth for business metrics
  • Consistent metric definitions across all data tools
  • Simplified access to complex metrics for all team members

About This Project

This MCP server acts as a bridge between AI assistants (like Claude) and the dbt Semantic Layer, enabling you to:

  • Query metrics directly through natural language conversations
  • Explore available metrics and their definitions
  • Analyze data with dimensional breakdowns and filters
  • Visualize results within your AI assistant interface

Features

  • 🔍 Metric Discovery: Browse and search available metrics in your dbt Semantic Layer
  • 📊 Query Creation: Generate and execute semantic queries through natural language
  • 🧮 Data Analysis: Filter, group, and order metrics for deeper insights
  • 📈 Result Visualization: Display query results in an easy-to-understand format

Prerequisites

  • A dbt Cloud account with Semantic Layer enabled
  • API access to your dbt Cloud instance
  • Node.js (v14 or later)

Installation

Via Smithery (Recommended)

The easiest way to install is via Smithery:

npx -y @smithery/cli install @TommyBez/dbt-semantic-layer-mcp --client claude

Usage

Once installed and configured, you can interact with the dbt Semantic Layer directly from Claude Desktop:

  1. Ask about available metrics: "What metrics are available in my dbt Semantic Layer?"
  2. Query specific metrics: "Show me monthly revenue for the last quarter grouped by product category"
  3. Analyze trends: "What's the week-over-week growth in user signups?"

Troubleshooting

If you encounter issues:

  • Verify your API credentials are correct
  • Ensure your dbt Cloud project has Semantic Layer enabled
  • Check that your metrics are properly defined in your dbt project

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • dbt Labs for creating the dbt Semantic Layer
  • Smithery for the MCP deployment platform
  • LiteMCP for the MCP development package

dbt-semantic-layer-mcp-server FAQ

How does this MCP server connect AI assistants to the dbt Semantic Layer?
It acts as a bridge that translates natural language queries from AI assistants into dbt Semantic Layer metric queries, enabling seamless interaction.
Can I use this server with AI assistants other than Claude?
Yes, it supports any MCP-compatible AI assistant, including Claude, GPT-4, and Gemini.
What kind of metrics can I query through this server?
You can query any business metrics defined in your dbt Semantic Layer, ensuring consistent and reusable metric definitions.
Does this server require special setup within my dbt project?
You need to have the dbt Semantic Layer configured with your metrics defined; the server connects to this existing setup.
How does this server handle metric exploration?
It provides interactive access to explore available metrics and their definitions through conversational queries.
Is the data returned by this server real-time?
The server queries the current state of your dbt Semantic Layer, reflecting up-to-date metric definitions and data.
Can this server improve data consistency across my analytics stack?
Yes, by leveraging the dbt Semantic Layer as a single source of truth, it ensures consistent metric usage across tools and teams.
What LLM providers are compatible with this MCP server?
It works with OpenAI, Anthropic Claude, and Google Gemini, among other MCP-compatible LLMs.