dbt LLM Agent

v1.0.0Data Science & MLstable

LLM based AI Agent to automate Data Analysis for dbt projects with remote MCP server

agentagentic-aiaiai-data-analysisdata-analysis
Share:
171
Stars
0
Downloads
0
Weekly
0/5

What is dbt LLM Agent?

dbt LLM Agent is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to llm based ai agent to automate data analysis for dbt projects with remote mcp server

LLM based AI Agent to automate Data Analysis for dbt projects with remote MCP server

This server falls under the Data Science & ML category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • LLM based AI Agent to automate Data Analysis for dbt project

Use Cases

Automate dbt data analysis
AI-powered SQL generation
Remote MCP server
pragunbhutani

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedMay 11, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx dbt-llm-agent

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use dbt LLM Agent

Ragstar (formerly dbt-llm-agent) is a self-hosted AI data analyst platform that connects to your dbt projects, learns your data models through semantic indexing, and exposes an MCP server so AI clients can answer business questions in natural language, generate SQL, and retrieve detailed model metadata. It supports text-to-SQL workflows across dbt projects connected to any major data warehouse, and can be queried through a web dashboard, a Slack `/ask` command, or directly through MCP-compatible clients like Claude. Engineers and data teams use it to make dbt documentation interactive and to let stakeholders explore data without writing SQL.

Prerequisites

  • Docker and Docker Compose installed
  • A dbt project connected to a data warehouse (BigQuery, Snowflake, Redshift, etc.)
  • An LLM provider API key: OpenAI (`LLM_OPENAI_API_KEY`), Anthropic (`LLM_ANTHROPIC_API_KEY`), or Google (`LLM_GOOGLE_API_KEY`)
  • An MCP-compatible client such as Claude Desktop or Claude Code
  • Git access to clone the Ragstar repository
1

Clone the repository and create your .env file

Clone the Ragstar repository and copy the example environment file. Open `.env` in your editor and fill in the required values.

git clone https://github.com/pragunbhutani/ragstar.git && cd ragstar
cp .env.example .env
2

Set required environment variables in .env

The minimum required variables are the NextAuth secret and URLs. Add your LLM API key for the provider you want to use.

NEXTAUTH_SECRET=your-random-secret   # openssl rand -base64 32
NEXTAUTH_URL=http://localhost:3000
NEXT_PUBLIC_API_URL=http://localhost:8000
LLM_OPENAI_API_KEY=sk-your-openai-key
3

Start the stack with Docker Compose

Bring up all services (frontend, Django backend, Celery worker, Postgres, Redis) and run database migrations.

docker compose up --build -d
docker compose exec backend-django uv run python manage.py migrate
4

Connect your dbt project through the web UI

Navigate to http://localhost:3000, create an account, and use the onboarding flow to connect your dbt project. Ragstar will ingest and semantically index your dbt models.

5

Configure the MCP server connection

Set the MCP environment variables so the server knows where to connect, then add it to your MCP client config.

MCP_AUTHORIZATION_BASE_URL=http://localhost:8000
DJANGO_BACKEND_URL=http://localhost:8000
ALLOWED_ORIGINS=*

dbt LLM Agent Examples

Client configuration

Claude Desktop config block for the Ragstar MCP server running locally via Docker.

{
  "mcpServers": {
    "ragstar": {
      "command": "npx",
      "args": ["-y", "dbt-llm-agent"],
      "env": {
        "MCP_AUTHORIZATION_BASE_URL": "http://localhost:8000",
        "DJANGO_BACKEND_URL": "http://localhost:8000"
      }
    }
  }
}

Prompts to try

Example queries that use Ragstar's dbt model knowledge and text-to-SQL capabilities.

- "List all dbt models in my project"
- "Search for models related to customer revenue"
- "Show me the SQL and lineage for the customer_metrics model"
- "What tables feed into the orders_daily model?"
- "Write a SQL query to find the top 10 customers by revenue last quarter"

Troubleshooting dbt LLM Agent

Docker Compose startup fails with database connection errors

Wait a few seconds for the Postgres container to become ready, then re-run `docker compose up -d`. The migration command can also fail if run too quickly after startup — retry `docker compose exec backend-django uv run python manage.py migrate` after Postgres is healthy.

MCP tools return empty results for model searches

Ensure you have completed the onboarding flow and connected a dbt project in the web UI at http://localhost:3000. The semantic index must be built before search works — check the Celery task monitor at http://localhost:5555 to confirm indexing has finished.

LLM API calls fail with authentication errors

Verify your LLM API key is correctly set in `.env` under `LLM_OPENAI_API_KEY`, `LLM_ANTHROPIC_API_KEY`, or `LLM_GOOGLE_API_KEY`, and that the Docker containers were restarted after the change with `docker compose restart`.

Frequently Asked Questions about dbt LLM Agent

What is dbt LLM Agent?

dbt LLM Agent is a Model Context Protocol (MCP) server that llm based ai agent to automate data analysis for dbt projects with remote mcp server It connects AI assistants to external tools and data sources through a standardized interface.

How do I install dbt LLM Agent?

Follow the installation instructions on the dbt LLM Agent GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with dbt LLM Agent?

dbt LLM Agent works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is dbt LLM Agent free to use?

Yes, dbt LLM Agent is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Data Science & ML MCP Servers

Explore all data science & ml servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "dbt-llm-agent": { "command": "npx", "args": ["-y", "dbt-llm-agent"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use dbt LLM Agent?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides