Skip to main content
DBB Software logo

Designing an MCP Server for AI Assistant Discovery

DBB Software scoped a read-only Model Context Protocol server for a healthcare platform's verified specialist directory, giving ChatGPT, Claude, and other AI assistants a way to search it. The review corpus and the booking transaction stay on the client's domain.

Industry

Healthcare & Biotech

Service

AI Development

Team

1 Backend Engineer, 1 Team Lead

Project State

July 2026 - Ongoing

Country

UK

United Kingdom

MCP Server for AI Assistant
NDA

About the Client

A UK-based healthcare technology company operates a global platform that enables patients to review and rate healthcare providers while accessing reliable information to make informed care decisions. With a presence in markets like London, Germany, Austria, Australia, Dubai, and Ireland, the company aims to improve transparency and trust in healthcare through patient feedback and data-driven insights.

The Client's Initial Request

DBB Software established what it would take to be readable and queryable by AI assistants, and to deliver that answer as a buildable technical scope with the decisions already made.

Visibility in AI Assistant Answers

Patients ask ChatGPT, Claude and Perplexity to find a specialist. Those systems assemble answers from the sources they can query, and the client was not one of them.

01

Machine-Readable Review Data

The verified review corpus needed to be readable and citable by AI assistants. One profile showed 341 patient reviews to every human visitor and published none of them in a machine-readable form.

02

Owned AI-Crawler Policy

The client wanted AI-crawler access set deliberately and put under monitoring, so that its presence in AI answers is governed by policy and visible on a dashboard.

03

Shared Read Layer for AI Products

A chatbot, a natural-language search, a clinician bio writer and an after-hours voice receptionist were all in the pipeline. Each needed the same access to specialists, practices, taxonomies and review signals.

04

Booking Traffic Kept on Platform

Assistants would soon be able to answer patient questions from our client's own data. Clinicians pay for visibility, and the review corpus is the moat.

05

Solutions We Delivered

DBB Software designed a chatbot the client's platform operates end to end, built so the safety behavior is enforced by the system, not requested of the model. The checks that matter are fixed code, the platform data comes through a layer that already existed, the conversation hands off into enquiry and booking flows already in production, and the whole service sizes to one small instance.

Purpose-Built Read Service

The service is a new Serverless Framework v4 deployable on nodejs24.x and arm64, running as a Lambda behind a Function URL and a dedicated CloudFront behavior. It depends directly on the platform's existing read-model packages, the specialist, practice, keyword and review repositories, over per-tenant OpenSearch indices. No new datastore, and no schema change in any tenant database.

Transport is Model Context Protocol revision 2025-06-18 over streamable HTTP in JSON response mode, with a fresh server instance per request.

The handler reuses the tenant-resolving middleware and secrets handling the platform already runs in production, so the service inherits the house deployment pipeline.

A code-level review of the existing integration path ruled out reuse. The connector is a separate service carrying its own security posture from the first commit.

The always-warm alternative was evaluated and deferred, with its migration trigger written into the design: sustained public traffic where cold-start latency breaches the 800ms budget for a month, or adoption of a keyed access tier.

Nine Read-Only Tools as a Contract

Nine tools cover the discovery job:

Specialist search

Specialist profile

Review summary

Practice search

Practice profile

Specialty taxonomy

Insurer taxonomy

Language taxonomy

Booking link

Specialist search mirrors the filter set the website already uses, so there are no new search semantics to maintain. Results are capped at 20 per page across three pages, inside a 25,000-token payload ceiling.

Every tool carries a human-readable title and the full annotation set: readOnlyHint, destructiveHint, idempotentHint. Both are contract-level requirements. In DBB's own connector submissions, a missing read-only annotation accounted for roughly 30% of first-submission rejections, and a missing human-readable title was the most common rejection cause at the Anthropic connectors directory.

The tool specifications live in a single shared package consumed by both the public protocol wire and the internal path, so the two surfaces cannot drift apart.

No Language Model Inside the Server

A decision record fixed the intelligence in the client. ChatGPT, Claude and client's own chatbot already decide when to invoke a tool and how to compose the answer.

A model inside the server would have added cost on every call, a vendor data-processing dependency, prompt-injection surface, and non-determinism. The service stays deterministic and cacheable, and sits outside every AI-vendor compliance conversation.

Data-Exposure Envelope Enforced in Code

The line between what reaches an AI answer and what stays on the platform lives in response mappers that only know envelope fields. Property-based tests assert that nothing outside the envelope can serialize, so a field absent from the mapper cannot leak.

Goes out: profile facts, aggregate rating, review count, rating distribution, recency, canonical URLs, provenance and freshness.

Never leaves the platform: verbatim review text, reviewer identifiers, per-review records, patient data.

Derived review themes are gated on a data-fitness check during the proof of concept. If the underlying data does not support them cleanly, the field ships absent.

Response schemas are versioned in the repository beside the tool specs, with a breaking-change check in continuous integration. The data-freshness field is sourced from the read model's own index timestamps.

Tenant Scoping Across Fourteen Markets

The platform runs fourteen tenants: nine country markets, four partner deployments and a default. The design proposes a single public endpoint at the apex, with tenant as a required, server-validated enum on every tool call.

