Get the FREE Ultimate OpenClaw Setup Guide →

dbt-semantic-layer

MCP Server for querying DBT Semantic Layer

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio tommybez-dbt-semantic-layer-mcp-server npx -y @TommyBez/dbt-semantic-layer-mcp --client claude

How to use

This MCP server provides a bridge between Claude Desktop (or other compatible AI assistants) and the dbt Semantic Layer. It lets you discover available metrics, construct semantic queries using natural language, and analyze results with dimensional breakdowns and filters. You can interact with metrics directly from your AI assistant, browse metric definitions, and generate queries that return structured results suitable for visualization. The server is designed to streamline querying the dbt Semantic Layer via natural language, so you can ask for available metrics, request specific metric calculations, and refine results with grouping, filtering, and sorting as needed.

How to install

Prerequisites:

  • Node.js v14 or later and npm/npx installed
  • Access to a dbt Cloud account with Semantic Layer enabled and API access
  • (Optional) Smithery CLI if you plan to install via Smithery

Install via Smithery (recommended):

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

Alternative local run (using npm/npx):

# Install the MCP package globally or locally via npx
npx -y @TommyBez/dbt-semantic-layer-mcp --client claude

Configuration steps after installation:

  • Set up your dbt Cloud API credentials (API token, account, project, and workspace as required by the MCP package).
  • Provide the necessary endpoints/keys to enable Semantic Layer access from the MCP server.
  • Start the MCP server using the command from the mcp_config (as shown in the example).

Additional notes

Tips and troubleshooting:

  • Ensure your dbt Cloud Semantic Layer is enabled for the project and that the API token has sufficient permissions.
  • Keep API credentials secure; use environment variables or a secret manager as recommended by your deployment environment.
  • If you encounter authentication or connectivity issues, verify the dbt Cloud project ID and workspace settings, and confirm network access to dbt Cloud endpoints.
  • The MCP supports metric discovery, query generation, and result visualization flows; if you don’t see expected metrics, try reloading the metric catalog or checking metric definitions in your dbt project.
  • When deploying, consider rate limits and retry strategies for API calls to the dbt Cloud Semantic Layer.

Related MCP Servers

Sponsor this space

Reach thousands of developers