Know a great AI tool or AI news source? Submit it to AiByts

How we exposed our docs as a grounded MCP server (Cloudflare AI Search + a stateless Worker)

LLMs hallucinate most confidently about exactly the domain we publish on — Chinese licenses, store policies, cloud partitions. I run chinaready.co, an editorial site about China market entry for Western software teams (full disclosure: it's my site; the server below is free and MIT-licensed, no…

By Martin LiuDev.to AI
How we exposed our docs as a grounded MCP server (Cloudflare AI Search + a stateless Worker)

This article discusses the creation of a public MCP server using Cloudflare AI Search and a stateless Worker, designed to provide accurate information on Chinese market entry for Western software teams.

What happened

The author created a public MCP server using Cloudflare AI Search and a stateless Worker to provide accurate information on Chinese market entry for Western software teams. The server includes tools for search, topic listing, and article retrieval, with a focus on improving search accuracy through hybrid retrieval methods.

Why it matters

This development is significant for AI developers and technical professionals working on information retrieval systems, particularly those dealing with specialized domains like Chinese market entry. The use of hybrid search and stateless architecture offers insights into building efficient and accurate AI-powered search solutions.

  • Hybrid search methods are essential for accurate information retrieval in domains with specific terminology.
  • Stateless Workers can be effectively used to create scalable and efficient AI search endpoints.
  • Providing tool annotations and branding in MCP servers enhances usability and integration with AI clients.
  • Careful consideration of rate limits and re-indexing is necessary when deploying AI search solutions.
  • The use of Markdown and URL citations ensures transparency and traceability in AI-generated responses.

The bigger picture

The article provides a practical example of building an AI-powered search system tailored for specific domains, offering a template for others to follow. It highlights the importance of hybrid search methods and stateless architectures in improving search accuracy and scalability.

The article presents a practical approach to building an AI-powered MCP server for specialized information retrieval, emphasizing the importance of hybrid search and stateless architecture. It offers a template for developers looking to create similar systems for their domains.

Technical details

  • Hybrid search (BM25 + vector) for improved exact-term query accuracy
  • Cloudflare AI Search for corpus retrieval
  • Stateless Cloudflare Worker implementing Streamable HTTP JSON-RPC
  • MCP (Machine-Comprehension Protocol) server with tool annotations and branding
  • Markdown retrieval via Accept headers and HTML-stripping fallback

FAQ

What is the purpose of the MCP server described in the article?

The MCP server provides an endpoint for AI clients to access accurate information on Chinese market entry for Western software teams, using hybrid search methods for improved query accuracy.

How does the hybrid search method improve query accuracy?

Hybrid search combines BM25 keyword matching with vector similarity, ensuring that exact terms like 'B25' (a specific license threshold) are correctly retrieved, avoiding semantically similar but incorrect results.

What are the key components of the MCP server setup?

The MCP server uses Cloudflare AI Search for corpus retrieval, a stateless Cloudflare Worker for the endpoint, and includes tools for search, topic listing, and article retrieval in Markdown format.

This summary and analysis were generated with AI from the original article and may contain errors. Read the original for the full story.

Read the full story

Originally published by Dev.to AI on Oct 13, 2026.

Read on Dev.to AI(opens in a new tab)

Comments

Sign in to join the discussion.

No comments yet — be the first to share your thoughts.