FOOD SEARCH FOR AI

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.

✓ Public access needs no Food Search API key✓ HTTPS only✓ Products, restaurant meals, and everyday dishes
A female guide bringing foods and nutrition data into an AI space
MCP / SEARCH_FOODS● ● ●
“Rank 10 convenience-store pasta products by vegetable content.”
AI client
→
Food Search MCP
→
IMD data
name · OID · manufacturer · nutrition · request_id

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.

01 / ASKYou ask

State the food, purpose, and comparison criteria.

02 / SELECTAI selects a tool

The tool name and typed arguments are chosen.

03 / SEARCHMCP queries IMD

Products and dishes are retrieved in one structure.

04 / ANSWERAI explains

The result becomes a table, chart, or narrative.

WHY FOOD SEARCH MCP

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 THE DATA IS MADE

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.

A registered dietitian explaining how food records are prepared
01 / SOURCEPublished data

Check official labels, product data, and images.

02 / RECIPERecipe model

Dedicated dietitians supervise the composition.

03 / STANDARDStandard ingredients

Use ingredients mapped to Japan's food tables.

04 / EMULATEDigital cooking

Reproduce the food and tune it toward label values.

05 / CALCULATETheoretical values

Calculate nutrients that are not published.

06 / DELIVERCheck and structure

Human checking, internal audit, and MCP delivery.

PUBLISHED VALUESNutrients published by a manufacturer or restaurant

When an official value is available, IMD records that published value.

THEORETICAL VALUESNutrients not published by the source

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 ↗

A registered dietitian delighted by an enormous field of dishes, products, and nutrition data
Wow!
POWERED BY IMD FOOD DATABASE

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.

OID is the shared identifier across food typesA 26-character value beginning with FO uniquely identifies ingredients, common and regional dishes, products, restaurant foods, and alcoholic beverages.
400,000+Food and dish records in the underlying IMD database
3 domainsRetail products, restaurant menus, and everyday dishes
320+Nutrient, taste, and related fields handled by the database
12 toolsSearch, similarity, detail, comparison, batch, and token usage
These figures describe the underlying database. Returned fields and records vary by tool, access mode, contract scope, and query.IMD overview ↗
FIND YOUR USE CASE

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.

FOR DAILY MEALS

Meals and nutrition tracking

Find foods by name and compare energy, protein, fat, carbohydrates, fiber, and salt on the recorded serving basis.

“Find gyudon records at or below 200 kcal and list name, OID, serving basis, and kcal from lowest to highest.”
Advanced filters need an API key
FOR WELLNESS

Wellness support

Compare fields such as salt equivalent or dietary fiber across products and everyday dishes.

“Find curry rice records and compare their serving size and salt equivalent.”
Try with public access
FOR DEVELOPERS

Food and health applications

Use the standard MCP SDK or JSON-RPC, keep OIDs as stable identifiers, and validate structuredContent before application use.

Public prototype → scoped API key for detail, comparison, and batch operations.
Expand with API-key access
FOR PRODUCTS & SERVICES

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 requirements
FOR MAKERS & RESEARCH

Product planning, marketing, and research

Combine product themes, manufacturers, launch dates, serving sizes, and nutrient ranges to explore niche categories and competitive positioning.

“Map high-protein, small-serving products by manufacturer and serving-size band, then identify possible gaps.”
API-key access recommended
FOR COST RESEARCH

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.

“Show me 10 recently released convenience-store pasta products, lowest wholesale cost index first.”

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:advanced
WHAT YOU CAN DO

Five 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.

A female guide thoughtfully considering five ways to investigate food
Start with what you want to learn; the available tool follows from that intent.
⌕

Search by name

Keywords, AND/OR logic, new records, and paging.

01
≤

Filter by conditions

Nutrients, manufacturer, category, ingredients, and dates.

02
i

Read 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.

03
↶

Trace from ingredients

Reverse-search products and dishes containing an ingredient.

04
Δ

Compare and analyze

Compare nutrition and ingredient-presence differences derived from complete ingredient sets.

05
ALL AVAILABLE TOOLS

All 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.

