Skip to main content
Glama
slicequeue

K-MFDS FoodDB MCP Server

by slicequeue

K-MFDS FoodDB MCP Server

식품의약품안전처(K-MFDS) 식품영양성분DB를 MCP(Model Context Protocol) 도구로 바로 활용!

GitHub npm

실행 화면

예시1 일반 검색

예시2 응용 검색

사용방법은 아래 🛠️ 사용 가능한 MCP 도구를 참고해주세요 :)


Related MCP server: Food Data Central MCP Server

✨ 빠른 시작 (npx)

npx k-mfds-fooddb-mcp-server
  • MCP 호환 플랫폼(예: ModelContext, MCP SDK 등)에서 바로 실행할 수 있습니다.

  • 표준 입력/출력(STDIO) 기반 MCP 서버로 동작합니다.


🚀 MCP 클라이언트 설정

Gemini (Google AI Studio)

  1. Google AI Studio에서 새 프로젝트 생성

  2. Tools 섹션에서 Add tool 클릭

  3. MCP Server 선택

  4. 설정:

    Name: K-MFDS FoodDB
    Command: npx k-mfds-fooddb-mcp-server
  5. Save 클릭

Cursor

  1. Cursor 설정에서 ExtensionsMCP 활성화

  2. ~/.cursor/mcp_servers.json 파일 생성/수정:

    {
      "mcpServers": {
        "k-mfds-fooddb": {
          "command": "npx",
          "args": ["k-mfds-fooddb-mcp-server"],
          "env": {
            "GOV_API_KEY": "발급받은_식약처_API_키"
          }
        }
      }
    }
  3. Cursor 재시작

💡 환경변수 설정: env 섹션에 GOV_API_KEY를 추가하세요. API 키는 공공데이터포털에서 발급받을 수 있습니다.

Continue

  1. Continue 설정에서 MCP Servers 섹션으로 이동

  2. 새 서버 추가:

    Name: k-mfds-fooddb
    Command: npx k-mfds-fooddb-mcp-server
    Environment Variables:
      GOV_API_KEY: 발급받은_식약처_API_키
  3. Save 클릭

💡 환경변수 설정: Environment Variables 섹션에 GOV_API_KEY를 추가하세요.

ModelContext

  1. ModelContext 설정에서 MCP Servers

  2. Add Server 클릭

  3. 설정:

    {
      "name": "K-MFDS FoodDB",
      "command": "npx",
      "args": ["k-mfds-fooddb-mcp-server"],
      "env": {
        "GOV_API_KEY": "발급받은_식약처_API_키"
      }
    }
  4. Connect 클릭

💡 환경변수 설정: env 섹션에 GOV_API_KEY를 추가하세요.

기타 MCP 호환 클라이언트

대부분의 MCP 호환 클라이언트에서 다음과 같이 설정:

{
  "name": "k-mfds-fooddb",
  "command": "npx",
  "args": ["k-mfds-fooddb-mcp-server"],
  "env": {
    "GOV_API_KEY": "발급받은_식약처_API_키"
  }
}

💡 환경변수 설정: env 섹션에 GOV_API_KEY를 추가하세요. API 키는 공공데이터포털에서 발급받을 수 있습니다.


📦 설치 (npm)

Installing via Smithery

To install k-mfds-fooddb-mcp-server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @slicequeue/k-mfds-fooddb-mcp-server --client claude

Installing manually

npm install -g k-mfds-fooddb-mcp-server
# 또는 프로젝트에 설치
npm install k-mfds-fooddb-mcp-server

⚡ 환경 변수 설정

  1. .env 파일을 프로젝트 루트에 생성하세요. (예시: env.example 참고)

  2. 필수 항목:

    • GOV_API_KEY: 식품의약품안전처 OpenAPI 키

GOV_API_KEY=발급받은_식약처_API_키

API 키는 공공데이터포털에서 신청/발급받을 수 있습니다.


🛠️ 사용 가능한 MCP 도구

1. 식품 검색 도구 (searchFoodNutrition)

  • 설명: 식품명, 제조사, 카테고리 등 다양한 조건으로 식품 영양성분 정보를 검색합니다.

  • 입력 파라미터:

    • foodNameKr: 식품명 (예: "사과")

    • makerName: 제조사명 (예: "농심")

    • foodCategory1Name: 식품 대분류명 (예: "과일류")

    • itemReportNo: 품목제조보고번호

    • researchYearMonthDate: 데이터 생성일자 (YYYYMMDD)

    • pageNo: 페이지 번호 (기본값: 1)

    • numOfRows: 한 페이지 결과수 (기본값: 10, 최대: 100)

    • updateDate: 데이터 수정일자 (YYYYMMDD)

    • dbClassName: 품목대표/상용제품 구분

