Skip to main content
DBB Software logo

Building a Custom AI Chatbot with Deep CMS Integration and MCP Protocol Support

DBB Software designed and built an AI sales assistant that answers from live CMS content, qualifies leads through structured BANT conversations, and drafts full project Scope Documents with Claude.

Industry

Technology

Service

Agentic AI Development

Team

1 Full-Stack Developer + Agentic AI Development

Project State

February 2026 - March 2026

Country

Poland Flag

Poland

DBB Software Case Study

The Challenge

DBB Software's website attracted consistent traffic from potential clients: startup founders, CTOs, and enterprise decision-makers arriving from Clutch, LinkedIn, G2, and Google Search. But most visitors browsed services and case studies without ever engaging. The sales team fielded repetitive, unqualified inquiries, and there was no way to proactively surface relevant content based on what a visitor was actually looking for.

Off-the-shelf chatbot solutions were evaluated and dismissed: none could deeply integrate with Storyblok CMS, none supported the Model Context Protocol (MCP) for AI agent interoperability, and none offered the structured lead qualification, cost controls, or model portability the team required.

Content-Grounded Conversations

Enable the chatbot to answer questions about DBB Software's services, expertise, and project history using real CMS content, never fabricated or outdated information.

01

Structured Lead Qualification

Qualify visitors through a BANT framework (Budget, Authority, Need, Timeline) with strongly-typed data capture and GDPR-compliant consent enforcement.

02

Intelligent Content Discovery

Proactively surface relevant case studies, client reviews, and insight articles based on the visitor's current page, industry, referrer source, and conversation context.

03

Meeting Booking and Sales Handoff

Integrate with Calendly for one-click meeting scheduling, with UTM attribution preserved and real-time Slack notifications to the sales team.

04

MCP Protocol Server

Expose a public, standards-based endpoint that allows external AI agents to programmatically browse company content, read case studies, check reviews, and book meetings.

05

Multi-Language Support

Auto-detect the visitor's language and respond in kind, switching seamlessly mid-conversation without manual configuration.

06

Cost Control and Security

Enforce per-session token budgets, rate limiting, and a 9-layer security stack including prompt injection defense, input filtering across 9 abuse categories, and a backed kill switch for instant disable.

07

Solutions We Delivered

DBB Software designed and built AI Chat end-to-end, from architecture to deployment, using an AI-accelerated development approach: one developer paired with AI, delivering functionality across 9 iterative development phases in 4 weeks. The system runs on Next.js with Vercel AI SDK, uses Google Gemini via Vercel AI Gateway (switchable to any LLM provider), and connects to Storyblok CMS through 16 real-time MCP tools.

Tool-Augmented Content Intelligence

Rather than traditional RAG with embeddings and a vector database, AI Chat takes a tool-augmented approach. The system prompt carries an index of every page on the site, and the model decides which content tool to call:

Search across every content type.

Fetch the full detail of a case study.

Retrieve client reviews.

Pull knowledge base articles.

Every call hits Storyblok's API in real time, and content is sanitised before it enters the prompt. There is no embedding pipeline to maintain and no stale vectors, and the model chooses what to fetch by meaning rather than by similarity score.

MCP Server for AI Agent Interoperability

The chatbot's content layer is also a public Model Context Protocol server at /.well-known/mcp over Streamable HTTP. It exposes:

14 read-only tools: content search, case study retrieval, service and industry details, client reviews.

3 resources: company overview, engagement models, technology stack.

2 prompts: requirements analysis and vendor comparison.

No authentication, no personal data, and every tool annotated read-only.

Assistants such as Claude can connect and answer questions about DBB Software from live published content rather than stale training data. Setup guides for Claude Desktop and Claude Code ship with the project.

Claude-Written Scope Documents

Visitors who describe a project receive a free Scope Document of about 30 pages: requirements, architecture, decision records, milestones, team setup and risks. Claude writes it, and four controls sit around it:

A retrieval pass pulls DBB Software's real case studies, services and client reviews into Claude's context before drafting.

A faster model structures the draft into the document schema.

A deterministic verifier removes any link that does not trace back to real DBB Software content.

A model from a different vendor audits the finished document against the visitor's own brief, so no model grades its own work.

Claude got the writing job on evidence: benchmarked against the production prompt, it was the only model that returned a complete document within the output budget.

Built with Claude Code, Reviewed Like a Client Build

Claude Code wrote code; it never approved it. It co-authored 645 of the 661 commits on the chatbot, MCP server and Scope Document pipeline, and every change ran the same pipeline DBB Software uses for client work:

Lint at zero warnings, a source type-check and a blocking SonarCloud quality gate.

The full test suite against coverage thresholds, plus Playwright end-to-end and accessibility runs.

Automated review on every pull request since June 2026.

Security audits written against a standing checklist, then re-assessed by a model from a different vendor.

Commit history records which changes Claude Code co-authored, so AI-written code traces back to the change, the review and the engineer who merged it.

Structured BANT Lead Qualification with GDPR Enforcement

The chatbot captures lead data as strongly-typed, Zod-validated fields rather than freeform text:

Budget range, as a fixed set of bands.

Project stage: idea, planning, in progress or scaling.

Industry.

Timeline.

Engagement model.

Before any data is collected, GDPR consent is enforced at the schema level: the tool cannot execute without explicit confirmation. A 3-message server-side gate prevents premature lead capture even if the model is manipulated through prompt injection.

Captured leads reach the sales team by email with the full BANT fields, Slack with masked contact details for real-time alerts, and Mailchimp for CRM tagging. The visitor receives a summary email with a conversation recap and a Calendly booking link.

Context-Aware Engagement Engine

The system assembles a dynamic, session-aware system prompt that adapts to each visitor:

Referrer-aware greetings: Clutch visitors see review-focused openers, LinkedIn visitors a professional tone, and Google searchers are asked about their search intent.

Page-context awareness fetches details about the page the visitor is browsing.

Conversation phases shift the strategy across Discovery (messages 1-2), Qualification (3-6) and Conversion (6+).

Returning visitors are recognised through Redis session checks and greeted warmly, skipping discovery.

Auto-open triggers, on scroll depth for content pages and exit intent on desktop, engage high-intent visitors.

Hot lead detection alerts the sales team in Slack when a visitor reaches the conversion threshold but does not convert.

Layered Security and Cost Control

Every request passes through a layered validation pipeline:

Preview-environment authentication, a kill switch and a cost-mode circuit breaker.

Per-IP rate limiting.

Origin and referer checks, a CSRF token check and content-type enforcement.

A 512 KB body cap and Zod schema validation with a closed tool-type whitelist.

An input filter covering nine abuse categories, applied to replayed history as well as new messages.

A per-session token budget, with tool-call and step limits under a hard timeout.

CMS content passes two further defences before it reaches the model: static sanitisation, and an LLM paraphrase layer that rewrites content into descriptive voice so adversarial instructions cannot hijack the model.

At 80% of the session budget the prompt shifts to prioritise booking a call over lengthy answers, and the kill switch disables chat instantly without a redeployment.

Full Observability and Analytics Integration

Every conversation is traced end to end through Langfuse:

Token usage per turn.

Tool call latency.

Session metadata.

Outcome classification: general chat, content served, lead captured, meeting booked.

Sentry handles error tracking with PII stripped, and GA4 records widget interactions. Outcomes feed back into prompt optimisation, creating a continuous improvement loop.

Results Achieved

clock black

Traceable AI-Assisted Engineering

Claude Code co-authored 645 of 661 commits on the AI code, and each one passed the same tests, static analysis and review gates as client work: about 3,100 of the repo's 5,076 unit tests cover the AI surfaces, plus 320 end-to-end tests. Every change since June 2026 went through a reviewed pull request.

brain

A Content Source for AI Assistants

A public read-only MCP server, live since February 2026, gives Claude and other MCP-compatible assistants 14 tools to browse services, read case studies and check client reviews from live published content.

dollar black

Scope Documents Written by Claude

Prospects receive a free Scope Document of about 30 pages, written by Claude, grounded in DBB Software's delivered projects and audited against their brief before delivery. On the most recent document the cross-vendor audit caught six honesty defects in the draft, including four unsupported absolute claims the visitor's brief never justified.

Data Transfer

Zero-Maintenance Content Sync

Unlike SaaS chatbots that require manual knowledge base uploads or periodic scraping, AI Chat's content tools fetch content from Storyblok in real-time. When a case study is published at 2 pm, the chatbot references it at 2:01 pm.

chat-bubble

Pre-Qualified Leads with Structured Data

The BANT qualification framework captures lead data as strongly-typed fields (budget enum, project stage, industry, timeline). GDPR consent is enforced at the schema level, and the 3-message server-side gate ensures natural conversation flow before any data collection begins.

dashboard black

Enterprise-Grade Security Posture

The layered security stack, from rate limiting and CSRF protection to prompt injection defense and 9-category input filtering, protects against the full spectrum of AI chatbot attack vectors. The Redis kill switch enables instant disable without deployment, and PII is stripped from all observability data.

Want to Build an AI Chatbot That Knows Your Business Inside Out?

See how DBB Software can build a custom AI assistant with deep CMS integration, lead qualification, and MCP protocol support, tailored to your content and your sales process.

Book a Call

Contact Us

I have read the principles of personal data protection - Privacy Policy

"Most of our work starts with a 30-minute call where someone describes a product they're trying to ship and one part of the engineering picture they can't get around.

If that's where you are, let's set one up; I'll tell you straight whether we're the right fit.”

Mina Morkos

Business Development Manager

Want a similar outcome for your team?

Ask our AI assistant — it can pull related case studies, talk through the approach, and put you in touch with the team if you want a deeper conversation.

Discuss a similar project