PUBLIC4Basic tools without Food Search credentials
TRIALup to 12Valid today; 10 calls and up to five foods per response
API KEYup to 12Ongoing access according to contracted scope
Describe your goal

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.”
Name the tool

For reproducibility, include the exact tool name in your request.

“Use compare_foods for these three OIDs.”
Call it with JSON-RPC

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.

The dietitian guide giving a friendly, slightly apologetic explanation
A little confusing, isn't it?Sorry about that.
#ToolWhat it doesAccess requirementRequired scopeDetails
01Search names and keywords with AND/OR, paging, and optional new recordsPublic / freeTrialAPI keyfood:search
02Get name, required reading, manufacturer, category, release date, weight, and seven major nutrients from an OIDPublic / freeTrialAPI keyfood:search
03Find ingredient candidates mapped to the Japanese food composition tablesPublic / freeTrialAPI keyfood:search
04Return food-term suggestions from a partial queryPublic / freeTrialAPI keyfood:search
05Get 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 disclosedTrialAPI keyfood:detail
06Compare 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 valuesTrialAPI keyfood:recipe
07Run several independent searches and return them in one consistent structureTrialAPI keyfood:batch
08Rank by nutrient or wholesale cost index and combine taste, color, launch dates, maker, category, ingredients, and other conditions. Can rank by official label values onlyTrialAPI keyfood:advanced
09Find similar dishes and products from a name, OID, or composition-match abstract-name candidate; preserve popularity order without disclosing scoresTrialAPI keyfood:advanced
10Reverse-search foods containing an ingredient with nutrient, wholesale cost index, taste, color, date, and other conditions. Can rank by official label values onlyTrialAPI keyfood:advanced
11Search by nutrient range without a name; unavailable without a separate contractTrialAPI keyfood:advancedDB-API add-on required
12Returns 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 pausedTrialAPI keyno 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.

What is an OID (Object ID)?An OID is 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—Japan's only unified IMD identifier of this kind.
TOOL DETAIL

CHOOSE YOUR ACCESS

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 AUTH
https://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, and X-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 / BEARER
https://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
QUICK START · PUBLIC ACCESS

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.

01

Open the server screen

Use ChatGPT Developer mode, Gemini Connected Apps / Gemini CLI, or a Claude custom connector.

02

Register the URL

Enter the complete HTTPS endpoint and leave credentials empty.

03

Search and verify

Call search_foods and confirm both food data and request_id.

Display nameFood Search (Public)
TransportStreamable HTTP
MCP server URLhttps://mcp.fdb.software/mcp/food/public
AuthenticationNone / No credentials
01

Open the custom MCP registration screen

Menu names and eligibility can change as each client updates its interface.

GPTChatGPT Work

  1. Open Settings.
  2. Choose Security and login.
  3. Turn on Developer mode.
  4. Open ChatGPT Plugins and choose the plus button.

Developer mode may be hidden by account or workspace policy.

GGemini Spark

  1. Open gemini.google.com on a computer.
  2. Go to Settings & help → Connected Apps.
  3. If shown, pass through Personal Intelligence.
  4. Choose Custom apps for Spark → Add a custom app.

Eligibility may be limited by region, age, account type, language, Keep Activity, and Spark access.

02

Register the public endpoint

Include the final /mcp/food/public. Do not add an API key, OAuth client, or Authorization header.

GPTChatGPT settings

NameFood Search (Public)
DescriptionSearch Japanese foods, food summaries, composition-table ingredients, and food-term suggestions
Connection · MCP URLhttps://mcp.fdb.software/mcp/food/public
AuthenticationNone

Choose Create, then confirm the four detected tools: search_foods, get_food_summary, search_ingredients, and suggest_food_terms.

GGemini settings

MCP server URLhttps://mcp.fdb.software/mcp/food/public
Advanced features / CredentialsLeave empty

Choose Next, follow the prompts, and confirm the connected app and its four tools.

Gemini CLI fallback
gemini mcp add --scope user --transport http \
  food-search-public \
  https://mcp.fdb.software/mcp/food/public

gemini mcp list

CClaude and other MCP clients

