korea-opendata-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@korea-opendata-mcp 지금 강릉 날씨 어때? 내일 비 와?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
korea-opendata-mcp — 한국 공공 API MCP 서버
공공데이터포털(data.go.kr), 한국은행 경제통계시스템(ECOS), 서울 열린데이터광장의 오픈 API를 Claude, Cursor 같은 MCP 클라이언트에서 쓸 수 있게 해 주는 MCP 서버입니다. FastMCP로 만들었습니다.
연결하면 이런 질문에 실제 공공 데이터로 답합니다.
"지금 강릉 날씨 어때? 내일 비 와?"
"서울 미세먼지 어때? 종로구 측정소 수치는?"
"올해 남은 공휴일 알려줘"
"경복궁 근처 관광지 찾아줘", "이번 달 축제 뭐 있어?"
"최근 한 달 원/달러 환율 추이는?", "기준금리 언제 바뀌었어?"
"강남역 2호선 언제 와?"
API 키는 이 저장소에 들어 있지 않습니다. 각자 무료로 키를 발급받아 자신의 MCP 클라이언트 설정이나
.env파일에 넣어야 합니다. 서비스마다 키가 따로이고, 필요한 서비스의 키만 넣으면 됩니다.
도구
도구 | 하는 일 | 데이터 출처 | 필요한 키 |
| 현재 날씨 (기온, 습도, 강수, 바람) | 기상청 단기예보 조회서비스 |
|
| 3일 예보 (최저/최고기온, 강수확률, 하늘상태, 시간별 선택) | 기상청 단기예보 조회서비스 |
|
| 미세먼지·초미세먼지·대기질 (시도 평균, 측정소별) | 한국환경공단 에어코리아 |
|
| 공휴일·대체공휴일, 기념일, 24절기 | 한국천문연구원 특일 정보 |
|
| 관광지·음식점·숙박·문화시설 키워드 검색 | 한국관광공사 국문 관광정보 (TourAPI) |
|
| 기간별 축제·공연·행사 | 한국관광공사 국문 관광정보 (TourAPI) |
|
| 원화 환율 일별 추이 (USD, JPY, EUR, GBP, CNY) | 한국은행 ECOS |
|
| 기준금리 월별 추이와 변경 시점 | 한국은행 ECOS |
|
| 100대 경제지표 최신값 (환율, 금리, 물가, GDP, 고용 등) | 한국은행 ECOS |
|
| ECOS 통계표 코드로 직접 조회 (고급) | 한국은행 ECOS |
|
| 서울 지하철 실시간 도착 정보 | 서울 열린데이터광장 |
|
| 서비스별 키 설정 여부 (값은 숨김) | — | — |
모든 도구는 읽기 전용입니다 (
readOnlyHint).위치는 도시명(
서울,부산광역시,강릉,제주,경기등 40여 곳) 또는위도,경도(37.5665,126.9780)로 넣습니다. 날씨 도구는 좌표를 기상청 격자(nx, ny)로 자동 변환합니다.날짜는
20261114,2026-11-14둘 다 됩니다.
Related MCP server: korean-public-data-mcp
1. API 키 발급
환경변수 | 발급처 | 할 일 |
| 회원가입 후 아래 4개 API를 각각 검색해 [활용신청] 합니다. 승인은 대부분 자동이며, 반영까지 1~2시간 걸릴 수 있습니다. 마이페이지의 일반 인증키(Decoding 또는 Encoding 아무거나)를 씁니다. | |
| 회원가입 후 인증키 신청. | |
| 회원가입 후 실시간 지하철 인증키를 신청합니다 (일반 인증키와 다릅니다). |
공공데이터포털에서 활용신청할 API (검색창에 이름을 넣으세요):
기상청_단기예보 ((구)_동네예보) 조회서비스
한국환경공단_에어코리아_대기오염정보
한국천문연구원_특일 정보
한국관광공사_국문 관광정보 서비스_GW
쓰지 않을 API는 신청하지 않아도 됩니다. 그 API를 쓰는 도구만 [AUTH_ERROR]를 냅니다.
바로 시험해 보기: ECOS와 서울 열린데이터광장은 시험용 키
sample을 제공합니다.ECOS_API_KEY=sample,SEOUL_OPENAPI_KEY=sample로 설정하면 키 발급 없이 환율·금리·지하철 도구를 써 볼 수 있습니다 (제한: ECOS는 한 번에 10건, 서울 지하철은 서울역만 5건).
2. 설치
Python 3.10 이상이 필요합니다.
방법 A: uvx로 바로 실행 (설치 없이)
uv가 있으면 저장소를 내려받지 않아도 됩니다.
uvx --from git+https://github.com/myungwoon/korea-opendata-mcp korea-opendata-mcp방법 B: 저장소 클론
git clone https://github.com/myungwoon/korea-opendata-mcp.git
cd korea-opendata-mcp
python -m venv .venv# Windows
.venv\Scripts\pip install -e .
# macOS / Linux
.venv/bin/pip install -e .3. API 키 설정
서버는 아래 순서로 키를 찾고, 먼저 찾은 값을 씁니다.
환경변수 — MCP 클라이언트 설정의
env블록에 넣는 방법 (권장)KOREA_OPENDATA_ENV_FILE환경변수 또는--env-file옵션이 가리키는.env파일서버를 실행한 작업 디렉터리(또는 상위)의
.env저장소 루트의
.env(방법 B로 클론한 경우)
.env를 쓰려면 예시 파일을 복사해 쓸 서비스의 키만 채웁니다. .env는 .gitignore에 들어 있어 커밋되지 않습니다.
cp .env.example .envDATA_GO_KR_SERVICE_KEY=공공데이터포털_일반인증키
ECOS_API_KEY=한국은행_ECOS_인증키
SEOUL_OPENAPI_KEY=서울_실시간지하철_인증키공공데이터포털 키는 Decoding 키와 Encoding 키 둘 다 그대로 넣으면 됩니다 (
%가 들어 있으면 서버가 한 번 디코딩해 이중 인코딩을 막습니다).키 없이도 서버는 뜹니다. 키가 없는 서비스의 도구를 호출하면
[CONFIG_ERROR]와 발급·설정 방법을 돌려줍니다.설정 상태는
get_service_status도구로 확인할 수 있습니다.
4. MCP 클라이언트에 연결
Claude Desktop
claude_desktop_config.json에 추가합니다. 파일 위치는 설치 방식에 따라 다릅니다.
설치 방식 | 설정 파일 경로 |
Windows (claude.ai 설치 파일) |
|
Windows (Microsoft Store) |
|
macOS |
|
어느 경로인지 헷갈리면 Claude Desktop에서 설정 → 개발자 → 구성 편집(Edit Config) 을 누르세요. 앱이 실제로 쓰는 파일이 열립니다. Store 버전은
%APPDATA%\Claude\의 파일을 읽지 않습니다.
uvx 사용 시:
{
"mcpServers": {
"korea-opendata": {
"command": "uvx",
"args": ["--from", "git+https://github.com/myungwoon/korea-opendata-mcp", "korea-opendata-mcp"],
"env": {
"DATA_GO_KR_SERVICE_KEY": "공공데이터포털_일반인증키",
"ECOS_API_KEY": "한국은행_ECOS_인증키",
"SEOUL_OPENAPI_KEY": "서울_실시간지하철_인증키"
}
}
}
}클론한 경우 (경로는 자신의 위치로 바꾸세요):
{
"mcpServers": {
"korea-opendata": {
"command": "C:\\path\\to\\korea-opendata-mcp\\.venv\\Scripts\\python.exe",
"args": ["C:\\path\\to\\korea-opendata-mcp\\server.py"],
"env": { "ECOS_API_KEY": "한국은행_ECOS_인증키" }
}
}
}쓰지 않는 서비스의 키는 env에서 빼도 됩니다. 클론한 경우 env 대신 저장소 루트의 .env에 키를 넣어도 됩니다. 파일을 고친 뒤에는 Claude를 트레이 아이콘에서 완전히 종료하고 다시 켜야 적용됩니다.
Claude Code
claude mcp add korea-opendata -e DATA_GO_KR_SERVICE_KEY=키 -e ECOS_API_KEY=키 -e SEOUL_OPENAPI_KEY=키 -- uvx --from git+https://github.com/myungwoon/korea-opendata-mcp korea-opendata-mcpCursor 등 다른 클라이언트
command/args/env 형식은 위 Claude Desktop 예시와 같습니다. 클라이언트의 MCP 설정 파일(예: Cursor는 ~/.cursor/mcp.json)에 넣으세요.
HTTP로 실행
korea-opendata-mcp --transport http --port 8000 # http://127.0.0.1:8000/mcp기본은 로컬(127.0.0.1)에만 바인드합니다. 인증 기능이 없으므로 외부에 공개하려면 앞단에 인증 프록시를 두세요.
응답과 에러
실패하면 첫 줄이 대괄호 코드로 시작하고, 다음에 해볼 일을 번호로 붙입니다.
[AUTH_ERROR] 공공데이터포털 기상청 단기예보: 등록되지 않은 서비스키입니다 (SERVICE_KEY_IS_NOT_REGISTERED_ERROR).
제안:
1. data.go.kr 마이페이지에서 '기상청 단기예보' 활용신청이 승인됐는지 확인하세요 (승인 후 반영까지 최대 1~2시간).
2. DATA_GO_KR_SERVICE_KEY 에는 포털의 'Decoding' 또는 'Encoding' 일반 인증키를 그대로 넣으면 됩니다.코드 | 뜻 |
| 해당 서비스의 API 키가 설정되지 않음 |
| 키 오류, 활용신청 미승인, 호출 한도 초과 |
| 위치·날짜·코드 등 인자 오류 |
| 측정소·역 등 대상이 없음 |
| 외부 서버 장애. 대상이 없다는 뜻이 아닙니다 |
네트워크 오류와 5xx 응답은 최대 3번까지 재시도합니다.
응답을 짧게 캐시해 호출 한도를 아낍니다 (지하철 20초, 날씨·대기질 5~30분, 공휴일 하루).
API 키는 에러 메시지와 로그에 남기지 않습니다.
개발
pip install -e ".[dev]"
pytest테스트는 외부 API를 목킹하므로 키 없이 돌아갑니다.
구조
kr_opendata/
├─ app.py FastMCP 인스턴스, 실행 옵션
├─ config.py 서비스별 API 키 로딩 (환경변수 · .env)
├─ http.py 공용 호출: 재시도, 캐시
├─ providers.py data.go.kr / ECOS / 서울시 응답·오류 형식 통일
├─ geo.py 지명 → 좌표, 기상청 격자 변환, 시도명
└─ tools/ weather, air, holiday, tour, finance, subway새 공공데이터포털 API를 붙일 때는 providers.data_go_kr()로 호출하고 items_of()로 목록을 꺼내면 인증·오류 처리를 그대로 재사용할 수 있습니다.
데이터 출처와 이용 조건
기상청, 한국환경공단, 한국천문연구원, 한국관광공사 데이터: 공공데이터포털
경제 통계: 한국은행 경제통계시스템(ECOS)
지하철 실시간 도착: 서울 열린데이터광장
각 서비스의 이용약관을 따르고 출처를 표기하세요. 에어코리아 실시간 자료는 확정되지 않은 측정값입니다. 이 프로젝트는 위 기관들과 관련이 없는 비공식 도구입니다.
라이선스
Available Tools
12 toolsget_air_qualityGet Air QualityARead-onlyIdempotent
미세먼지(PM10·PM2.5)와 대기질을 시도별 실시간 측정값으로 조회합니다. 시도 평균과 등급을 함께 돌려줍니다.
Inputs: region (required), station. Returns: object
get_base_rateGet Base RateARead-onlyIdempotent
한국은행 기준금리의 월별 추이와 변경 시점을 조회합니다.
Inputs: months. Returns: object
get_exchange_rate_historyGet Exchange Rate HistoryARead-onlyIdempotent
한국은행 매매기준율(원화 환율) 일별 시계열을 조회합니다. 영업일 기준이라 주말·공휴일은 빠집니다.
Inputs: currency, end_date, start_date. Returns: object
get_holidaysGet HolidaysARead-onlyIdempotent
공휴일·대체공휴일, 기념일, 24절기 날짜를 조회합니다.
Inputs: kind, year, month. Returns: object
get_key_statisticsGet Key StatisticsARead-onlyIdempotent
한국은행 100대 통계지표(최신값)를 조회합니다. 환율·금리·물가·GDP·고용 등 주요 경제지표를 한 번에 볼 수 있습니다.
Inputs: category. Returns: object
get_service_statusGet Service StatusARead-onlyIdempotent
어떤 서비스의 API 키가 설정됐는지(값은 숨김)와 서비스별 사용 가능한 도구를 보여줍니다. 도구가 키 오류를 낼 때 먼저 확인하세요.
Inputs: no named parameters. Returns: object
get_subway_arrivalGet Subway ArrivalBRead-onlyIdempotent
서울 지하철역의 실시간 열차 도착 정보를 조회합니다 (호선, 방면, 도착 예정, 현재 위치).
Inputs: station (required), line. Returns: object
get_weather_forecastGet Weather ForecastARead-onlyIdempotent
단기예보(최대 3일)를 날짜별 최저/최고기온, 강수확률, 하늘상태로 요약합니다.
Inputs: location (required), days, include_hourly. Returns: object
get_weather_nowGet Weather NowARead-onlyIdempotent
현재 날씨(초단기실황: 기온, 습도, 강수, 바람)를 조회합니다. 기상청 실측 자료입니다.
Inputs: location (required). Returns: object
search_ecos_statisticSearch Ecos StatisticBRead-onlyIdempotent
ECOS 통계표를 코드로 직접 조회합니다 (고급). 통계표·항목 코드는 ECOS 개발 가이드에서 확인합니다.
Inputs: end (required), cycle (required), start (required), stat_code (required), +3 more. Returns: object
search_festivalsSearch FestivalsARead-onlyIdempotent
기간으로 전국 축제·공연·행사를 검색합니다.
Inputs: page, end_date, per_page, start_date. Returns: object
search_tour_spotsSearch Tour SpotsBRead-onlyIdempotent
키워드로 관광지·음식점·숙박·문화시설 등을 검색합니다 (주소, 전화, 좌표, 대표 이미지).
Inputs: keyword (required), page, per_page, content_type. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
The weather pair (now vs. 3-day forecast) and the tourism pair (spots vs. festivals) are cleanly separated, and get_service_status is clearly a diagnostic meta-tool. However, four tools sit in an overlapping Bank of Korea cluster: get_base_rate, get_exchange_rate_history, get_key_statistics, and search_ecos_statistic can all surface rate/inflation/exchange-rate data, so an agent asking for 'interest rates' or 'exchange rate' has several plausible entry points (descriptions mitigate this somewhat but the boundary between the convenience tools and the raw ECOS lookup is blurry).
Every tool follows a strict snake_case verb_noun pattern: get_* for single-resource retrieval (get_base_rate, get_weather_now, get_holidays, get_subway_arrival) and search_* for query tools (search_tour_spots, search_festivals, search_ecos_statistic). No camelCase or mixed verb styles anywhere, so the action type is predictable from the name alone.
12 tools is squarely in the well-scoped range and each maps to a distinct public-data domain (weather, air quality, calendar, tourism, festivals, BOK economics, subway). Nothing feels padded: even the meta get_service_status tool earns its place as a first-stop diagnostic.
Coverage across Korean public data is broad and mostly closed-loop: current + forecast weather, air quality, holidays, tourism/festival search, economic series, and real-time subway. Minor gaps remain — no location/region-based filtering for tourism or weather, no bus or non-Seoul transit, and no detail endpoint for a specific tour spot or festival beyond search results — but agents can work around these.
Maintenance
Related MCP Connectors
Korea-native MCP gateway: Korean commerce, payments, messaging, gov & finance APIs for AI agents.
Korean company facts in English for AI agents: ~830 KOSPI-listed companies (DART profiles, KRW financials, recent filings) and ~110,000 corporate public procurement suppliers (12-month KONEPS contract awards), plus live National Tax Service business status checks. 4 tools, keyless, read-only.
Seoul Open Data MCP — city data for Seoul via the Seoul Open Data Plaza API (openapi.seoul.go.kr).…
The official Model Context Protocol server for Ambee. It gives any MCP-compatible AI assistant — Claude, ChatGPT, Cursor, VS Code, Ollama, and more direct access to live air quality, pollen, and weather data. To get started, including information on signing up and obtaining your Ambee key, check out the Ambee documentation on https://docs.ambeedata.com
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables querying Korean public datasets (apartment prices, weather, air quality) via natural language using an MCP server and local LLM agent.5-
- AlicenseNot gradedqualityCmaintenanceEnables AI to query real-time Korean public data including weather, real estate prices, air quality, economic indicators, and business registration via natural language.1MIT
- AlicenseNot gradedqualityCmaintenanceBridges Korean public data APIs (data.go.kr) into MCP with automatic OpenAPI normalization, quota management, caching, and backoff. Enables natural language interaction with Korean government data through MCP.37 PyPIApache 2.0
- FlicenseNot gradedqualityCmaintenanceEnables Claude Code to query real-time Korean weather, air quality, and monitoring station information through natural language, using public data APIs with caching and error handling.-