Skip to content

MCP Server

Koral provides a Model Context Protocol (MCP) server. MCP-compatible AI clients such as Claude, Cursor or your own agents can use it to search your catalogue by image, refine the results in plain language and read the values your feed contains.

The MCP server uses the same search as the Endpoints, so results match what your widget shows.

https://search.koral.nu/mcp

The server uses the Streamable HTTP transport. Every tool call takes the searchId of your feed, which you find in the Koral Dashboard. See Authentication for more about the search id.

Terminal window
claude mcp add --transport http koral https://search.koral.nu/mcp

Add the server to the client’s MCP configuration:

{
"mcpServers": {
"koral": {
"url": "https://search.koral.nu/mcp"
}
}
}

Clients that only support local (stdio) servers can connect through mcp-remote:

{
"mcpServers": {
"koral": {
"command": "npx",
"args": ["mcp-remote", "https://search.koral.nu/mcp"]
}
}
}

Finds products that look like an image. Send imageData, a productId or both. A text query alone is not enough.

ParameterTypeRequiredDescription
searchIdstringYesYour feed’s search id
imageDatastringOne of imageData or productIdBase64-encoded image
productIdstringOne of imageData or productIdFind products similar to this product
querystringNoText to combine with the image
limitintegerNoNumber of results (default 10)
filterobjectNoFilter on product fields, e.g. { "gender": "female" }
marketstringNoFor multi-country feeds: return this market’s prices and product fields
simplifiedbooleanNoReturn only product ids and scores

Narrows earlier results with a follow-up request in plain language, such as “in brown”, “cheaper” or “a matching bag”.

ParameterTypeRequiredDescription
searchIdstringYesYour feed’s search id
positiveIdsstring[]YesProduct ids from the earlier results to refine from
querystringYesThe follow-up request
limitintegerNoNumber of results (default 20)
filterobjectNoFilter on product fields
marketstringNoFor multi-country feeds: return this market’s prices and product fields

Finds the products in an image and returns a bounding box, outline and label for each, plus any gender or age group it detects.

ParameterTypeRequiredDescription
searchIdstringYesYour feed’s search id
imageDatastringYesBase64-encoded image

Returns suggested follow-up searches for a product, such as matching items or other colours. Each suggestion has a label and a query you can pass to refine_search.

ParameterTypeRequiredDescription
searchIdstringYesYour feed’s search id
productIdstringYesThe id of a product from the search results

Lists the values that exist in your feed for fields such as color, product_type and gender. Agents use it to build filters that match your data.

ParameterTypeRequiredDescription
searchIdstringYesYour feed’s search id
fieldsstring[]NoOnly return these fields

A typical agent flow:

  1. detect_products on a photo to find the jacket in it.
  2. search_image with the photo to get similar jackets.
  3. refine_search with the ids of the best matches and the query “in brown”.
  4. get_suggestions on the chosen product to offer “jeans to go with it”.

If a tool fails, the result is marked as an error and its text explains why, for example Error: Invalid feed ID for an unknown searchId. See Errors for the underlying API errors.