A production-grade semantic search server for food recipes — built for AI agents using the Model Context Protocol (MCP). Search across 50,000+ recipes with hybrid dense + sparse retrieval and cross-encoder reranking.
A production-grade semantic search server for food recipes — built for AI agents using the Model Context Protocol (MCP). Search across 50,000+ recipes with hybrid dense + sparse retrieval and cross-encoder reranking.
A self-hosted MCP server exposing a recipe dataset through semantic search. Agents can query by natural language, filter by diet, difficulty, time, and servings — and get back ranked, structured recipe data including ingredients, instructions, and nutrition.
Designed for autonomous machine-to-machine consumption via FastMCP 3.2 over HTTP.
Query (natural language)
↓
Dense embedding Sparse embedding
(e5-large-v2) (BM25 / fastembed)
↓ ↓
Qdrant — Hybrid Fusion (RRF)
↓
Cross-encoder reranking
(mmarco-mMiniLMv2-L12-H384-v1)
↓
Structured JSON response
↓
MCP tool / AI agent| Field | Details |
|---|---|
| Total recipes | 50,000+ |
| Source | food.com and others |
| Fields | title, description, ingredients, instructions, nutrition, rating, difficulty, diet, total_time, servings |
| Diet tags | vegetarian, vegan, gluten-free, dairy-free |
| Difficulty | easy, medium, hard |
Search
intfloat/e5-large-v2 (1024 dim)Qdrant/bm25 via fastembedcross-encoder/mmarco-mMiniLMv2-L12-H384-v1Serving
/mcp endpoint)Infrastructure
search_recipes(
query="quick chicken pasta", # required — natural language
diet="vegetarian", # optional: vegetarian, vegan, gluten-free, dairy-free
difficulty="easy", # optional: easy, medium, hard
max_minutes=30, # optional: maximum total time in minutes
servings=4, # optional: number of servings
limit=5 # optional: number of results (default 5)
)
# Returns semantically ranked recipes with ingredients, instructions, nutrition, and ratings[
{
"rerank_score": 7.96,
"title": "quick and easy chicken pasta salad",
"description": "great use for left-over chicken.",
"total_time": 25,
"difficulty": "medium",
"diet": [],
"main_ingredient": "chicken",
"ingredients": ["cooked chicken", "pasta shells", "tomatoes", "italian dressing"],
"instructions": ["combine ingredients", "pour dressing", "chill 1 hour"],
"nutrition": {"calories": 424, "protein_g": 26, "carbs_g": 38.5, "fat_g": 19.5},
"rating": 4.8,
"rating_count": 5
}
]pip install -r requirements.txtpython recipe_mcp_server.pyServer starts at http://localhost:8004/mcp
import fastmcp, asyncio
async def main():
async with fastmcp.Client("http://localhost:8004/mcp") as client:
result = await client.call_tool("search_recipes", {
"query": "quick chicken pasta",
"max_minutes": 30,
"limit": 3
})
for recipe in result.structured_content["result"]:
print(recipe["title"], "-", recipe["total_time"], "min")
asyncio.run(main())Add to your claude_desktop_config.json:
{
"mcpServers": {
"food-recipes": {
"url": "https://recipes.aidatanorge.no/mcp"
}
}
}Try the search interface at recipes.aidatanorge.no
| File | Description |
|---|---|
recipe_mcp_server.py | FastMCP server with hybrid search |
mcp_client.py | Example Python client |
requirements.txt | Python dependencies |
Built and operated as part of AIDataNordic — self-hosted AI data infrastructure for autonomous agents.
AIDataNordic/Food-Recipe-MCP
April 8, 2026
April 13, 2026
HTML