Terraform Rag
About
AI-powered knowledge base for your Terraform modules. Index, search, compose, and audit - all from one place.
Details
- Author
- krzysztofgawrys
- Downloads
- 173
- Categories
- Productivity, Knowledge Base, Infrastructure
Jump to
- AI-powered knowledge base
- Index Terraform modules
- Search Terraform modules
- Compose Terraform modules
- Audit Terraform modules
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Terraform RagCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
—
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"terraform rag": {
"terraform-rag": {
"type": "http",
"url": "https://terraform-rag.io/mcp",
"headers": {
"Authorization": "Bearer trag_6c495d7a027369cb5d324d877626c272"
}
}
}
}
}
McpServers
{
"terraform-rag": {
"type": "http",
"url": "https://terraform-rag.io/mcp",
"headers": {
"Authorization": "Bearer trag_6c495d7a027369cb5d324d877626c272"
}
}
}
AI-powered knowledge base for your Terraform modules.
Index, search, compose, and audit - all from one place.
Live Demo-Architecture-Quick Start-MCP Server
Web UI- browse 2700+ modules across 175+ repos (AWS / Azure / GCP):
Login:demo@terraform-rag.io/demo(read-only)
MCP- connect your IDE to the knowledge base:
{ "mcpServers": { "terraform-rag": { "type": "http", "url": "https://terraform-rag.io/mcp", "headers": { "Authorization": "Bearer trag_6c495d7a027369cb5d324d877626c272" } } } }
9 tools available:query_modules,pick_modules,list_modules,get_module_details,get_dependencies,get_module_usage,find_similar_usages,fetch_example_code,get_stats(list_modulesalso takessemantic_queryfor natural-language search).
Point it at your Terraform module repositories. It clones them, parses every HCL file, generates embeddings, and builds a searchable knowledge base in PostgreSQL + pgvector. Then it learnshowthose modules are actually used across your consumer repos - naming patterns, variable conventions, tagging strategies, deployment layouts - and distils that into authoritative guidance.
An agentic pipeline (Claude, Bedrock, or any OpenAI-compatible model) explores the knowledge base across multiple tool-use turns to assemble grounded, reviewable answers - assistive retrieval with a human in the loop, not an autonomous code generator. Query from the web UI, the REST API, or directly from your IDE via MCP.
Agentic Query Pipeline- more than a single RAG lookup. The LLM browses modules, checks details, reads conventions, and fetches example code across multiple tool-use turns before composing an answer for you to review. Four query modes: compose, search, optimize, and audit.
Knowledge Layer- indexes consumer repos to learn real-world usage patterns. Distils conventions across six dimensions (naming, variables, tagging, layout, versions, deployment) and treats them as authoritative guidance in all prompts.
MCP Server- Streamable HTTP endpoint works with Claude Code, Cursor, Windsurf, and any MCP-compatible client. Query your module knowledge base directly from your IDE.
Dependency Graph- PostgreSQL recursive CTEs map the full dependency tree between modules. Find what depends on what, trace impact, and visualize relationships with a D3 force-directed graph.
Version Tracking- automatic git tag discovery with per-module version history. Code-hash caching avoids redundant LLM/embedding calls on re-index.
Flexible LLM Backend- Anthropic (direct or Bedrock), OpenRouter, Ollama, or any OpenAI-compatible endpoint. Swap models without changing code.
CI/CD Integration- GitHub Actions workflow and webhook endpoints for automatic re-indexing when.tffiles change.
Authentication- disabled (default), local email/password with JWT, or ALB-terminated SSO via AWS Identity Center / OIDC.
# 1. Clone and configure git clone https://github.com/krzysztofgawrys/rag-for-terraform.git cd rag-for-terraform cp .env.example .env # Edit .env - set POSTGRES_PASSWORD, JWT_SECRET, and your LLM API key # 2. Start everything docker compose up -d # 3. Index your first repo curl -X POST http://localhost:8000/index/ \ -H "Content-Type: application/json" \ -d '{"repo_url": "git@github.com:org/tf-modules.git", "branch": "main"}'
For private repos, place your SSH deploy key at./worker_deploy_key(or setSSH_KEY_PATHin.env).
Connect any MCP-compatible client tohttp://localhost:8000/mcp/.
{ "mcpServers": { "terraform-rag": { "type": "http", "url": "http://localhost:8000/mcp/" } } }
Available tools:query_modules,pick_modules,list_modules,get_module_details,get_dependencies,get_module_usage,find_similar_usages,fetch_example_code,get_stats.
A separate cheap model can be used for module descriptions during indexing (DESCRIPTION_LLM_*variables).
Browser AI Agent / IDE | | +---------+ +--------+ +----------------+ | Frontend|----->| API |----->| PostgreSQL 16 | | (Vite) | | FastAPI| | + pgvector | +---------+ +---+----+ +----------------+ | +----+----+ | Worker | +-------+ | (Celery)|----->| Redis | +---------+ +-------+
For the full technical deep-dive - stack details, directory structure, API endpoints, agent internals, knowledge layer pipeline, known limitations, and deployment notes - seedocs/ARCHITECTURE.md.
Business Source License 1.1 - seeLICENSEfor details.
- Non-production use (evaluation, testing, development) is permitted
- Production use requires a commercial license from the author
- On 2029-05-25 the license converts to AGPL-3.0
MCP server that ingests project docs once and lets Claude search by meaning instead of reading everything — saving tokens on large codebases
Easily provide codebase context to Large Language Models (LLMs).
Provides up-to-date, version-specific documentation and code examples for libraries directly into your prompt.
A self-hosted MCP server that indexes documentation from various sources and serves it to AI Agents with semantic search.
Free local RAG for Claude Code - Save tokens & time with vector search. Indexes markdown docs and finds relevant info without reading entire files (40x fewer tokens, 15x faster).
The DHTMLX MCP server provides real-time access to official docs and a smart RAG.
A RAG-based Q&A server using a vector store built from Gemini CLI documentation.
Zero-config knowledge base for AI coding agents. Loads your markdown docs into a searchable database and exposes them as MCP tools — search, read, and manage documentation without leaving your editor. Works instantly with SQLite (no setup), upgrades to PostgreSQL + pgvector for hybrid semantic search. Includes skills for searching docs (/gnosis:search), health checks (/gnosis:status), doc management (/gnosis:manage), and first-time setup (/gnosis:setup). 6 MCP tools, 3 resources, FTS5 keyword search, 176 tests.
Local codebase context compiler for AI coding agents, turning TypeScript/Node workspaces into compact, verifiable context packs.
The only RAG API built for Apple Development. Give your AI instant access to 100,000+ pages of official docs, recipes, and evolution proposals.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.




