food-recipe-mcp
AIDataNordic — Food Recipe MCP
AIエージェント向けにModel Context Protocol (MCP) を使用して構築された、本番環境グレードの料理レシピセマンティック検索サーバーです。ハイブリッド(密ベクトル+疎ベクトル)検索とクロスエンコーダーによるリランキングを組み合わせ、5万件以上のレシピを検索可能です。
概要
セマンティック検索を通じてレシピデータセットを公開する、セルフホスト型のMCPサーバーです。エージェントは自然言語でクエリを実行し、食事制限、難易度、調理時間、人数でフィルタリングを行うことができます。その結果、材料、手順、栄養情報を含む構造化されたレシピデータがランキング形式で返されます。
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データ範囲
フィールド | 詳細 |
レシピ総数 | 50,000件以上 |
ソース | food.com 他 |
フィールド | title, description, ingredients, instructions, nutrition, rating, difficulty, diet, total_time, servings |
食事タグ | vegetarian, vegan, gluten-free, dairy-free |
難易度 | easy, medium, hard |
技術スタック
検索
密ベクトル埋め込み:
intfloat/e5-large-v2(1024次元)疎ベクトル埋め込み:
Qdrant/bm25(fastembed経由)フュージョン: QdrantにおけるReciprocal Rank Fusion (RRF)
リランカー:
cross-encoder/mmarco-mMiniLMv2-L12-H384-v1
サービング
FastMCP 3.2 over HTTP (
/mcpエンドポイント)Claude、LangChain、およびMCP対応のあらゆるエージェントと互換性あり
インフラ
Ubuntu Server 24 LTS、セルフホスト
Qdrant ベクトルデータベース (セルフホスト)
MCPツール
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
}
]クイックスタート
1. 依存関係のインストール
pip install -r requirements.txt2. サーバーの起動
python recipe_mcp_server.pyサーバーは http://localhost:8004/mcp で起動します
3. FastMCPクライアントでの接続
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. Claude Desktopでの接続
claude_desktop_config.json に以下を追加してください:
{
"mcpServers": {
"food-recipes": {
"url": "https://recipes.aidatanorge.no/mcp"
}
}
}ライブデモ
検索インターフェースは recipes.aidatanorge.no からお試しいただけます
ファイル
ファイル | 説明 |
| ハイブリッド検索対応FastMCPサーバー |
| Pythonクライアントの例 |
| Pythonの依存関係 |
自律エージェント向けのセルフホスト型AIデータインフラである AIDataNordic の一部として構築・運用されています。
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/AIDataNordic/Food-Recipe-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server