Skip to main content

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

DBB Software designed and built an AI-powered chatbot that connects directly to the company's CMS, qualifies leads through structured BANT conversations, and exposes the industry's first public MCP server for AI agent interoperability. One developer, paired with Agentic AI Development, delivered the full system in 4 weeks to a live state.

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 using traditional RAG with embeddings and vector databases, AI Chat takes a tool-augmented approach. The system prompt includes a content index of all website pages, and the LLM autonomously decides which of 16 MCP tools to call: searching content, fetching case study details, retrieving client reviews, or pulling knowledge base articles, all in real-time from Storyblok's API. Content is sanitized before entering the prompt to defend against injection patterns. This eliminates the need for an embedding pipeline, ensures content is always perfectly current (not stale vectors), and gives the model semantic understanding of what to fetch rather than relying on similarity search.

MCP Server for AI Agent Interoperability

Chatbot exposes a public Model Context Protocol server at /.well-known/mcp with Streamable HTTP transport, the first known implementation on a company website. The server provides 16 tools (content search, case study retrieval, review aggregation, consultation requests, meeting booking), 3 resources (company overview, engagement models, technology stack), and 2 prompts (requirements analysis, competitor comparison). Read tools are public; write tools are gated by auth. This turns the website into an AI-native distribution channel. External agents built in Claude, Cursor, or other AI tools can interact with DBB Software content programmatically, creating a new inbound channel that no SaaS chatbot can replicate.

Structured BANT Lead Qualification with GDPR Enforcement

The chatbot captures lead data as strongly-typed, Zod-validated structured fields: budget range (enum), project stage (idea/planning/in-progress/scaling), industry, timeline, and engagement model. This replaces freeform text with structured, actionable data. Before any data collection, GDPR consent is enforced at the schema level: the tool literally cannot execute without explicit consent confirmation. A 3-message server-side gate prevents premature lead capture even if the LLM is manipulated through prompt injection. Captured leads flow to the sales team via email (with full BANT fields), Slack (with masked contact details for real-time alerts), and Mailchimp (CRM tagging). The visitor receives a summary email with 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's context. Referrer-aware greetings tailor the opening based on traffic source: Clutch visitors see review-focused openers, LinkedIn visitors get a professional tone, and Google searchers are asked about their search intent. Page-context awareness auto-fetches details about the page the visitor is currently browsing. Conversation phases shift the strategy across Discovery (messages 1–2), Qualification (messages 3–6), and Conversion (messages 6+). Returning visitors are recognized via Redis session checks and greeted warmly, skipping the discovery phase entirely. Auto-open triggers (scroll depth on content pages, exit intent on desktop) proactively engage high-intent visitors, and hot lead detection alerts the sales team via Slack when a visitor reaches the conversion threshold but doesn't convert.

9-Layer Security and Cost Control Stack

very request passes through a 9-layer validation pipeline: MCP auth, kill switch check, rate limiting, origin/referer validation, CSRF token check, content-type enforcement, body size limit, Zod schema validation, and an AI input filter covering 9 abuse categories (prompt injection, system prompt reveal, code generation requests, data scraping, bulk data extraction, model identification probing, off-topic deflection, repetition flood, empty messages). Cost control is enforced through per-session token budgets, tool call limits, streaming step limits, and a LLM timeout. At 80% budget usage, the system prompt shifts to prioritize booking a call over lengthy responses. The kill switch enables instant disable without redeployment.

Full Observability and Analytics Integration

Every conversation is traced end-to-end through Langfuse, capturing token usage per turn, tool call latency, session metadata, conversation outcome classification (general chat, content served, lead captured, meeting booked), and model performance metrics. Sentry handles error tracking with PII filtering. GA4 events track widget open/close interactions. Conversation outcomes feed back into prompt optimization, creating a continuous improvement loop.

Results Achieved

clock black

Production System in 4 Weeks

One developer, paired with Agentic AI, delivered a production-grade AI chatbot: 10+ MRs, 16 MCP tools, a 600-line system prompt, and 3,000+ tests, in approximately 4 weeks of intensive work.

brain

First Public MCP Server on a Company Website

The /.well-known/mcp endpoint with 16 tools, 3 resources, and 2 prompts creates a fundamentally new distribution channel. External AI agents can browse services, read case studies, check client reviews, analyze project requirements, and book meetings.

dollar black

40x Cost Advantage Over SaaS

At 1,000 conversations per month, Daiolog costs approximately $25 compared to $1,000+ for comparable AI chatbot platforms like Intercom (with Fin AI) or Zendesk (with AI agents). The provider-agnostic architecture (Vercel AI Gateway) means the team can switch LLM providers overnight if pricing changes, with zero code modifications.

Data Transfer

Zero-Maintenance Content Sync

Unlike SaaS chatbots that require manual knowledge base uploads or periodic scraping, AI Chat’s 16 MCP 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 9-layer 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.

Background Image

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.

Contact Us

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

"Our 10 years of expertise are embedded in our pre-built solutions, so you don’t need to start from scratch. We set everything up 50% faster.

Interested? Fill out the form and book a free consultation!”

Mina Morkos

Business Development Manager