MCP Server AI Integration
Query your docs from Cursor, Windsurf, and Claude Desktop
About MCP Server
The Model Context Protocol (MCP) is an open standard that allows AI tools like Cursor, Windsurf, and Claude Desktop to connect to external data sources and call them as structured tools during a conversation. BeforeQuery exposes a per-knowledge-base MCP server that makes your documentation queryable from any MCP-aware environment.
How BeforeQuery works with MCP Server
Everything you can do once the MCP Server integration is connected.
Per-knowledge-base MCP endpoint
BeforeQuery serves MCP at POST https://api.beforequery.com/mcp, authenticated with a client key (X-Client-Key header) that names the knowledge base.
search_docs, ask_question, list_sources tools
The MCP server exposes three tools: search_docs for hybrid semantic search, ask_question for a full RAG-grounded answer, and list_sources for metadata about indexed content.
Works with Cursor, Windsurf, and Claude Desktop
Add your BeforeQuery MCP server to any MCP-aware IDE or AI assistant. Developers can query your docs inline without leaving their editor.
Client key authentication
Secure the MCP endpoint with a scoped client key. Restrict which collections and content the MCP tool can access via per-key permissions.
How to connect MCP Server
- Step 01
In BeforeQuery, create a client key under Knowledge Base > Client Keys. Copy the key and your knowledge base ID.
- Step 02
In your MCP client (e.g., Cursor settings, Claude Desktop config), add the BeforeQuery MCP server with the endpoint URL and X-Client-Key header.
- Step 03
Test by asking a question in your IDE — the AI will call search_docs or ask_question and return a grounded answer from your docs.
Related integrations
The BeforeQuery web widget embeds in any HTML page. One script tag, full style customization, mobile-ready, WCAG AA accessible.
Install @beforequery/react for a <BeforeQueryChat /> drop-in or the useBeforeQueryChat headless hook for a fully custom UI.
@beforequery/sdk works in Vue, Svelte, React Native, vanilla JS, and Node.js — a single API for search and chat.
MCP Server — Frequently Asked Questions
Common questions about connecting BeforeQuery to MCP Server.
Ready to connect MCP Server?
Start free. No credit card required. Connect your first integration in under 5 minutes.