# Ragstar — dbt Knowledge Base + OAuth MCP Server > Ragstar is a self-hosted dbt knowledge base with a web UI and an OAuth-protected MCP server so agents can search models, lineage, and docs safely. ## Install Merge the JSON below into your `.mcp.json`: ## Quick Use 1. Clone and start the stack: ```bash git clone https://github.com/pragunbhutani/ragstar.git && cd ragstar cp .env.example .env docker compose up --build -d ``` 2. Run first-time migrations: ```bash docker compose exec backend-django uv run python manage.py migrate ``` 3. Verify: - Web UI: `http://localhost:3000` - MCP health: `curl http://localhost:8080/health` ## Intro Ragstar is a self-hosted dbt knowledge base with a web UI and an OAuth-protected MCP server so agents can search models, lineage, and docs safely. - **Best for:** data teams using dbt who want an LLM-facing knowledge base with tools (not just exported docs) - **Works with:** Docker Compose, Postgres + Redis in the stack, dbt project docs/metadata, MCP clients for the built-in server - **Setup time:** 25-60 minutes ## Practical Notes - Quant: the stack exposes multiple services (UI, API, worker, MCP) so budget time for ports and env configuration. - Quant: the MCP server provides tools such as listing models, semantic search, and retrieving model details including lineage. ## Why it matters Ragstar is notable because it treats dbt assets as an operational knowledge base with an MCP tool boundary and OAuth, rather than a static docs export. - Concrete two-command quick start plus clear service URLs makes onboarding straightforward. - The MCP server is designed for self-hosted deployment with an OAuth flow, fitting enterprise access expectations. - Tool list focuses on practical dbt workflows: browse, search, and inspect model details and lineage. ## Rollout pattern - Connect one dbt project first and validate that search results map to real model owners and descriptions. - Decide which environments get MCP access; keep production knowledge bases separated from experiments. - Add an internal policy: agents may retrieve model details, but changes to dbt code still go through PR review. ## Watchouts Because Ragstar includes an MCP server and a web UI, treat it as a real internal service: OAuth configured, secrets managed, and environments separated. ### FAQ **Q: Is the MCP server available in hosted mode?** A: The README states MCP is only for self-hosted/open source deployments due to a 1:1 client-server relationship. **Q: What can the MCP server do?** A: It can list dbt models, search semantically, and fetch model details and project summaries. **Q: What is the safest first use case?** A: Use it as read-only discovery: find the right model and lineage, then do changes via PRs in your dbt repo. ## Source & Thanks > Source: https://github.com/pragunbhutani/dbt-llm-agent > License: MIT > GitHub stars: 171 · forks: 32 --- ## 快速使用 1. 克隆并启动: ```bash git clone https://github.com/pragunbhutani/ragstar.git && cd ragstar cp .env.example .env docker compose up --build -d ``` 2. 首次迁移: ```bash docker compose exec backend-django uv run python manage.py migrate ``` 3. 验证: - Web UI:`http://localhost:3000` - MCP 健康检查:`curl http://localhost:8080/health` ## 简介 Ragstar 是自托管的 dbt 知识库与可视化界面,并内置 OAuth 保护的 MCP Server,让 Agent 能检索模型、血缘与文档而无需手动导出,适合数据团队把 dbt 资产变成可问可查的工具层。 - **适合谁:** 使用 dbt 的数据团队:希望有面向 LLM 的“可调用工具”知识库,而不是只导出文档 - **可搭配:** Docker Compose(含 Postgres/Redis)、dbt 项目元数据/文档、可连接内置 MCP 的客户端 - **准备时间:** 25-60 分钟 ## 实战建议 - 量化信息:栈里包含 UI/API/worker/MCP 多个服务,端口与 env 配置需要预留时间。 - 量化信息:MCP server 提供列模型、语义检索、获取模型详情(含血缘)等工具。 ## 为什么值得收录 Ragstar 的亮点在于:它把 dbt 资产做成“可操作的知识库”,并通过 MCP + OAuth 给工具调用划出明确边界,而不是停留在静态文档导出。 - 两条命令即可启动,并清楚列出各服务 URL,上手快。 - MCP server 面向自托管并实现 OAuth 流程,更符合企业内部访问预期。 - 工具列表聚焦 dbt 的真实需求:浏览、检索、查看模型详情与血缘。 ## 落地路径 - 先接入 1 个 dbt 项目,验证检索结果与真实 owner/描述一致。 - 明确哪些环境开放 MCP;生产知识库与实验环境要隔离。 - 制定内部规则:Agent 只做只读发现,任何 dbt 代码变更走 PR review。 ## 注意事项 Ragstar 同时包含 MCP server 与 Web UI,要当作内部服务治理:OAuth 配好、secret 管好、环境隔离好。 ### FAQ **托管版也能用 MCP 吗?** 答:README 表示 MCP 仅支持自托管/开源部署(客户端与服务端 1:1 关系)。 **MCP server 能做什么?** 答:可列出模型、语义检索、获取模型详情/血缘与项目概览。 **最安全的起步场景?** 答:把它当作只读发现工具:找对模型与血缘;修改仍在 dbt 仓库里走 PR。 ## 来源与感谢 > Source: https://github.com/pragunbhutani/dbt-llm-agent > License: MIT > GitHub stars: 171 · forks: 32 --- Source: https://tokrepo.com/en/workflows/ragstar-dbt-knowledge-base-oauth-mcp-server Author: MCP Hub