Partner tenants are not valid enum values, so partner data is excluded structurally rather than by filter.

Per-region routing happens behind the service boundary, which keeps one listing, one manifest and one quota policy across markets.

A new country becomes an enum entry plus a launch-playbook step.

Two questions were left for the proof of concept to answer with evidence: cross-region latency for AU-tenant queries served from the EU deployment, and whether assistants handle a tenant parameter gracefully in practice. Per-market endpoints remain available later by supersession, without breaking the apex contract.

Quotas and Extraction Economics

Rate and quota counters live in a distributed store, either managed Redis or a DynamoDB token bucket. Nothing rate-limiting lives in process memory, because a per-process counter multiplies the effective limit by the number of workers running.

Per-client quotas are sized against the page caps so that harvesting the corpus through the tools is slower than crawling the same content from the public sitemap. The Gate 1 cost model prices tool calls at expected volume and at the quota-capped abuse ceiling, alongside a statement of the marginal OpenSearch load, with a monthly budget alarm wired to a fail-closed breaker on the public path.

Nine Security Layers on the Public Path

Every external tool call passes nine checks in request order before any data leaves the platform:

Edge bot policy classification via CloudFront and WAF

Closed JSON schema validation with bounded string lengths

Tenant enum validation against the platform registry

Distributed quota checks backed by managed Redis or a DynamoDB token bucket

No write path and no model anywhere in the codebase

Exposure mapper, enforced by a property-tested envelope

Capped responses: 20 results per page, three pages, a 25,000-token ceiling

Error and log hygiene, with IP-derived rate keys held 14 days

Fail-closed cost breaker with extraction anomaly alerting

No free text reaches a query builder unescaped. OpenSearch queries are constructed only through the existing repository query builders. Five abuse cases are enumerated for the security gate, each with its control and its test: IP-rotation extraction, quota probing, tenant-parameter fuzzing, oversized queries, and cache-busting of the GET manifest.

Latency, Caching and Error Behavior

The underlying queries already serve the website at production load, so the service adds mapping overhead only. The budget is p95 under 800ms warm and p99 under 2 seconds including cold start.

Cache headers are set per tool class:

GET manifest, edge-cached at 12 hours

Taxonomies, 24 hours

Profiles, 1 hour

Search, no-store

The JSON-RPC error taxonomy is defined with its alerting: validation errors are client-side and raise no alert, tenant-not-enabled is client-side, upstream read-layer failures alert above 1% of calls in five minutes, and quota exhaustion returns a 429-equivalent tool error carrying retry-after. Errors return machine-readable codes and never leak stack traces or infrastructure names.

Distribution Through Official Directories

DBB tested the industry's working assumption that publishing a manifest at the well-known path is enough for an assistant to find a connector. No major AI client auto-discovers one.

Distribution runs through the directories where users actually connect: the MCP Registry, the Anthropic connectors directory, and the ChatGPT apps directory.

A server.json registry manifest ships with the repository, and listings follow two stable weeks of public operation.

Directory listings are re-verified after any tool change, because directories re-review on update.

Tool deprecations carry a 90-day sunset noted in the manifest. Protocol revision upgrades are deliberate events with a changelog entry, never silent dependency bumps.

Internal-First Rollout and Deployment

The service ships internal-only first, with no public route in existence, so the chatbot and the AI search are never blocked by public quotas or the timing of the security gate. Public exposure passes a gate where a named reviewer signs five written exit criteria: authentication posture, distributed quotas proven under synthetic abuse load, enumerated abuse cases tested, a cost model with an abuse ceiling, and the outstanding legal question resolved.

Every advertised invariant is pinned by a test rather than by documentation:

Unit tests run tool handlers against repository fakes, with property tests on the exposure mapper.

Integration tests drive the real protocol transport with a real client library against a deployed stage, per enabled tenant, covering initialize, tools/list, tool calls, error paths and quota exhaustion.

The gate's load evidence is a synthetic abuse run asserting that quotas hold and the breaker trips.

Deployment runs the house serverless pipeline across development, staging and production, EU region first, with AU enabled only when a tenant there goes live. Rollback is one step: disabling the CloudFront behavior removes the public path instantly and leaves internal consumers running.

Results Achieved

data transfer

One AI Layer for Every Product

The chatbot, AI search, bio writer and voice receptionist are designed to read platform data through one tool layer.

Document

A Single Source of Truth for AI Access

One envelope, one audit story. No AI feature opens a private route into the platform's records.

shield

Layered Security Before Public Exposure

Nine checks run in the request path, and a named reviewer signs five exit criteria before anything goes public.

access

The Review Corpus as an Owned Asset

Assistants can cite client's ratings. The booking, and the reason clinicians pay for visibility, stay on the platform.

strategy

Predictable Engineering Cost

Ten decisions closed before build, so scope does not reopen and re-price halfway through the work.

group black

Distribution Where Users Actually Connect

Registry and directory listings, because no major AI client discovers a connector on its own.

Make Your Platform Queryable by AI Assistants

DBB Software scopes and builds MCP servers that put your data into AI answers while keeping the asset, and the transaction, on your platform.

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