State the food, purpose, and comparison criteria.
Food datafor the AI world
The quality of an AI answer depends on the data behind it. Food Search MCP connects your AI client to carefully prepared IMD food data for grounded search, comparison, and analysis.

MCP is a common way to connect AI with food data
Your AI reads each tool description and schema, selects the right operation, sends a structured request, and turns the returned data into a table or explanation.
The tool name and typed arguments are chosen.
Products and dishes are retrieved in one structure.
The result becomes a table, chart, or narrative.
Better AI starts with better evidence
AI can produce a confident but incorrect answer when its source data is wrong or ambiguous. Food Search MCP helps address that weakness by giving AI structured food data created, checked, and audited by IMD. It improves grounding and traceability; it does not guarantee every AI inference or final answer.
Strengthen the evidence
Connect AI to consistently structured records instead of relying only on general training data or fragmented webpages.
Use nutrients not shown on labels
Combine published values with grounded theoretical estimates based on a proprietary recipe model and the Standard Tables of Food Composition in Japan.
Turn specialist work into conversation
MCP and AI handle API operations, field mapping, and formatting so product, marketing, and research teams can start with their own words.
How can IMD estimate nutrients not printed on a package?
Packages and restaurant menus often publish only major nutrients. IMD uses those published values together with product information and images to build a proprietary ingredient composition supervised by its dedicated registered dietitians. Cooking is digitally reconstructed with ingredients aligned to Japan's Standard Tables of Food Composition, adjusted close to the published values, and then used to calculate unlisted nutrients as theoretical estimates.

Check official labels, product data, and images.
Dedicated dietitians supervise the composition.
Use ingredients mapped to Japan's food tables.
Reproduce the food and tune it toward label values.
Calculate nutrients that are not published.
Human checking, internal audit, and MCP delivery.
When an official value is available, IMD records that published value.
Calculated from the recipe model and food composition tables. These are not direct laboratory measurements.
Available fields depend on the tool, public, trial, or API-key access, and contracted scope. Check the latest manufacturer label before making product-specific decisions. How IMD calculates nutrients ↗

More than 400,000 dishes and products, available in one seamless conversation
The underlying IMD Food Database covers commercial products, restaurant menus, and common home-style dishes under a consistent OID-based structure.
FO uniquely identifies ingredients, common and regional dishes, products, restaurant foods, and alcoholic beverages.Start with what you want to learn
Use the public endpoint for basic discovery. Move to API-key access when you need database-side nutrient filters, ingredient detail, comparison, or batch work.
Meals and nutrition tracking
Find foods by name and compare energy, protein, fat, carbohydrates, fiber, and salt on the recorded serving basis.
Wellness support
Compare fields such as salt equivalent or dietary fiber across products and everyday dishes.
Food and health applications
Use the standard MCP SDK or JSON-RPC, keep OIDs as stable identifiers, and validate structuredContent before application use.
Existing services and food businesses
Use updated food data as a search foundation for meal logs, wellness support, or product information services. Commercial terms, storage, redistribution, and SLA are contractual matters.
Discuss requirementsProduct planning, marketing, and research
Combine product themes, manufacturers, launch dates, serving sizes, and nutrient ranges to explore niche categories and competitive positioning.
Use the wholesale cost index as a reference axis
API-key access can rank products by the wholesale cost index (recipe ingredients priced at public wholesale market prices, computed for the run date), compare that value across OIDs, and review about four weeks of daily movement.
The index references public wholesale market prices only and is a relative measure of change over time—not an absolute amount, manufacturing cost, cost of goods sold, retail price, or profit.
API key · food:advancedFive ways to investigate food
AI reads the Japanese tool descriptions and typed schemas (the server instructions also tell it how to handle English requests), then selects an available tool that matches your intent.

Search by name
Keywords, AND/OR logic, new records, and paging.
01Filter by conditions
Nutrients, manufacturer, category, ingredients, and dates.
02Read the detail
OID-based detail, selected nutrients, and up to three major ingredients by amount; rounded approximate amounts for those three are available on request.
03Trace from ingredients
Reverse-search products and dishes containing an ingredient.
04Compare and analyze
Compare nutrition and ingredient-presence differences derived from complete ingredient sets.
05All 12 tools, access requirements, and purpose
The four public tools are included in both authenticated access modes. An instantly issued trial can show up to 12 tools, and a standard API key can also show up to all 12 (11 food tools plus get_token_usage) depending on scope. Add-on tools may still be unavailable even when listed.
AI can select a tool from its description and schema. You usually do not need to memorize names.
“Find three kinds of firm tofu and compare them.”For reproducibility, include the exact tool name in your request.
“Use compare_foods for these three OIDs.”Read tools/list, then set params.name in tools/call.
{ "name": "search_foods", "arguments": {…} }“Food Search” vs. search_foods
Food Search MCP is the service. search_foods is its entry-level name and keyword search tool. Prefixes indicate the action: search_ searches, find_ discovers related records, get_ retrieves one record, and compare_ compares.

