Case Study 2
AI That Actually Understands Your Business
- Not Just Your Prompt
We built an AI development workflow using MCP and RAG that connects Claude to a private knowledge base - codebase, documentation, business processes - so developers get answers grounded in real context, not hallucinations.
The Challenge
Most teams that try AI coding assistants hit the same wall quickly. The tools are impressive on generic tasks - but the moment a developer asks something specific to their system, the answers fall apart. The AI doesn't know their architecture, their naming conventions, their business rules, or why decisions were made three years ago.
The result: developers stop trusting the tool. It becomes a novelty, not a productivity multiplier.
A private AI assistant with full business context - connected, not just prompted
Layer 1 - MCP (Model Context Protocol)
Connections we built:
- Live codebase access - Claude reads files, understands module structure and dependencies
- Internal API documentation - Claude knows every endpoint, its purpose, and its contracts
- Ticket and task context - Claude reads the current task before suggesting a solution
- Database schema - Claude understands the data model when writing queries or migrations
Layer 2 - RAG (Retrieval-Augmented Generation)
Knowledge indexed:
- Architecture decisions and their rationale (why, not just what)
- Business domain rules and terminology
- Past incident reports and resolution notes
- Engineering standards and conventions
Together: MCP handles live, structured access. RAG handles deep, historical knowledge. Claude reasons across both.
How It Works in Practice
A developer opens their editor. They're working on a new feature.
Without this system:
“How should I structure this service?” → Generic answer based on public knowledge. May conflict with their actual architecture.
With this system:
“How should I structure this service?” → Claude reads their existing service layer via MCP, retrieves the architecture decision record for their module pattern via RAG, and responds with a suggestion that matches their actual codebase and documented standards.
The answer is grounded. It's theirs.
The Stack
Presenting a clean, organized technical reference of our core stack components:
| Layer | Tech |
|---|---|
| AI model | Claude (claude-sonnet-4-6) via Anthropic API |
| Context protocol | MCP (Model Context Protocol) |
| RAG framework | LangChain |
| Vector database | pgvector (PostgreSQL) |
| Embeddings | Anthropic Embeddings API |
| Document ingestion | Custom pipeline — indexes docs, ADRs, runbooks |
| IDE integration | Claude Code / VS Code MCP extension |
| Backend | NestJS |
Outcome & Result
Onboarding time for new developers
Reduced significantly - AI answers context-specific questions instantly
Code review cycles
Fewer back-and-forths - AI suggestions match existing patterns
Documentation lookups
Near zero - developers ask Claude instead of searching Confluence
Answer accuracy
Grounded in private knowledge - no generic or conflicting suggestions
Developer trust in AI tool
High - answers reference actual code and documented decisions
What Makes This Different from Generic AI Tools
| Generic AI Assistant | This System | |
|---|---|---|
| Knows your codebase | No — you paste snippets | Yes — via MCP access |
| Knows your architecture | No | Yes — via RAG on ADRs |
| Knows your business rules | No | Yes — indexed documentation |
| Answers stay current | No — snapshot in prompt | Yes — MCP reads live |
| Hallucinates your stack | Often | Rarely — grounded in real context |