food-recipe-mcp

food-recipe-mcp

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.

Category
Visit Server

README

AIDataNordic — Food Recipe MCP

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.


What This Is

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.


Architecture

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

Data Coverage

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

Technical Stack

Search

  • Dense embeddings: intfloat/e5-large-v2 (1024 dim)
  • Sparse embeddings: Qdrant/bm25 via fastembed
  • Fusion: Reciprocal Rank Fusion (RRF) in Qdrant
  • Reranker: cross-encoder/mmarco-mMiniLMv2-L12-H384-v1

Serving

  • FastMCP 3.2 over HTTP (/mcp endpoint)
  • Compatible with Claude, LangChain, and any MCP-capable agent

Infrastructure

  • Ubuntu Server 24 LTS, self-hosted
  • Qdrant vector database (self-hosted)

MCP Tool

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

Example response

[
  {
    "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
  }
]

Quickstart

1. Install dependencies

pip install -r requirements.txt

2. Start the server

python recipe_mcp_server.py

Server starts at http://localhost:8004/mcp

3. Connect with FastMCP client

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())

4. Connect with Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "food-recipes": {
      "url": "https://recipes.aidatanorge.no/mcp"
    }
  }
}

Live Demo

Try the search interface at recipes.aidatanorge.no


Files

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.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured