Ragstar MCP
Ragstar answers questions about a dbt project in chat and Slack, and its MCP server gives Claude search over models and their SQL
- 180 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- A stack of Django, Next.js, Redis and PostgreSQL stores model keys and dbt Cloud, Slack and GitHub tokens
- The content of dbt models and SQL goes to LLM providers for embeddings and answers
- The example value ALLOWED_ORIGINS=* opens the MCP server to any origin
Install
- Works in
Manual install
docker compose up --build -dFirst copy `.env.example` to `.env` and set NEXTAUTH_SECRET, NEXTAUTH_URL, NEXT_PUBLIC_API_URL. Then run `docker compose exec backend-django uv run python manage.py migrate`.
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- A stack of Django, Next.js, Redis and PostgreSQL stores model keys and dbt Cloud, Slack and GitHub tokens
- The content of dbt models and SQL goes to LLM providers for embeddings and answers
- The example value ALLOWED_ORIGINS=* opens the MCP server to any origin
This is third-party code. Review the repository files before installing.
What it does
Ragstar connects to a dbt project, builds a knowledge base from models and documentation and answers plain-language questions in a web dashboard or in Slack with `/ask`. Under the hood are PostgreSQL with pgvector for similarity search, embeddings and OpenAI, Anthropic or Google models, a Django backend and a Next.js frontend. A built-in MCP server for self-hosted installs covers agents. It exposes four tools: `list_dbt_models`, `search_dbt_models`, `get_model_details` and `get_project_summary`. Through them a client such as Claude.ai finds models by meaning, reads their SQL and lineage and sees the structure of connected projects. Sign-in uses OAuth 2.0 with PKCE and data is scoped to the user's organization. A dbt project is added from dbt Cloud with a service token, from GitHub or as an archive. The whole stack starts with Docker Compose: the dashboard opens on port 3000 and the MCP server listens on port 8080.
Who it is for. Analysts and data engineers who have a dbt project and can run a Docker stack so colleagues can ask model questions without SQL.
Good fit when
- Colleagues ask the same Slack questions about which model computes revenue and you want to offload them
- Claude.ai should find dbt models by meaning and show their SQL and lineage
- dbt documentation has grown and search by name no longer helps
- Several people need a shared sign-in with data isolated per organization
- You want a second model to verify the SQL assembled from models
Not a fit when
- You only need quick dbt access from a terminal: dbt Labs has an official MCP server with no Docker stack
- The machine cannot run Docker, PostgreSQL with pgvector and Redis
- You need a cloud MCP without self-hosting: the README allows MCP only on your own install
- Your dbt project does not come from dbt Cloud, GitHub or an archive
Example request
Find everything related to customer revenue in my dbt models and show the SQL of the best match.MCP
- Transport
- http
- Authentication
- OAuth
Environment variables
MCP_AUTHORIZATION_BASE_URLrequired- Django backend URL for OAuth, http://localhost:8000 in the example
DJANGO_BACKEND_URLrequired- Backend URL the MCP server calls
ALLOWED_ORIGINS- Allowed CORS origins, `*` in the example, set specific ones for production
NEXTAUTH_SECRETrequired, secret- Secret that signs frontend session cookies, generated with openssl rand -base64 32 in the README
LLM_OPENAI_API_KEYsecret- OpenAI key, needed for each model provider you use
Limitations
- Ragstar is in public beta: the README warns about rapid changes and rough edges, and one note says the MCP server is temporarily disabled while streaming is stabilized. The MCP section still describes how to start it, so check the state on your own build.
- MCP works only on a self-hosted install: each client needs its own server instance.
- You need model provider keys and the variables NEXTAUTH_SECRET, NEXTAUTH_URL, NEXT_PUBLIC_API_URL. The Metabase and Snowflake integrations are experimental.
How to disable. Stop the stack with `docker compose down`; the `-v` flag removes the database as well. Remove the connection in Claude.ai's MCP server settings.
FAQ
What is Ragstar and how does MCP fit in?
Ragstar is a self-hosted app that builds a knowledge base from a dbt project and answers questions. The MCP server is part of the same Docker stack and serves that knowledge base to clients such as Claude.ai.
Which tools does the Ragstar MCP server expose?
Four: `list_dbt_models` for listing and filters, `search_dbt_models` for semantic search, `get_model_details` for SQL and lineage, and `get_project_summary` for a project overview.
How do I connect Ragstar to Claude.ai?
Start the stack with `docker compose up -d`, add a server in Claude.ai at http://localhost:8080 or your public URL and enable OAuth 2.0. Claude.ai redirects to the Ragstar sign-in, and after it the connection is tied to your organization.
Can I use the MCP without hosting it myself?
No. The README limits MCP to self-hosted installs because each MCP client needs its own dedicated server instance.
Which models does Ragstar use?
OpenAI, Anthropic and Google models. Keys are set with LLM_OPENAI_API_KEY, LLM_ANTHROPIC_API_KEY and LLM_GOOGLE_API_KEY, and are needed only for the providers you use.
Discussion
No questions or reviews yet.
Related
MCP serversThe Dex plugin: an agent explores a database, builds dbt models and a semantic layer and tracks schema drift under cost control
dbt MCP
dbt-mcp
The official MCP server from dbt Labs: the Semantic Layer, project metadata, dbt commands and SQL against the warehouse from an agent
dbt-doctor scores a dbt project's health, profiles models, detects schema drift and writes documentation into schema.yml.
The Byaan MCP server lets Claude Code and Cursor put questions to your databases and returns queries with read-only results.
The official Graphlit MCP server: an agent collects material from Slack, GitHub, mail and websites into a knowledge base and searches it
ArcadeDB ships a built-in MCP server: an agent reads graph, document and vector data, and writes are opt-in.
README in short
The README goes from a description and screenshots to a two-command Docker Compose start, environment variable tables, first sign-in and adding a dbt project. It then covers stack management, local development without Docker and a large MCP section: tools, setup, the OAuth flow and connecting Claude.ai.