| # | Tool | What it does | Access requirement | Required scope | Details |
|---|---|---|---|---|---|
| 01 | Search names and keywords with AND/OR, paging, and optional new records | Public / freeTrialAPI key | food:search | ||
| 02 | Get name, required reading, manufacturer, category, release date, weight, and seven major nutrients from an OID | Public / freeTrialAPI key | food:search | ||
| 03 | Find ingredient candidates mapped to the Japanese food composition tables | Public / freeTrialAPI key | food:search | ||
| 04 | Return food-term suggestions from a partial query | Public / freeTrialAPI key | food:search | ||
| 05 | Get selected nutrients and up to three major ingredients by amount. On request, also returns rounded approximate amounts for the top three ingredients (water excluded) and the names of official label values; exact amounts and ratios are not disclosed | TrialAPI key | food:detail | ||
| 06 | Compare nutrients, the wholesale cost index, and all ingredients across OIDs; ingredient differences are limited to the top three per food, without amounts or ratios. On request, adds each food’s top three ingredients with approximate amounts and the names of official label values | TrialAPI key | food:recipe | ||
| 07 | Run several independent searches and return them in one consistent structure | TrialAPI key | food:batch | ||
| 08 | Rank by nutrient or wholesale cost index and combine taste, color, launch dates, maker, category, ingredients, and other conditions. Can rank by official label values only | TrialAPI key | food:advanced | ||
| 09 | Find similar dishes and products from a name, OID, or composition-match abstract-name candidate; preserve popularity order without disclosing scores | TrialAPI key | food:advanced | ||
| 10 | Reverse-search foods containing an ingredient with nutrient, wholesale cost index, taste, color, date, and other conditions. Can rank by official label values only | TrialAPI key | food:advanced | ||
| 11 | Search by nutrient range without a name; unavailable without a separate contract | TrialAPI key | food:advancedDB-API add-on required | ||
| 12 | Returns this key’s plan, key state, billing state, tokens usable now, weekly and monthly token limits, replenishment, usage, remaining amount and ratio, reset times, today’s calls and remaining calls, and the date it becomes usable again. Costs neither tokens nor a daily call and works while paused | TrialAPI key | no scopetoken metering status |
Select a tool name or Details: The dialog shows the basic call, every MCP argument and internal-parameter mapping, final MCP response, internal request, returned result, and advanced composite example without collapsed or truncated sections.
Additional contracts: search_foods_by_nutrient_range is currently unavailable. Calls do not reach an internal API and return ADDITIONAL_CONTRACT_REQUIRED.
FO, shared across ingredients, foods, and products. It uniquely identifies common and regional dishes, convenience and processed products, restaurant foods, and alcoholic beverages without duplication or reuse—Japan's only unified IMD identifier of this kind.Start public. Try advanced search with a trial. Continue with an API key.
Three access conditions use two MCP URLs. Trial and standard API keys share the authenticated URL; key type, scopes, and limits determine the available features.
Public endpoint
NO AUTHhttps://mcp.fdb.software/mcp/food/public- Name search, food summary, ingredient candidates, and term suggestions
- Name and ingredient searches return at most 10 records per call and can access only result positions 0–49
- Adaptive fair-use controls help preserve a fair environment for all users
- Tool-call volume, search terms and OIDs, page walking, and requested record counts are evaluated together and may trigger a temporary block
- A limited request receives HTTP
429,Retry-After, andX-Foodsearch-Fair-Use - IP address alone is never the blocking key. Public access is for interactive trials, not automated or exhaustive collection
Trial / API-key endpoint
OAUTH / BEARERhttps://mcp.fdb.software/mcp/food- OAuth 2.1 for ChatGPT; fixed Bearer remains available to compatible clients
- An instant trial provides 10 tool calls today, up to five foods per response, and up to 12 tools
- A standard API key provides up to 12 tools and up to 500 search results, subject to scope
- Per-key RPM and daily limits use Japan Standard Time
- The full ingredient composition, exact amounts, weights and ratios, popularity scores, and taste-point values are not disclosed; rounded approximate amounts for the top three ingredients are returned only on request
Make “under X kcal” or “under Y g carbohydrate” a database condition
With trial or standard API-key access and food:advanced, the AI converts natural language into typed filters. Nutrient ranges, manufacturer, category, ingredients, newly registered foods, and wholesale-cost-index order are supported. For a request such as “highest in calcium,” rank_by_nutrient accepts a Japanese nutrient name and resolves the current identifier and unit. recent_days=365 can express a one-year “recent” window. For an English request, the MCP instructions tell the AI to create a natural Japanese food query, request i18n_name_en, and cross-check the stored English name against the Japanese name. An automatically issued trial returns at most five foods per response, so use limit 5 or less in the examples below.

