The Model Context Protocol (MCP) endpoint allows AI agents to discover and interact with your AI Search content. This endpoint follows the MCP specification ↗ and provides tools for querying your indexed content.
Enable public endpoints for your AI Search instance:
- Go to AI Search in the Cloudflare dashboard. Go to AI Search ↗
- Select your AI Search instance.
- Go to Settings > Public Endpoint.
- Turn on Enable Public Endpoint.
- Copy the public endpoint URL.
The AI Search MCP endpoint exposes a search tool that queries your indexed content.
| Tool | Description |
|---|---|
search |
Finds exactly what you're looking for |
You can customize this in your AI Search instance settings. For more details, refer to Public endpoint configuration.
Send a request to the /mcp endpoint with the Accept: application/json, text/event-stream header:
curl https://<INSTANCE_ID>.search.ai.cloudflare.com/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "search",
"arguments": {
"query": "How do I configure AI Search?"
}
}
}'