Claude (claude.ai / desktop)Settings › Connectors › Add custom connector
Remote MCP server URLhttps://mcp.fdb.software/mcp/food/public
AuthenticationNone

Whether 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 Code
claude mcp add --transport http food-search-public \
  https://mcp.fdb.software/mcp/food/public

claude mcp list
03

Search 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.”
  1. Install or enable the plugin created in the previous step.
  2. Switch to a Work chat if required.
  3. Select the app with @.
  4. Confirm the food records and request_id.

GGemini Spark

Use the same prompt, selecting the connected Food Search app with @.
  1. Open a new Spark chat.
  2. Select the connected app.
  3. Specify the conditions and requested columns.
  4. Confirm the returned records and request_id.

Do not put secret values or unnecessary personal data in the prompt.

AI client → MCP server
{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "tools/call",
  "params": {
    "name": "search_foods",
    "arguments": {
      "query": "パン",
      "match": "and",
      "start": 0,
      "limit": 2,
      "include_new": true
    }
  }
}
MCP server → AI client (excerpt)
{
  "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": "…"
    }
  }
}
CONTINUE · API KEY ACCESS

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

CHATGPT WORKConnect through OAuth 2.1

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 now
GEMINI SPARK · WEBConnect with OAuth 2.1 / DCR

Gemini 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 now
GEMINI CLISupported with a Bearer header

The CLI supports an HTTP --header and can connect to the API-key endpoint now. A safer input example follows.

Available now
CLAUDE · OTHER CLIENTSConnect with OAuth 2.1 or Bearer

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.

Available now
Display nameFood Search (API key)
TransportStreamable HTTP
MCP server URLhttps://mcp.fdb.software/mcp/food
AuthenticationChatGPT: OAuth 2.1 / direct: Bearer
Enter the key only on the Food Search authorization page, in an approved secret field, or in an Authorization header
Never 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.
01

Check what was issued

Confirm the identity and limits before entering the secret.

KEYComplete API key

Shown once at issue time. Store it in an approved secret location.

SCOPESPermitted tools

Confirm required scopes such as food:advanced.

EXPIRYValidity period

Check start, end, and renewal arrangements.

BILLINGBilling state

Paid, paid period expired, or unpaid.

LIMITSDaily quota

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.

02

Configure authentication in the client

Keep the key out of the conversation and use a supported authentication channel.

GPTChatGPT Work
OAuth 2.1 required
Add authenticated MCP server
https://mcp.fdb.software/mcp/food
AuthenticationOAuth 2.1
Connect
Food Search authorization page→Short-lived token for ChatGPT
  1. Register the URL above as an authenticated MCP server and choose Connect
  2. Enter the issued API key only on the Food Search authorization page that opens
  3. Review the client name and requested scopes, then choose Authorize (only the requested scopes that the key holds are granted)
  4. 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 ↗
GGemini Spark / Gemini CLI
OAuth 2.1 / Bearer
MCP server URLhttps://mcp.fdb.software/mcp/food
Header nameAuthorization
Secret valueBearer ••••••••••••••••

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.

Gemini CLI · Bash
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 list

This 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.

03

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 scope
401Invalid or expired key
429Rate or daily limit
isErrorAdd-on contract, tokens, arguments (HTTP 200)

A 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 header + tools/call
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.

FROM RESULTS TO DECISIONS

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.

From question to analysis result01 / PURPOSEState the goal“Gyudon under 200 kcal—compare weight and kcal”02 / SEARCHMCP searchesFO…FO…FO…OIDs, nutrients and majoringredients as structured data03 / COMBINEAI chains toolssearch → detail → compare04 / EXPLAINTables, charts, textReshaped for the goal whilekeeping the evidence values
One conversation: question → structured data from MCP → chained tools → tables, charts and text.
Comparing three same-name records in one tableABCABCgkcalP
CASE 01 / CANDIDATES

Compare records with the same name

Find OIDs, then align serving basis and nutrients.

“Find three firm tofu records and compare energy and protein.”
  1. Search by name
  2. Compare OIDs
  3. Difference table
search_foods → compare_foods
Ranking candidates at or below 200 kcal and excluding the restkcal120138156174192200 kcal12345
CASE 02 / FILTER

