kfda-mcp
by pianovirus
README.md
# π°π· KFDA MCP Server
MCP (Model Context Protocol) server for Korean Ministry of Food and Drug Safety (μμ½μ²) public OpenAPI.
LLM agents (Claude, ChatGPT, etc.) can autonomously query Korean drug master, DUR (Drug Utilization Review) safety rules, and health supplement databases through the standard MCP protocol.
[](https://doi.org/10.5281/zenodo.21063208)
[](https://modelcontextprotocol.io)
[](https://www.python.org)
[](LICENSE)
[](https://www.mfds.go.kr)
---
## π― Why this exists
The Korean healthcare AI ecosystem lacks an open MCP server for MFDS (μμ½μ²) public APIs. Global MCP servers like BioMCP focus on US data (FDA, PubMed). For Korean healthcare AI applications β pharmacy systems, telemedicine, drug interaction checkers β direct access to KFDA/MFDS APIs is essential but each team has to write their own wrapper.
This project provides a standard MCP server so any LLM agent can query Korean drug safety data without bespoke integration code.
---
## β¨ Features
| Tool | Description | KFDA OpenAPI |
|---|---|---|
| `search_drug` | μμ½ν λ§μ€ν° κ²μ (μ νλͺ
Β·μ±λΆΒ·μ μ‘°μ¬Β·ATC μ½λ) | μμ½ν μ ν νκ°μ 보 |
| `check_dur_interaction` | λ μ½λ¬Όμ λ³μ©κΈκΈ°Β·μ°λ ΉκΈκΈ°Β·μλΆκΈκΈ° νμΈ | μμ½ν μμ μ¬μ©μλΉμ€ (DUR) |
| `search_supplement` | 건κ°κΈ°λ₯μν μΈνκ° μ 보 κ²μ | μνμμ λλΌ κ±΄κΈ°μ OpenAPI |
| `get_drug_easy_info` | eμ½μμ (νμμ© μ¬μ΄ μ½λ¬Ό μ 보) μ‘°ν | eμ½μμ |
| `lookup_atc_code` | ATC μ½λ β μ½λ¬Όκ΅° λΆλ₯ μ 보 | λ΄μ₯ λ§€ν |
---
## π Quick Start
### 1. Install
```bash
pip install kfda-mcp
# or from source
git clone https://github.com/pianovirus/kfda-mcp
cd kfda-mcp
pip install -e .
```
### 2. Get your MFDS API key
Apply for a free API key at [data.go.kr](https://www.data.go.kr) (곡곡λ°μ΄ν°ν¬νΈ) β select μμ½μ² OpenAPI services.
### 3. Configure
Create `.env`:
```
MFDS_API_KEY=your_api_key_here
```
### 4. Run as MCP server
```bash
kfda-mcp
```
### 5. Connect from Claude Desktop
Add to `~/.config/claude/claude_desktop_config.json` (or `%APPDATA%\Claude\claude_desktop_config.json` on Windows):
```json
{
"mcpServers": {
"kfda": {
"command": "kfda-mcp",
"env": {
"MFDS_API_KEY": "your_api_key_here"
}
}
}
}
```
Restart Claude Desktop. Now Claude can call Korean drug safety tools autonomously.
---
## π‘ Example Usage
Ask Claude (or any MCP-compatible LLM):
> "νμκ° μνλ¦°μ λ³΅μ© μ€μΈλ° μλͺ½ μΆμΆ μμμ λ₯Ό κ°μ΄ λ¨Ήμ΄λ λλμ§ νμΈν΄μ€"
Claude will autonomously:
1. Call `search_drug("μνλ¦°")` β get warfarin info + ATC code
2. Call `check_dur_interaction("warfarin", "grapefruit_extract")` β DUR check
3. Synthesize a safety recommendation grounded in MFDS data
---
## π Architecture
```
LLM Agent (Claude / GPT / etc.)
β
β MCP Protocol (stdio / SSE)
β
βΌ
KFDA MCP Server (this project)
β
β HTTP requests
β
βΌ
MFDS Public APIs
- μμ½ν μ ν νκ°μ 보 OpenAPI
- μμ½ν μμ μ¬μ©μλΉμ€ (DUR)
- μνμμ λλΌ κ±΄κΈ°μ OpenAPI
- eμ½μμ
```
---
## π Tool Reference
### `search_drug(name: str, limit: int = 10)`
Search Korean drug master by product name, generic name, or manufacturer.
**Returns**: List of drugs with `product_name`, `generic_name`, `manufacturer`, `atc_code`, `kor_indication`, `dosage_form`.
### `check_dur_interaction(drug_a: str, drug_b: str)`
Check DUR safety rules between two drugs (λ³μ©κΈκΈ°Β·μ°λ ΉκΈκΈ°Β·μλΆκΈκΈ° λ±).
**Returns**: List of warnings with `rule_type`, `severity`, `description_kor`.
### `search_supplement(ingredient: str | None = None, product: str | None = None)`
Search μμ½μ² 건κ°κΈ°λ₯μν (functional health food) registrations.
**Returns**: List of supplements with `product_name`, `manufacturer`, `main_ingredient`, `approved_function`.
### `get_drug_easy_info(drug_name: str)`
Get patient-friendly drug information from eμ½μμ (consumer-facing drug guide).
**Returns**: `purpose`, `dosage`, `side_effects`, `warnings` in Korean.
### `lookup_atc_code(atc_code: str)`
Look up ATC (Anatomical Therapeutic Chemical) classification by code.
**Returns**: `level1` ~ `level5` Korean & English names, drug examples.
---
## π£ Roadmap
- [x] Project scaffold + MCP SDK setup
- [x] `search_drug` β μμ½ν λ§μ€ν° β
live verified (νμ΄λ λ β ATC N02BE01)
- [x] `check_dur_interaction` β DUR λ³μ©κΈκΈ° β
live verified (μμ€νΌλ¦°+μνλ¦° β 50건)
- [x] `search_supplement` β 건기μ β
live verified (μνμμ λλΌ C003, λΉνλ―Ό κ²μ OK)
- [x] `get_drug_easy_info` β eμ½μμ β
live verified (νμ΄λ λ ν¨λ₯Β·μ©λ²Β·λΆμμ© λ°ν)
- [ ] `lookup_atc_code` β ATC λ§€ν (planned)
- [ ] Local cache layer (reduce API calls) β planned
- [ ] Async batch query support β planned
- [ ] Multilingual responses (ν/μ) β planned
**νμ¬ μν: 4/4 ν΅μ¬ tool λͺ¨λ live κ²μ¦ μλ£, production-ready**
- [ ] Local cache layer (reduce API calls)
- [ ] Async batch query support
- [ ] Multilingual responses (ν/μ)
---
## π€ Contributing
Korean healthcare AI engineers β contributions welcome! Please open an issue or PR.
This project aims to be the de facto MCP server for MFDS public APIs.
---
## π License
MIT Β© 2026 Myunghee Kim Β· pianovirus@naver.com
---
## π Acknowledgments
- [Anthropic MCP](https://modelcontextprotocol.io) β Standard protocol for LLM-tool communication
- [μνμμ½νμμ μ² (MFDS)](https://www.mfds.go.kr) β Public health data API provider
- [곡곡λ°μ΄ν°ν¬νΈ](https://www.data.go.kr) β Korean government open data platform
---
## νκ΅μ΄ μμ½
μμ½μ²(MFDS)μ 곡곡 OpenAPIλ₯Ό MCP νλ‘ν μ½λ‘ κ°μΌ μλ²μ
λλ€. Claude, GPT κ°μ LLM μμ΄μ νΈκ° νκ΅ μμ½ν λ§μ€ν°Β·DUR μμ μ±Β·κ±΄κ°κΈ°λ₯μν μ 보λ₯Ό μμ¨μ μΌλ‘ μ‘°νν μ μμ΅λλ€.
νκ΅ ν¬μ€ AI κ°λ°μλ€μ΄ λ§€λ² μμ½μ² API wrapperλ₯Ό μ§μ λ§λ€ νμ μμ΄, μ΄ MCP μλ² νλλ‘ νμ€νλ λꡬ μ κ·Όμ μ 곡νλ κ²μ΄ λͺ©νμ
λλ€.
κΈ°μ¬ νμν©λλ€. π±
TDQS
A3.9/5.0
Scored across 4 tools
Disambiguation5/5
Each tool has a clearly distinct purpose: interaction checking, patient info retrieval, drug search, and supplement search. There is no overlap or ambiguity among them.
Naming Consistency5/5
All tool names follow a consistent verb_noun pattern with underscores (e.g., check_dur_interaction, search_drug). The naming is predictable and uniform.
Tool Count5/5
With 4 tools, the server is well-scoped for a focused domain of Korean drug and supplement information. Each tool serves a distinct function without redundancy.
Completeness4/5
The server covers drug search, patient information, interaction checking, and supplement searchβkey functionalities. Minor gaps exist (e.g., professional-level drug details), but the core workflows are supported.
Maintenance
ActivityStale
ResponsivenessNo issues