“Find gyudon under 200 kcal, lowest first.”
stuff_e · maximum 200
Name and nutrient conditions are applied together.
foods[] · returned_count · request_id
{
"name": "search_foods_advanced",
"arguments": {
"query": "牛丼",
"limit": 20,
"nutrient_filters": [
{ "nutrient_code": "stuff_e", "maximum": 200 }
],
"sort": { "field_code": "stuff_e", "direction": "asc" },
"response_fields": ["stuff_e"]
}
}{
"query": "牛丼",
"returned_count": 20,
"filters_applied_upstream": true,
"foods": [
{ "objectid": "FO…", "name": "…", …, "fields": { "stuff_e": 38 } }
],
"request_id": "…"
}{
"name": "search_foods_advanced",
"arguments": {
"query": "コンビニ パスタ",
"match": "and",
"recent_days": 365,
"rank_by_cost": { "direction": "asc" },
"limit": 10
}
}{
"returned_count": 10,
"foods": [{
"objectid": "FO…",
"name": "…",
"fields": { "wholesale_cost_index": 396.4 }
}],
"cost_ranking": {
"identifier": "wholesale_cost_index",
"unit": "指数",
"absolute_value": false,
"direction": "asc"
},
"cost_processing": {
"as_of": "2026-09-22",
"calculation_basis": "recipe_ingredients_public_wholesale_market_price_sum"
}
}materialcost identifier was retired in 2.12.0.Find similar foods, then refine by taste and color
With trial or standard API-key access and food:advanced, a shared composition-match food OID connects comparable dishes and products. You can combine that discovery flow with relative taste strength, primary or secondary colors, and an explicit release-date window. With a trial key, use limit 5 or less and a source_result_index of 0–4.
noename_broadcat), composition-match food OID (noeoid_broadcat), and composition-match abstract name (noeobj_broadcat). Technical response keys such as parent_menu remain unchanged for compatibility with existing clients.From a food or product name
query searches source candidates, then resolves the selected record's composition-match food OID and abstract name. Space-separated terms support AND or OR matching.
“Find ten products similar to シングルモルト.”
find_similar_foods(query="シングルモルト")From a known OID
A known OID goes directly to detail resolution, avoiding ambiguity among records with similar names.
“Find foods similar to this OID.”
find_similar_foods(objectid="FO…")From a composition-match abstract name
parent_keyword searches composition-match food candidates directly. Inspect resolution_candidates and choose the intended source_result_index.
“Something like gyudon, using egg and chicken.”
parent_keyword="丼" → select 親子丼{
"name": "find_similar_foods",
"arguments": {
"query": "シングルモルト",
"source_result_index": 0,
"start": 0,
"limit": 10,
"exclude_source": true
}
}{
"source": {"objectid":"FO…","name":"…","yomi":"…"},
"parent_menu": {"objectid":"FO…","name":"ウイスキー"},
"similarity_basis": "same_parent_menu",
"ordering": {"type":"popularity_desc","score_disclosed":false},
"foods": [{"objectid":"FO…","name":"…"}],
"request_id": "…"
}Taste uses v2 identifiers (taste2_) Ratio indicators reflect the proportion of ingredients with a taste characteristic within the whole composition; multiplication indicators reflect the amount of those ingredients. Use taste2_ratio_SPICY for a spiciness-proportion ranking or taste2_multiply_SPICY for an amount-based ranking. Read each item’s description and compare foods using the same identifier, not ratio and multiplication points on a shared scale. Data is being updated progressively: missing v2 data is not zero and is not replaced with older values. Point values and exact ingredient quantities or mixing ratios are not disclosed.
Spicier first or stronger sweetness first
Use a taste2_ identifier in taste_filters or taste_sort. Zero means the taste is absent and positive values support relative comparison, but the point values themselves are never returned.
“Five gyudon products released since June 2026, spiciest first.”
release_date_from + taste_sortFilter by primary or supporting colors
colorcode contains up to three #ffffff codes. The first is primary, the second and third are supporting colors, and three identical codes mean a single-color record.
“Gyudon-related products whose primary color is red.”
color_filter.match="primary"Where each filter runs
Nutrient and taste conditions run in the internal search. Color and release-date matching are applied exactly within the first 500 upstream candidates after any color-presence filter. A field the search index does not carry is supplemented per candidate from the detail data (search_supplement, filters_applied_upstream=false); no current field needs it.
Search-only values remain confidential
point_values_disclosed=false{
"name": "search_foods_advanced",
"arguments": {
"query": "牛丼",
"limit": 5,
"release_date_from": "2026-06-01",
"taste_filters": [{
"nutrient_code": "taste2_ratio_SPICY",
"existence": "present"
}],
"taste_sort": {
"field_code": "taste2_ratio_SPICY",
"direction": "desc"
}
}
}{
"name": "search_foods_advanced",
"arguments": {
"query": "牛丼",
"limit": 10,
"color_filter": {
"colors": ["#d74734"],
"match": "primary",
"mode": "include"
}
}
}How to ask: You can simply say “similar dish,” “similar product,” “spiciest first,” or “use red as the primary color.” The AI can select the tool and arguments from their descriptions and schemas. To combine similarity with ingredient constraints, use find_similar_foods and find_foods_by_ingredient_advanced in sequence.
Add food search to your AI in three steps
The public Food Search endpoint needs no Food Search API key or Food Search user registration. Your ChatGPT or Gemini account, eligible plan, and organization policy are separate requirements.
Open the server screen
Use ChatGPT Developer mode, Gemini Connected Apps / Gemini CLI, or a Claude custom connector.
Register the URL
Enter the complete HTTPS endpoint and leave credentials empty.
Search and verify
Call search_foods and confirm both food data and request_id.
Food Search (Public)Streamable HTTPhttps://mcp.fdb.software/mcp/food/publicNone / No credentialsOpen the custom MCP registration screen
Menu names and eligibility can change as each client updates its interface.
GPTChatGPT Work
- Open Settings.
- Choose Security and login.
- Turn on Developer mode.
- Open ChatGPT Plugins and choose the plus button.
Developer mode may be hidden by account or workspace policy.
GGemini Spark
- Open gemini.google.com on a computer.
- Go to Settings & help → Connected Apps.
- If shown, pass through Personal Intelligence.
- Choose Custom apps for Spark → Add a custom app.
Eligibility may be limited by region, age, account type, language, Keep Activity, and Spark access.
Register the public endpoint
Include the final /mcp/food/public. Do not add an API key, OAuth client, or Authorization header.
GPTChatGPT settings
Food Search (Public)Search Japanese foods, food summaries, composition-table ingredients, and food-term suggestionshttps://mcp.fdb.software/mcp/food/publicNoneChoose Create, then confirm the four detected tools: search_foods, get_food_summary, search_ingredients, and suggest_food_terms.
GGemini settings
https://mcp.fdb.software/mcp/food/publicLeave emptyChoose Next, follow the prompts, and confirm the connected app and its four tools.
gemini mcp add --scope user --transport http \
food-search-public \
https://mcp.fdb.software/mcp/food/public
gemini mcp listCClaude and other MCP clients
Settings › Connectors › Add custom connectorhttps://mcp.fdb.software/mcp/food/publicNoneWhether you can add a custom connector depends on your Claude plan and organization settings. Other clients: register the same URL as a Streamable HTTP remote MCP server without credentials.
claude mcp add --transport http food-search-public \
https://mcp.fdb.software/mcp/food/public
claude mcp listSearch for “bread” and check the result
Mention the connected app when needed and state the search and output fields explicitly.
GPTChatGPT Work
“Using @Food Search, AND-search for パン, include recent products, and show the top two results in a table with name, OID, manufacturer, release date, and major nutrients.”
- Install or enable the plugin created in the previous step.
- Switch to a Work chat if required.
- Select the app with
@. - Confirm the food records and
request_id.
GGemini Spark
Use the same prompt, selecting the connected Food Search app with @.- Open a new Spark chat.
- Select the connected app.
- Specify the conditions and requested columns.
- Confirm the returned records and
request_id.
Do not put secret values or unnecessary personal data in the prompt.
{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "search_foods",
"arguments": {
"query": "パン",
"match": "and",
"start": 0,
"limit": 2,
"include_new": true
}
}
}{
"result": {
"content": [{
"type": "text",
"text": "2件の食品候補を取得しました。\\n\\nMCP結果(JSON):\\n{...food data...}"
}],
"structuredContent": {
"query": "パン",
"returned_count": 2,
"foods": [{
"objectid": "FO…",
"name": "…",
"manufacturer": "…",
"specified_nutrition": {
"energy_kcal": 249,
"protein_g": 6.6
}
}],
"request_id": "…"
}
}
}Once you have an API keyconnect the advanced endpoint
This continues the public three-step setup. ChatGPT Work uses the OAuth 2.1 connection flow; clients that support a fixed header can use HTTP Authorization. Your scopes determine which tools are exposed, up to 12 (11 food tools plus get_token_usage).
Food Search verifies your existing key on its own authorization page and gives ChatGPT an OAuth access token valid for one hour instead of the static key. A rotating refresh token remains valid for up to 30 days, so supported clients normally renew access automatically. Both lifetimes are shortened if the original API key expires sooner.
Available nowGemini normally registers itself through Dynamic Client Registration when you enter the MCP URL. If it requests a Client ID and Client Secret, use separate OAuth client credentials issued by the Food Search administrator. Never substitute the Food Search API key.
Available nowThe CLI supports an HTTP --header and can connect to the API-key endpoint now. A safer input example follows.
In Claude (claude.ai, desktop, and Claude Code), register https://mcp.fdb.software/mcp/food and the Food Search authorization page opens (Client ID Metadata Document / dynamic client registration); enter the API key only there. In Claude Code, add it with claude mcp add --transport http food-search https://mcp.fdb.software/mcp/food and authenticate from /mcp. Clients that support a fixed header can also use Authorization: Bearer.
Food Search (API key)Streamable HTTPhttps://mcp.fdb.software/mcp/foodChatGPT: OAuth 2.1 / direct: BearerNever paste it into a ChatGPT prompt, URL, name, description, screenshot, Git repository, or support message. Ask the administrator to revoke and reissue it if exposure is suspected.
Check what was issued
Confirm the identity and limits before entering the secret.
Shown once at issue time. Store it in an approved secret location.
Confirm required scopes such as food:advanced.
Check start, end, and renewal arrangements.
Paid, paid period expired, or unpaid.
Check the applicable daily and request-rate limits.
After connection, tools/list shows only the tools allowed by that key's scopes and upstream contract. “Up to 12” does not mean every key receives all 12; the add-on tool search_foods_by_nutrient_range may be listed but cannot run yet.
Configure authentication in the client
Keep the key out of the conversation and use a supported authentication channel.
- Register the URL above as an authenticated MCP server and choose Connect
- Enter the issued API key only on the Food Search authorization page that opens
- Review the client name and requested scopes, then choose Authorize (only the requested scopes that the key holds are granted)
- Back in ChatGPT, confirm the tools detected for the key's scopes
OAuth 2.1 is available: the flow uses authorization code + PKCE (S256), Client ID Metadata Documents (CIMD, preferred by ChatGPT and others) and dynamic client registration, one-hour access tokens, and rotating refresh tokens. The static API key is never sent to ChatGPT.
Read OpenAI's authentication specification ↗https://mcp.fdb.software/mcp/foodAuthorizationBearer ••••••••••••••••In Spark Web, first try the MCP URL alone so Gemini can register through DCR. If the screen requires an OAuth Client ID and Client Secret, enter OAuth client credentials issued separately by the Food Search administrator. Enter the Food Search API key only on the Food Search authorization page that opens after connecting.Bearer access remains available when a fixed Authorization header is explicitly supported and in Gemini CLI.
read -rsp "Food Search API key: " FOODSEARCH_MCP_API_KEY
printf '\n'
gemini mcp add --scope user --transport http \
--header "Authorization: Bearer $FOODSEARCH_MCP_API_KEY" \
food-search-key \
https://mcp.fdb.software/mcp/food
unset FOODSEARCH_MCP_API_KEY
gemini mcp listThis keeps the literal key out of the shell command history. The expanded header is then stored in ~/.gemini/settings.json; do not share that file and keep it readable only by its owner.
Call an advanced search and verify access
From ChatGPT Work, Gemini CLI, or another supported client, try one tool that requires an API-key scope.
“Using the API-key edition's search_foods_advanced, find the ten most calcium-rich recent convenience-store products. Show name, OID, manufacturer, release date, weight, and calcium.”
What to check
The connection works when tools/list contains the intended tool and the call returns food candidates plus a request_id.
search_foodsget_food_detailcompare_foodssearch_foods_advancedfind_similar_foods…up to 12 by scopeA tool outside the key’s scopes is not listed in tools/list; calling it returns the JSON-RPC error “Tool … not found”. No HTTP 403 is returned.
Authorization: Bearer <YOUR_FOOD_SEARCH_API_KEY>
{
"jsonrpc": "2.0",
"id": 8,
"method": "tools/call",
"params": {
"name": "search_foods_advanced",
"arguments": {
"query": "コンビニ",
"limit": 10,
"rank_by_nutrient": {
"nutrient": "カルシウム",
"direction": "desc"
},
"recent_days": 365
}
}
}The administrator can later change scopes, validity, billing state, enablement, and limits. For support, send the key label, key ID, time, and request_id—never the full secret.
Turn search results into comparison, organization, and explanation
MCP supplies structured evidence. The AI client can normalize serving bases, calculate differences from returned values, write a report, or turn findings into a visual—subject to the client's capabilities.
Compare records with the same name
Find OIDs, then align serving basis and nutrients.
“Find three firm tofu records and compare energy and protein.”
- Search by name
- Compare OIDs
- Difference table
search_foods → compare_foodsChoose from foods under 200 kcal
Apply the limit during the database search, then sort and summarize.
“Find five gyudon records at or below 200 kcal.”
- kcal limit
- Sort ascending
- Table + notes
search_foods_advanced → AI tableTrace dishes from an ingredient
Resolve an ingredient OID, then reverse-search foods that contain it.
“Find dishes containing onion that meet my salt condition.”
- Ingredient OID
- Filtered reverse search
- Candidates
search_ingredients → find_foods_by_ingredient_advancedRead differences between similar foods
Compare ingredient OID presence across complete ingredient sets internally. If they differ, return only the top three differing ingredients by internal weight for each food; weights and ratios are not used to decide the differences.
“Compare nutrients and ingredient differences for these three foods.”
- All ingredients
- ≤3 differences
- Explain
compare_foodsNormalize multiple themes
Search several terms and bring manufacturer, date, and nutrition into common columns.
“Search tofu, natto, and soy milk, five each.” (API key; a trial key shares five foods in total)
- Batch search
- Align columns
- Cross-table
batch_search_foods → AI cross-tableExplore a narrow market
Combine name, nutrient range, manufacturer, and category conditions.
“Map high-protein products under 200 kcal by size and maker.”
- Combined filters
- Distribution
- Hypothesis
search_foods_advanced → AI distributionCompare new and existing products
Include newly registered records and align date, serving basis, and nutrients.
“Compare recent soy products with established alternatives.”
- Include new
- Same axis
- Planning memo
search_foods_advanced → compare_foodsTurn analysis into a useful format
The AI client can use MCP evidence to draft charts, webpages, illustration briefs, or video structures.
“Turn this comparison into an executive webpage and a 30-second video outline.”
- Evidence
- Web / chart
- Video outline
structuredContent → AI client outputRank recent products by the wholesale cost index
Narrow candidates by name and release window, then rank the foods that have an index from low to high or high to low. compare_foods shows index differences across OIDs and get_food_detail returns about four weeks of daily history. The index is not an absolute amount.
“Show me 10 recently released convenience-store pasta products, lowest wholesale cost index first.”
- Narrow candidates
- Rank by index
- Trend + rank
search_foods_advanced / rank_by_costRank by official label values only, with estimates shown apart
With official_values_only=true, only foods whose ranking nutrient is an official label value (the product’s published nutrition facts) are ranked. Estimated candidates can be shown separately: values not listed in official_value_fields, returned with include_value_sources=true, are IMD estimates.
“Rank convenience-store salad chicken by official protein values only, highest first. Show estimated values separately.”
- Official values only
- Sort descending
- Official vs estimated
search_foods_advanced / official_values_only + include_value_sourcesGrasp a dish through its main ingredients’ approximate amounts
With include_ingredient_amounts=true, the top three ingredients by amount (water excluded) carry an approximate amount per food unit, approx_amount_g. The values are rounded by the IMD food database to protect intellectual property—kept as is below 1 g, in 2 g steps from 1 g to under 10 g, 10 g steps from 10 g to under 100 g, and 50 g steps from 100 g. For example, “150” means about 150 g and “30” about 30 g; the actual amounts can differ by about one step, so do not treat their sum or ratio as an exact recipe. Each amount costs a standard 20 tokens (up to 60 per food), so request it only when needed.
“Show the top three main ingredients of this beef stew with approximate amounts.”
- Find the food
- Top 3 + approx. g
- Explain the makeup
get_food_detail / include_ingredient_amountsExamples observed through the public MCP
These are excerpts from real public search_foods calls—not invented demonstration records.
Firm tofu (one 150 g serving)
Other 150 g and 200 g candidates were returned in the same response.
OID: FOd5c4d1bb498bc09e0c0be3ceCurry rice with beef and vegetables
A smaller 235 g candidate was also returned.
My Protein Bar, vanilla flavor
Three candidates were returned in the same structure.
Understand the evidence and the cautions before use
Published values, theoretical estimates, human checking, and internal audit are kept conceptually distinct so AI can explain the basis of a result.
How data reaches AI
Nutrient fields and identifiers
Use the same Food Search API identifier in MCP arguments such as nutrient_code, field_code, and response_fields. Search each field by its name, meaning, unit, or category.
| Name | Description | identifier | Unit | Category | category_key |
|---|
No matching fields.
Loading the current public identifier catalog.
Natural language becomes JSON; JSON returns to conversation
The client reads tool schemas, turns intent into a JSON-RPC tools/call, and formats the server's text plus structuredContent.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list",
"params": {}
}{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "get_food_summary",
"arguments": {
"objectid": "FOd5c4d1bb498bc09e0c0be3ce"
}
}
}{
"content": [{
"type": "text",
"text": "食品概要を取得しました。\n\nMCP結果(JSON):\n{...}"
}],
"structuredContent": {
"food": {
"objectid": "FOd5c4d1bb498bc09e0c0be3ce",
"name": "木綿豆腐(1個150g)",
"unit_g": 150
},
"request_id": "…"
}
}HTTP 429 (connection-level error)
{
"error": {
"code": "RATE_LIMITED",
"message": "要求回数の上限を超えました。",
"retryable": true
},
"request_id": "…"
}
Tool error (HTTP 200)
{
"isError": true,
"content": [{ "type": "text", "text": "TOKEN_EXHAUSTED: …" }],
"structuredContent": {
"error": { "code": "TOKEN_EXHAUSTED", "message": "…", "retryable": true },
"request_id": "…"
}
}structuredContent against your application types, retain request_id for support, and treat an upstream error as an error—not as zero results.Reference: understand response fields and status codes
Keep null distinct from numeric zero, a valid empty result distinct from a service failure, and a summary distinct from major-ingredient references.
objectidA 26-character OID beginning with FO, shared across ingredients, foods, and products.
specified_nutritionMajor nutrients (energy, protein, fat, carbohydrates, dietary fiber, salt equivalent, sodium). Whether each value is an official label value or an estimate (theoretical value) is shown by official_value_fields with include_value_sources=true.
major_ingredientsUp to three major ingredients by amount (OID and name). Only with include_ingredient_amounts=true do the top three, water excluded, carry a rounded approximate amount per food unit, approx_amount_g (as is below 1 g; 2 g steps below 10 g; 10 g steps below 100 g; 50 g steps from 100 g).
ingredient_amounts_disclosedAlways false: exact ingredient amounts, weights, and ratios are not disclosed. It stays false even when approx_amount_g is returned.
official_value_fieldsNames of the returned values that are official label values (for example energy_kcal); other nutrient values are IMD estimates. Returned only with include_value_sources=true.
request_idIdentifier used to match a report with server logs.
item_countMatching count. When conditions are checked inside the MCP (wholesale cost index, color, release date, search supplement), it is the number of matches among the upstream candidates (up to 500).
returned_countNumber of records included in this response.
filters_applied_upstreamTrue when every nutrient condition was applied in the upstream search; false when the MCP supplemented a field missing from the search index and filtered locally (search_supplement is added). Local cost-index, color, and date matching leave it true.
cachehit / miss / mixed (several lookups with different cache use). It does not indicate whether a result is correct.
nullUnknown or unavailable; it is not numeric zero.
Errors arrive in three forms. An HTTP error means the MCP connection itself failed. A tool error keeps HTTP 200 and carries isError: true, structuredContent.error.code, and request_id. A JSON-RPC error means the tool name or argument types do not match the schema. A missing scope or add-on contract never returns HTTP 403.
| Code / symptom | Meaning | What to do |
|---|---|---|
| HTTP 404 / 405 (GET) | Wrong URL or direct browser navigation | Register the complete URL in an MCP client |
HTTP 401 UNAUTHENTICATED | Missing, invalid, or expired API key | Check the Bearer format and key status |
| HTTP 413 | Request body larger than 256 KiB | Send fewer terms, OIDs, or conditions |
HTTP 429 RATE_LIMITED | Public fair-use control, RPM, or JST daily limit reached | Stop until Retry-After, then reduce concurrency and page walking |
HTTP 503 UPSTREAM_UNAVAILABLE | Service paused by the administrator, public access paused, or a restart / temporary failure | Check the service status on the top page and retry later without flooding |
| HTTP 502 / 504 | Temporary gateway or upstream problem | Wait briefly and retry |
Tool error ADDITIONAL_CONTRACT_REQUIRED | A separate contract is required and the tool is currently unavailable | Contact IMD and use an available alternative where possible |
Tool error TOKEN_EXHAUSTED | This week's or month's token balance is zero or below | Check the balance and reset date with get_token_usage or token usage, then replenish or wait |
Tool error INVALID_ARGUMENT | Invalid combination or range (for example a batch total over the cap, or a release-date condition on the ingredient search) | Correct the arguments as the message says |
Tool error DETAIL_ONLY_FIELD | A field missing from the upstream search index was used in priority_slots | Read it with get_food_detail response_fields, or use nutrient_filters / sort |
Tool error NOT_FOUND | The source food for a similar-food search was not found | Check the source name or OID |
Tool error FORBIDDEN | include_new=false on the public endpoint | The public edition cannot exclude new products; use an API key |
Tool error UPSTREAM_* | Upstream communication or response problem | Do not treat it as zero results; keep the request ID and contact support |
| JSON-RPC -32602 “Tool … not found” | A tool outside the key's scopes (not shown in tools/list) | Confirm the required scope with IMD |
| Tool result “Input validation error: …” | An argument type or format does not match the schema; no error.code or request_id | Fix the argument named in the message |
Frequently asked questions
Why use Food Search MCP instead of a general AI alone?
A general AI can be wrong when its evidence is wrong or ambiguous. Food Search MCP supplies structured IMD food data with OID, serving basis, retrieval context, and request ID. This improves grounding and verification but does not unconditionally guarantee the AI's final answer.
How can it provide nutrients that are not printed on the package?
IMD builds a proprietary ingredient composition supervised by dedicated registered dietitians, recreates the food with ingredients aligned to Japan's Standard Tables of Food Composition, tunes it close to published values, and calculates unlisted fields as theoretical estimates.
Are nutrient values measured or estimated?
Both kinds are stored distinctly. Published manufacturer or restaurant fields are recorded as published values; unlisted fields calculated from the recipe model are theoretical estimates, not direct measurements.
Can I use it without nutrition or programming expertise?
Yes. Describe your purpose in ordinary language and a compatible AI client can select available tools and arguments. Final medical or professional dietary decisions still require a qualified professional.
Can I use the public endpoint without authentication?
Yes. Register the public Streamable HTTP URL without Food Search credentials. It is intended for normal interactive trials. Adaptive fair-use controls evaluate MCP call volume, changing search terms and OIDs, page walking, and requested record counts together; an IP address alone is never the blocking key. Do not use public access for automated, exhaustive, scraping, or continuous batch collection; request an API key for sustained or larger-volume use. Continuous availability and commercial requirements are not guaranteed by public access.
What is an instantly issued trial API key?
It lets you try advanced authenticated search features for the current Japan Standard Time day without an application form or email verification. An automatically issued trial allows ten MCP tools/call requests per day and at most five foods or products in one response. Initialization and tools/list do not consume those ten calls.
Can I issue the trial key again?
Issuance is limited to once per JST day for each IPv4 address or IPv6 /64 prefix. This browser stores the complete key and issuance fact in localStorage for the day, so it shows the same key after a network change. If site data is cleared, the server cannot reveal the complete key again and the same network cannot reissue it that day. Clear site data after use on a shared device.
What is adaptive fair-use control?
It helps keep public access fair for many users by evaluating MCP call volume, successive search terms and OIDs, page walking through increasing start values, requested record counts, and other retrieval patterns together. If activity exceeds normal interactive use, it may be blocked temporarily. A limited request receives HTTP 429, a Retry-After header showing how many seconds to wait, and an X-Foodsearch-Fair-Use header showing the fair-use decision. Stop requests for the indicated period, then reduce concurrency, page walking, and requested volume.
What are the public start and limit restrictions?
start is the zero-based result position and limit is the number of records returned from that position. Public/free search_foods allows at most 10 records per call and can access only positions 0–49. For example, start=20, limit=10 returns up to 10 records, start=45, limit=10 is truncated to five, and start=50 or greater returns a valid empty result. search_ingredients uses the same start and limit rules: at most 10 records per call within positions 0–49. get_food_summary retrieves one explicitly supplied OID and has no limit argument. The internal search API and API-key searches allow up to 500 records per call.
Can MCP search all 400,000 records?
400,000+ describes the underlying IMD database. Actual results vary by query, tool, access mode, contract scope, and update state. It is not a guarantee that every underlying field or record is retrievable through one MCP contract.
What is an OID?
OID means Object ID: a 26-character identifier beginning with FO, shared across ingredients, foods, and products. It uniquely identifies common and regional dishes, convenience and processed products, restaurant foods, and alcoholic beverages without duplication or reuse. Pass the same OID from search to detail or comparison.
Are ingredient-composition amounts available?
Only approximate amounts for the main ingredients, and only on request. With a trial or API key, set include_ingredient_amounts=true on get_food_detail or compare_foods to receive approx_amount_g (grams per food unit) for the top three ingredients by amount, water excluded. The values are rounded by the IMD food database to protect intellectual property—kept as is below 1 g, in 2 g steps from 1 g to under 10 g, 10 g steps from 10 g to under 100 g, and 50 g steps from 100 g. For example, “150” means about 150 g and “30” about 30 g; the actual amounts can differ by about one step, so do not treat their sum or ratio as an exact recipe. Each amount costs a standard 20 tokens (up to 60 per food), so request it only when needed. The full composition, the ingredient count, exact amounts, weights and ratios, ingredients below the top three, and water amounts are not provided through public, trial, or API-key access. Amounts are withheld to protect intellectual property, not because the values lack a basis: nutrient values are estimates calculated from recipes supervised by IMD’s dedicated registered dietitians on ingredient compositions that follow the Standard Tables of Food Composition in Japan (8th revised edition), or the product’s official label values. compare_foods still decides ingredient differences by OID presence only, without comparing amounts or ratios.
Can I search or compare by ingredient cost?
Not as a cost figure. Instead, with API-key access, set rank_by_cost in search_foods_advanced to rank by the wholesale cost index (wholesale_cost_index), compare index values across OIDs with compare_foods, and read the basis date plus about four weeks of daily history from get_food_detail. The wholesale cost index decomposes a food into its recipe ingredients and sums each ingredient’s public wholesale market price, pro-rated by amount; the upstream API computes it at request time for the JST run date. Only public wholesale market prices are referenced, and off-market periods (for example a summer ingredient in winter) carry the last traded price forward. It is a relative index for observing how the value moves over time—not an absolute amount, and not actual manufacturing cost, cost of goods sold, retail price, or profit. It excludes cooking, labor, product planning and manufacturing, movement and logistics, sales, promotion and advertising, returns, disposal, and other real-world costs. Records without an index are excluded from ranking. The former materialcost identifier was retired.
Can I search in English?
Yes. For an English request, the MCP instructions tell the AI to convert food terms into a natural Japanese search query, request i18n_name_en, and cross-check that stored English name against the Japanese name. Requesting i18n_name_en needs trial or API-key access; the public edition returns Japanese names only. If AI supplies its own fallback translation, it should label that separately from the database's English name.
Can it find a similar dish or product?
Yes. With API-key access and food:advanced, find_similar_foods resolves a composition-match food OID from a name, known OID, or composition-match abstract name, then returns foods and products sharing that OID in popularity order. The order is preserved but popularity scores are never returned. If the source search is ambiguous, inspect resolution_candidates and set source_result_index.
Can it filter by taste or color?
Yes, in search_foods_advanced and find_foods_by_ingredient_advanced. A taste2_ identifier supports relative filtering or sorting, such as spicier first, but taste-point values are never returned. colorcode stores up to three colors: the first is primary, the second and third are supporting colors, and three identical colors indicate a single-color record. Exact color and release-date matching is bounded to at most 500 upstream candidates.
Can it filter for “under 200 kcal”?
Yes, with API-key access and the food:advanced scope. Set a maximum for stuff_e in search_foods_advanced.nutrient_filters. The public search_foods tool remains a name and keyword search.
Why does a tool return ADDITIONAL_CONTRACT_REQUIRED?
search_foods_by_nutrient_range needs a DB-API add-on contract. It is currently unavailable and does not send a request to an internal API.
Does it provide allergen information?
No. IMD collects related information, but product-specific manufacturing and cross-contact conditions can have life-critical consequences, so allergen information is not generally provided through this MCP.
May I use a nutrient value as the sole basis for a decision?
No. Keep the serving basis, value type, and retrieval time with the number, check the latest product label, and do not use the MCP as the final authority for diagnosis, treatment, medication, or safe-consumption decisions.
Where do I ask about API keys, pricing, or SLA?
Use the IMD inquiry form and include organization, use case, required scope, estimated volume, period, and service requirements. Food Search MCP terms and direct IMD API terms are separate.
Why does opening the MCP URL in a browser not show a search screen?
The endpoint is not a webpage. Register it in an MCP-compatible AI client and perform searches from that client.
How do I distinguish zero results from a failure?
A valid empty response has returned_count: 0. An upstream failure has an explicit error such as UPSTREAM_TIMEOUT, a retry indicator, and a request ID.
Why can I not see detail and comparison tools on public access?
That is expected. Apply for API-key access and the necessary scopes such as food:detail or food:recipe.
Can I search by JAN code?
No. JAN search and JAN-related response fields are intentionally excluded because convenience-store product coverage does not follow that operating model.
Why do I keep receiving 429?
The adaptive fair-use control detected a retrieval pattern beyond normal interactive use—based on MCP call volume, successive search terms or OIDs, page walking, requested record counts, and related signals—or the service-wide emergency capacity limit was reached. The response includes HTTP 429, Retry-After, and X-Foodsearch-Fair-Use. Stop requests for the indicated period, then reduce concurrency, page walking, and requested volume. The decision is not based on IP address alone. Apply for an API key for sustained, scheduled, or larger-volume use.
Are images available?
Product images require applications to and permission from the relevant rights holders and neighboring rights holders, so we understand that they cannot be used as part of this service. However, the IMD Food Database assigns every OID a composition-match food OID and composition-match abstract name using a method distinct from ordinary categories. We believe that abstract images for those composition-match foods could in future serve as useful references. Please contact us if you are interested.
Why is the response slow or the server unreachable?
We have not observed such a condition while preparing this FAQ. This MCP server runs on a Sakura Internet VPS, and IMD also monitors its availability independently from outside the server. If load increases substantially, we will consider adding capacity or restricting heavy users. To keep public access available, we may also need to limit free access or reduce its service level, so please use the public service efficiently, reasonably, and with restraint. Organizations requiring an SLA should contact IMD. A paid, dedicated VPS for your organization can also be considered. Please note that applications—particularly from entities that are not Japanese corporations—are subject to review.
What if my API key may have leaked?
Immediately request disablement or deletion through the inquiry form. Never paste the complete key into the message.
Contact us with reproducible details
For Food Search MCP questions or API-key applications, use the IMD inquiry form. To check an application or contract you have already made, see Application and contract status (Japanese).
Open the inquiry form →Do not send a complete key, Authorization header, or cookie