✅ 예시 요청

{
  "foodNameKr": "사과",
  "numOfRows": 5
}

✅ 예시 응답

{
  "data": [
    {
      "foodNameKr": "사과",
      "makerName": "농협",
      "foodCategory1Name": "과일류",
      "servingSize": "100g",
      "nutritionComponents": [
        { "name": "열량", "value": "52", "unit": "kcal" },
        { "name": "단백질", "value": "0.3", "unit": "g" }
      ],
      "itemReportNum": "2020123456789",
      "researchDate": "20201201"
    }
  ],
  "paging": {
    "totalCount": "100",
    "pageNo": "1",
    "numOfRows": "10"
  }
}

2. 영양성분 코드 조회 도구 (getNutritionComponentTypes)

  • 설명: 식품영양성분DB에서 제공하는 영양성분 코드/이름/단위 목록을 조회합니다.

  • 입력 파라미터: 없음

✅ 예시 응답

{
  "items": [
    {
      "code": "AMT_NUM1",
      "name": "에너지",
      "label": "에너지(kcal)",
      "unit": "kcal"
    },
    { "code": "AMT_NUM2", "name": "수분", "label": "수분(g)", "unit": "g" },
    { "code": "AMT_NUM3", "name": "단백질", "label": "단백질(g)", "unit": "g" }
    // ... 이하 생략
  ]
}

💬 실제 사용 예시 (LLM 질문)

🍎 식품 검색 도구 사용 예시

Claude/Cursor에서 다음과 같이 질문하세요:

"사과의 영양성분 정보를 알려줘"

"농심에서 만드는 라면의 영양성분을 검색해줘"

"과일류 카테고리에서 칼로리가 낮은 식품들을 찾아줘"

📊 영양성분 코드 조회 도구 사용 예시

Claude/Cursor에서 다음과 같이 질문하세요:

"식품영양성분DB에서 제공하는 영양성분 코드 목록을 보여줘"

"어떤 영양성분들을 조회할 수 있나요?"

"영양성분 단위 정보를 알려줘"

"식품영양성분DB의 영양성분 분류 체계를 설명해줘"

🎯 실제 대화 예시

사용자: "사과의 영양성분을 알려줘"

AI: "사과의 영양성분 정보를 검색해드리겠습니다."

[MCP 도구 호출: searchFoodNutrition]

AI: "사과의 영양성분 정보입니다:

  • 열량: 52 kcal (100g 기준)

  • 단백질: 0.3g

  • 지방: 0.2g

  • 탄수화물: 13.8g

  • 식이섬유: 2.4g ..."

사용자: "어떤 영양성분들을 조회할 수 있나요?"

AI: "식품영양성분DB에서 제공하는 영양성분 코드 목록을 확인해드리겠습니다."

[MCP 도구 호출: getNutritionComponentTypes]

AI: "다음과 같은 영양성분들을 조회할 수 있습니다:

  • 에너지 (kcal)

  • 수분 (g)

  • 단백질 (g)

  • 지방 (g)

  • 탄수화물 (g)

  • 식이섬유 (g)

  • 회분 (g)

  • 나트륨 (mg)

  • 칼륨 (mg) ..."

🔍 고급 검색 예시

사용자: "닭가슴살 중에 칼로리가 낮고 단백질이 높은 식품을 찾아줘"

AI: "닭가슴살 관련 식품 중에서 칼로리가 낮고 단백질이 높은 것들을 검색해드리겠습니다. 식품영양성분DB에서 닭가슴살 관련 제품들을 찾아보겠습니다."

[MCP 도구 호출: searchFoodNutrition]

AI: "식품영양성분DB에서 닭가슴살 관련 제품들을 검색한 결과, 다음과 같은 식품들을 추천드립니다:

  1. 닭가슴살 (생것, 100g 기준)

    • 열량: 165 kcal

    • 단백질: 31g

    • 지방: 3.6g

  2. 닭가슴살 (구운것, 100g 기준)

    • 열량: 165 kcal

    • 단백질: 31g

    • 지방: 3.6g

  3. 닭가슴살 (삶은것, 100g 기준)

    • 열량: 165 kcal

    • 단백질: 31g

    • 지방: 3.6g

  4. 닭가슴살 (튀긴것, 100g 기준)

    • 열량: 165 kcal

    • 단백질: 31g

    • 지방: 3.6g ..."


🏃 MCP 서버 직접 실행 예시

