korea-data-x402-mcp
# Korea Data x402 MCP Server
MCP (stdio) server exposing the [Korea Data API](https://koreadata-api.pages.dev) — official Korean public data (weather, air quality, real estate, business registration status, companies, food, tourism, trade, holidays...) cleaned to English JSON — as MCP tools. Each call is paid per request in **USDC on Base** via [x402](https://x402.org). No signup, no API key.
On startup the server reads `/openapi.json` from the API and creates one tool per endpoint (e.g. `/v1/weather/forecast` -> `weather_forecast`). Query parameters become tool arguments.
## Install
```bash
npx -y korea-data-x402-mcp
```
Requires Node 18+.
## Configuration
| Env var | Required | Description |
|---|---|---|
| `X402_PRIVATE_KEY` | no | Private key of **your own** EVM wallet holding USDC on Base. Used locally to sign x402 payments; never sent anywhere. Without it, tools return the price and payment instructions (HTTP 402) instead of data. Use a dedicated low-balance wallet. |
| `KOREADATA_API_ORIGIN` | no | API origin. Default `https://koreadata-api.pages.dev`. |
| `X402_NETWORK` | no | Default `eip155:8453` (Base mainnet). |
### Claude Desktop
```json
{
"mcpServers": {
"korea-data": {
"command": "npx",
"args": ["-y", "korea-data-x402-mcp"],
"env": { "X402_PRIVATE_KEY": "<YOUR_BASE_WALLET_PRIVATE_KEY>" }
}
}
}
```
### Smithery
`smithery.yaml` is included (stdio). Set `x402PrivateKey` in the Smithery config to enable payments; leave empty to browse prices only.
## Pricing
Per successful call, USDC on Base. **If the upstream data source fails, you are not charged** (payment is settled only after a successful upstream response).
| Tool | Endpoint | Price | Description |
|---|---|---|---|
| `transit_seoul_subway` | `/v1/transit/seoul-subway` | $0.003 | Seoul Metro |
| `region_population` | `/v1/region/population` | $0.002 | Resident registration population and households per administrative dong in a Korean district |
| `region_households` | `/v1/region/households` | $0.002 | Households by household size |
| `franchise_startup_cost` | `/v1/franchise/startup-cost` | $0.003 | Korean franchise startup cost per brand |
| `weather_history` | `/v1/weather/history` | $0.002 | Historical daily weather observations in Korea |
| `weather_midterm` | `/v1/weather/midterm` | $0.002 | KMA mid-term forecast |
| `realestate_apt_complexes` | `/v1/realestate/apt-complexes` | $0.002 | List of apartment complexes in a Korean district |
| `places_restaurants` | `/v1/places/restaurants` | $0.005 | Search licensed Korean restaurants |
| `realestate_trades` | `/v1/realestate/trades` | $0.005 | Korean real-estate sale transactions by property type |
| `weather_uv` | `/v1/weather/uv` | $0.001 | UV index forecast |
| `food_nutrition` | `/v1/food/nutrition` | $0.002 | Korean food nutrition facts |
| `company_pension_withdrawn` | `/v1/company/pension-withdrawn` | $0.005 | Search Korean workplaces that WITHDREW from the National Pension Service |
| `prices_agri` | `/v1/prices/agri` | $0.002 | Latest Korean agricultural product wholesale/retail prices |
| `franchise_brand` | `/v1/franchise/brand` | $0.01 | Korean franchise brand statistics |
| `trade_hs` | `/v1/trade/hs` | $0.005 | South Korea monthly export/import by HS code |
| `tourism_search` | `/v1/tourism/search` | $0.002 | Search Korean tourist attractions, restaurants, lodging, festivals by keyword |
| `weather_warnings` | `/v1/weather/warnings` | $0.001 | Current Korean weather warnings/advisories list |
| `realestate_apt_trades` | `/v1/realestate/apt-trades` | $0.005 | Korean apartment sale transactions |
| `realestate_apt_rents` | `/v1/realestate/apt-rents` | $0.005 | Korean apartment lease/rent |
| `weather_forecast` | `/v1/weather/forecast` | $0.002 | Korea Meteorological Administration short-term forecast |
| `air_realtime` | `/v1/air/realtime` | $0.002 | Real-time air quality |
| `places_stores_nearby` | `/v1/places/stores-nearby` | $0.005 | Small businesses/shops within a radius |
| `company_pension_workplaces` | `/v1/company/pension-workplaces` | $0.005 | Search Korean companies registered with the National Pension Service by name |
| `company_outline` | `/v1/company/outline` | $0.005 | Korean corporation basic info |
| `bizstatus` | `/v1/bizstatus` | $0.01 | Korean business registration status from the National Tax Service |
| `businessday` | `/v1/businessday` | $0.001 | Is a date a Korean business day |
| `add` | `/v1/add` | $0.001 | Add N Korean business days to a date |
| `realestate_rtms` | `/v1/realestate/rtms` | $0.005 | Korean real-estate sale transactions by property type |
| `franchise_brand_stats` | `/v1/franchise/brand-stats` | $0.005 | Korean franchise |
| `tourism_area` | `/v1/tourism/area` | $0.002 | List Korean tourist attractions/restaurants/lodging/festivals by province |
| `company_business` | `/v1/company/business` | $0.005 | Korean company profile |
| `company_nps` | `/v1/company/nps` | $0.005 | Korean National Pension Service workplace registry |
| `food_restaurant` | `/v1/food/restaurant` | $0.002 | Korean food-business permits |
| `region_code` | `/v1/region/code` | $0.001 | Korean legal dong |
| `food_nutrition2` | `/v1/food/nutrition2` | $0.002 | Korean food nutrition facts |
| `food_category` | `/v1/food/category` | $0.002 | Browse Korean food composition DB by category |
| `weather_living` | `/v1/weather/living` | $0.001 | Korean living-weather indices |
| `air_forecast` | `/v1/air/forecast` | $0.002 | Korean fine-dust forecast grades by province |
| `air_station` | `/v1/air/station` | $0.001 | Korean real-time air quality at one monitoring station |
| `tourism_places_nearby` | `/v1/tourism/places-nearby` | $0.002 | Korean tourist sights, restaurants, shops near a lat/lon |
| `tourism_festivals` | `/v1/tourism/festivals` | $0.002 | Upcoming Korean festivals/events |
| `tourism_detail` | `/v1/tourism/detail` | $0.001 | Korean tourist sight detail by content_id |
| `building_registry` | `/v1/building/registry` | $0.005 | Korean building ledger |
| `realestate_apt_info` | `/v1/realestate/apt-info` | $0.002 | Korean apartment complex profile |
| `weather_now` | `/v1/weather/now` | $0.001 | Korean real-time current weather |
| `weather_nowcast` | `/v1/weather/nowcast` | $0.002 | Korean hourly ultra-short forecast for the next 6 hours |
Prices are set by the API; the 402 response returned by each tool is authoritative.
## License
MIT
TDQS
Scored across 46 tools
Several near-identical pairs compete for the same query: realestate_trades vs realestate_rtms (both MOLIT sale transactions by property type), food_restaurant vs places_restaurants (both MOIS restaurant permit lookups), company_pension_workplaces vs company_nps (both NPS workplace registry), company_outline vs company_business (both FSC corporation profiles), and franchise_brand vs franchise_brand_stats. Version siblings like food_nutrition/food_nutrition2 and weather_uv/weather_living (UV index) also overlap, so an agent must guess which twin to call.
The dominant pattern is domain_prefix_action (weather_now, realestate_apt_trades, tourism_search, company_pension_workplaces), which is readable and mostly predictable. However, bare names like bizstatus, businessday, and add break the convention, and suffix variants (food_nutrition2, realestate_rtms vs realestate_trades, franchise_brand vs franchise_brand_stats) show inconsistent disambiguation-by-name.
46 tools for a broad Korean public-data aggregator is heavy; the surface would be far tighter if duplicate/versioned endpoints (food_nutrition2, realestate_rtms, company_nps, franchise_brand) were consolidated. The breadth is real, but the count exceeds what an agent can reliably route among without collisions.
Coverage across weather (now, nowcast, 3-day, 10-day, history, warnings, UV/living indices), real estate (complexes, info, trades, rents, building registry), companies, food, tourism, air quality, and region codes is broad with search+detail flows in most domains. Minor gaps exist (e.g. transit limited to Seoul Metro, no bus/train coverage, no update/lifecycle operations since it is read-only reference data), but agents can work around them.