Issue a trial API key instantly
Try API-key features beyond public access without an application form. The key is valid only for the current Japan Standard Time day and can be issued once per IPv4 address or IPv6 /64 prefix.
Today’s trial key
Issue immediately for this network. No email registration is required.
Not issued yet
Issue on this page
One issuance per JST day for each IPv4 address or assigned IPv6 /64 prefix.
Stored in this browser
The key and issuance fact are kept in localStorage. Even on another network, this browser shows the same key instead of requesting another.
Connect your AI client
Use https://mcp.fdb.software/mcp/food. ChatGPT uses OAuth; compatible clients may use Bearer.
ChatGPT Work
Register https://mcp.fdb.software/mcp/food, begin OAuth, and enter the issued trial API key on the Food Search authorization screen.
Gemini / Bearer clients
Register the same MCP URL and use the trial key as the Authorization Bearer token. OAuth can also be used where supported.
Check the token usage of an API key
Enter a trial or standard API key to see this week’s and this month’s available ratio, usage, remaining ratio with reset dates, and the key’s expiry. The key is sent directly from this browser to this site, never placed in a URL, and never stored. For API keys issued through an application, the status page (in Japanese) also shows the plan, key state, billing state, and today’s calls, using the receipt number or the API key together with the application e-mail address.
Application and contract status (Japanese) →The key is stored only in this browser for this site origin. Clear site data after use on a shared device. Issuance source and usage are logged for abuse prevention and operations.