npx k-mfds-fooddb-mcp-server
  • MCP 플랫폼에서 자동으로 도구를 인식/등록합니다.

  • STDIO 기반이므로, MCP SDK/ModelContext 등에서 바로 연결해 사용할 수 있습니다.


🏗️ 프로젝트 구조 (참고)

src/
├── config/           # 환경변수 및 설정
├── external/         # 외부 API 연동/매핑
├── tools/            # MCP 도구 구현
└── index.ts          # MCP 서버 진입점

🧪 테스트

npm test

🤝 기여 및 문의


📄 라이선스

ISC

Available Tools

2 tools
getNutritionComponentTypesgetNutritionComponentTypesB

식품영양성분DB에서 제공하는 영양성분 유형 목록을 조회합니다.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral traits, but it only states the purpose. No mention of side effects, authorization, or data freshness. The simplicity of the tool partly mitigates this, but there is no extra context beyond the basic action.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence in Korean. It contains no wasted words, but it could be more structured (e.g., bullet points). However, for the simplicity, it is efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (no parameters, no output schema), the description is minimally adequate. It tells what the tool does but does not explain the return format or any usage notes. Slightly more context would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are no parameters in the input schema, and schema coverage is effectively 100%. The instructions set a baseline of 4 for zero-parameter tools, and the description adds no parameter info (none needed). This is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves a list of nutrition component types from a specific database. The verb 'retrieve' and resource 'nutrition component types' are specific, and the sibling tool 'searchFoodNutrition' suggests a different purpose, so it distinguishes well.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives. While the sibling tool implies a different use case, the description doesn't explicitly state when to choose this over searchFoodNutrition or any exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

searchFoodNutritionsearchFoodNutritionC

식품의약품안전처 식품영양성분DB에서 식품 정보를 검색합니다. 식품명, 제조사, 카테고리 등을 기준으로 검색할 수 있습니다.

ParametersJSON Schema
NameRequiredDescriptionDefault
foodNameKrNo검색할 식품명 (예: "사과", "김치")
makerNameNo제조사명 (예: "농심", "롯데")
foodCategory1NameNo식품 대분류명 (예: "곡류", "채소류", "육류")
itemReportNoNo품목제조보고번호
researchYearMonthDateNo데이터 생성일자 (YYYYMMDD 형식)
pageNoNo페이지 번호 (기본값: 1)
numOfRowsNo한 페이지 결과수 (기본값: 10, 최대: 100)
updateDateNo데이터 수정일자 (YYYYMMDD 형식)
dbClassNameNo품목대표/상용제품 구분

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must disclose behavior. It only states a read operation (search) but does not mention data freshness, rate limits, authentication needs, or any side effects, leaving significant gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise (two sentences), directly states the purpose, and lists example criteria without unnecessary words. It is well-structured for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 9 parameters, no output schema, and a sibling tool, the description is insufficient. It does not explain how parameters interact, pagination behavior, or the structure of results, leaving the agent without essential context for correct usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, so the parameters are fully documented. The description redundantly mentions a few parameters but adds no meaningful explanation beyond the schema. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool searches food information from a specific database and lists search criteria (food name, manufacturer, category). It is directive and informative, but does not differentiate from the sibling tool getNutritionComponentTypes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus the sibling tool or how to choose between search options. It lacks explicit context about its role in a workflow.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 2 tool updatesv1.0.7
    • First observedgetNutritionComponentTypes
    • First observedsearchFoodNutrition

TDQS

B3.2/5.0
Disambiguation5/5

The two tools have completely distinct purposes: one lists nutrient component types, the other searches for food nutrition data. No overlap or ambiguity.

Naming Consistency5/5

Both tools follow a consistent verb_noun naming pattern: getNutritionComponentTypes and searchFoodNutrition, using clear prefixes.

Tool Count2/5

With only 2 tools, the server feels very thin for a food nutrition database domain. A typical scope would require at least 4-5 tools for basic CRUD and search.

Completeness2/5

Missing essential operations like retrieving full nutrition details for a specific food, filtering by nutrient, or adding/updating data. Users can list types and search, but cannot retrieve individual food details.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides intelligent access to the USDA nutrition database through AI assistants, enabling users to search foods, compare nutritional content, find foods high in specific nutrients, and query authoritative nutrition data across 7,146+ food items through natural language.
    1
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to search the USDA's FoodData Central database and retrieve detailed nutritional information and ingredient lists. It supports comprehensive food data access through keyword searches and structured queries for specific food items.
    3
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides tools to search and retrieve USDA Food Data Central information, including food items, nutrients, and food groups, enabling AI agents to query food data through natural language.
    15
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/slicequeue/k-mfds-fooddb-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server