Each BeforeQuery project ships a built-in MCP server (JSON-RPC 2.0 over Streamable HTTP). Any MCP-compatible client — AI-powered IDEs, desktop assistants, agent frameworks — can search and query your knowledge base as native tools.

Endpoint

Authentication (client key): X-Client-Key header, Authorization: Bearer bq_pk_..., or ?client_key= query parameter.

Supported methods

initialize, tools/list, tools/call, ping.

Tools

Restricted documents are excluded from MCP retrieval, like all client-key surfaces.

Configure an MCP client

Most MCP clients accept a remote server config like:

Call it from the agents SDK

@beforequery/agents wraps the MCP tools with typed methods (the initialize handshake happens lazily):

Raw JSON-RPC example

MCP calls are recorded as mcp traces in observability.