Choose 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.”
  1. kcal limit
  2. Sort ascending
  3. Table + notes
search_foods_advanced → AI table
Reverse-searching dishes from an ingredient OID and filtering themOID
CASE 03 / INGREDIENT

Trace dishes from an ingredient

Resolve an ingredient OID, then reverse-search foods that contain it.

“Find dishes containing onion that meet my salt condition.”
  1. Ingredient OID
  2. Filtered reverse search
  3. Candidates
search_ingredients → find_foods_by_ingredient_advanced
Comparing ingredient presence and showing only up to three differencesAB+3+1diff ≤3sameno g / %
CASE 04 / INGREDIENT DIFFERENCES

Read 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.”
  1. All ingredients
  2. ≤3 differences
  3. Explain
compare_foods
Normalizing several searches into one table with shared columnsABCgkcalPABC
CASE 05 / BATCH

Normalize 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)
  1. Batch search
  2. Align columns
  3. Cross-table
batch_search_foods → AI cross-table
Extracting a narrow candidate group and viewing its distribution by makerPkcal≤200maker7531
CASE 06 / NICHE MARKET

Explore a narrow market

Combine name, nutrient range, manufacturer, and category conditions.

“Map high-protein products under 200 kcal by size and maker.”
  1. Combined filters
  2. Distribution
  3. Hypothesis
search_foods_advanced → AI distribution
Comparing a new product with existing candidates on the same axisNEWtime →newavgsame axis
CASE 07 / NEW PRODUCTS

Compare new and existing products

Include newly registered records and align date, serving basis, and nutrients.

“Compare recent soy products with established alternatives.”
  1. Include new
  2. Same axis
  3. Planning memo
search_foods_advanced → compare_foods
Expanding structured data into a web page, chart and video outlineJSON
CASE 08 / COMMUNICATION

Turn 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.”
  1. Evidence
  2. Web / chart
  3. Video outline
structuredContent → AI client output
About four weeks of wholesale cost index history plus a low-to-high rankingindex28d396rank17629931104114
CASE 09 / WHOLESALE COST INDEX

Rank 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.”
  1. Narrow candidates
  2. Rank by index
  3. Trend + rank
search_foods_advanced / rank_by_cost
Ranking only foods with official label values and showing estimates separatelypoolofficialest.P g · officialdesc124.1221.0318.2est.22.6
CASE 10 / OFFICIAL VALUES

Rank 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.”
  1. Official values only
  2. Sort descending
  3. Official vs estimated
search_foods_advanced / official_values_only + include_value_sources
Rounded approximate amounts for the top three ingredients, with water and exact amounts withheldper unittop 3 · ≈ g20 tok ×31≈120 g2≈80 g3≈45 gwaterexact · 4th+
CASE 11 / APPROXIMATE AMOUNTS

Grasp 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.”
  1. Find the food
  2. Top 3 + approx. g
  3. Explain the makeup
get_food_detail / include_ingredient_amounts
REAL MCP RESULTS

Examples observed through the public MCP

These are excerpts from real public search_foods calls—not invented demonstration records.

LIVE MCP EXCERPT
QUERY / LIMIT 3木綿豆腐 · firm tofu

Firm tofu (one 150 g serving)

Serving basis 150 g · common food

109.5kcal10.5 gprotein0 gsalt equivalent

Other 150 g and 200 g candidates were returned in the same response.

OID: FOd5c4d1bb498bc09e0c0be3ce
QUERY / LIMIT 3カレーライス · curry rice

Curry rice with beef and vegetables

Serving basis 577 g · everyday dish

849.8kcal25.0 gprotein3.4 gsalt equivalent

A smaller 235 g candidate was also returned.

QUERY / LIMIT 3プロテインバー · protein bar

My Protein Bar, vanilla flavor

Serving basis 42 g · release date 2026-08-11

184kcal15.2 gprotein5.5 gfiber

Three candidates were returned in the same structure.

DATA QUALITY & IMPORTANT LIMITS

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

