MCP Server
Headband exposes an MCP (Model Context Protocol) server over HTTP. Connect Claude Desktop, Cursor, or any MCP client to give your AI assistant direct access to your search indexes. Auth uses the same API keys as the REST API.
Setup
The MCP server is available at /api/mcp and speaks JSON-RPC 2.0 over HTTP — no local proxy needed. Add this to your MCP client config:
{
"mcpServers": {
"headband": {
"url": "https://headband.dev/api/mcp",
"headers": {
"Authorization": "Bearer hb_your_api_key"
}
}
}
}/api/mcpReturns MCP server capability descriptor.
{
"name": "headband",
"transport": "http",
"protocol": "json-rpc-2.0",
"mcpProtocolVersion": "2025-06-18",
"hint": "POST a JSON-RPC 2.0 request with Authorization: Bearer hb_<key>"
}Available Tools
The MCP server exposes 5 tools. All are engine-agnostic — the AI assistant never needs to know whether an index is backed by Meilisearch, Typesense, or Elasticsearch.
search_orgSearch across all indexes visible to the API key, merge results with reciprocal rank fusion, and return a single ranked listsearch_indexFull-text search a single index by UID. Returns ranked hits as JSONlist_indexesList every index the API key can access, with engine typeget_index_statsGet document count, indexing health, and field distribution for an indexget_documentFetch a single document by its primary keyResources
Each index is exposed as an MCP resource at headband://index/{uid}. Reading a resource returns index stats and a sample of documents — useful for letting an AI assistant understand the shape of your data before searching.