01 / SOURCEOfficial labels and product informationReview published values, products, dishes, and images
02 / RECIPESpecialist supervisionIMD's dedicated registered dietitians supervise recipe models
03 / CALCULATECalculation and double checkingFood-table calculation, human checking, and internal audit
04 / DELIVERStructured through MCPSchema validation, OID, retrieval time, and request ID
NUTRIENT & RESPONSE IDENTIFIERS

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.

Loading
NameDescriptionidentifierUnitCategorycategory_key

Loading the current public identifier catalog.

UNDER THE HOOD

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.

1. Discover tools
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/list",
  "params": {}
}
2. Call a tool
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "get_food_summary",
    "arguments": {
      "objectid": "FOd5c4d1bb498bc09e0c0be3ce"
    }
  }
}
3. Structured result
{
  "content": [{
    "type": "text",
    "text": "食品概要を取得しました。\n\nMCP結果(JSON):\n{...}"
  }],
  "structuredContent": {
    "food": {
      "objectid": "FOd5c4d1bb498bc09e0c0be3ce",
      "name": "木綿豆腐(1個150g)",
      "unit_g": 150
    },
    "request_id": "…"
  }
}
4. Error shape
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": "…"
  }
}
Developer note: server messages and response text are in Japanese. validate structuredContent against your application types, retain request_id for support, and treat an upstream error as an error—not as zero results.
READ THE RESULT

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.

objectid

A 26-character OID beginning with FO, shared across ingredients, foods, and products.

specified_nutrition

Major 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_ingredients

Up 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_disclosed

Always false: exact ingredient amounts, weights, and ratios are not disclosed. It stays false even when approx_amount_g is returned.

official_value_fields

Names 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_id

Identifier used to match a report with server logs.

item_count

Matching 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_count

Number of records included in this response.

filters_applied_upstream

True 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.

cache

hit / miss / mixed (several lookups with different cache use). It does not indicate whether a result is correct.

null

Unknown 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 / symptomMeaningWhat to do
HTTP 404 / 405 (GET)Wrong URL or direct browser navigationRegister the complete URL in an MCP client
HTTP 401 UNAUTHENTICATEDMissing, invalid, or expired API keyCheck the Bearer format and key status
HTTP 413Request body larger than 256 KiBSend fewer terms, OIDs, or conditions
HTTP 429 RATE_LIMITEDPublic fair-use control, RPM, or JST daily limit reachedStop until Retry-After, then reduce concurrency and page walking
HTTP 503 UPSTREAM_UNAVAILABLEService paused by the administrator, public access paused, or a restart / temporary failureCheck the service status on the top page and retry later without flooding
HTTP 502 / 504Temporary gateway or upstream problemWait briefly and retry
Tool error ADDITIONAL_CONTRACT_REQUIREDA separate contract is required and the tool is currently unavailableContact IMD and use an available alternative where possible
Tool error TOKEN_EXHAUSTEDThis week's or month's token balance is zero or belowCheck the balance and reset date with get_token_usage or token usage, then replenish or wait
Tool error INVALID_ARGUMENTInvalid 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_FIELDA field missing from the upstream search index was used in priority_slotsRead it with get_food_detail response_fields, or use nutrient_filters / sort
Tool error NOT_FOUNDThe source food for a similar-food search was not foundCheck the source name or OID
Tool error FORBIDDENinclude_new=false on the public endpointThe public edition cannot exclude new products; use an API key
Tool error UPSTREAM_*Upstream communication or response problemDo 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_idFix the argument named in the message
FAQ

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.

SUPPORT

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
Occurrence time and time zoneMCP client name and versionTool name, HTTP status, and error coderequest_idFor API-key access: key ID or prefix only
A smiling guide welcoming inquiries
Corporate API enquiries are welcome, too
INSTANT TRIAL · API KEY

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.

Valid today in JST10 MCP calls/dayUp to 5 foods/responseToken metering (week / month)No charge

Today’s trial key

Issue immediately for this network. No email registration is required.

Not issued yet

01 / ISSUE

Issue on this page

One issuance per JST day for each IPv4 address or assigned IPv6 /64 prefix.

02 / KEEP

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.

03 / CONNECT

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.

TOKEN USAGE

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.

Enter a key to see its usage

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.