Skip to main content
Glama
hlucent

seoul-realtime-air-by-region-mcp

by hlucent

seoul-realtime-air-by-region-mcp

서울시 권역별(도심권/동북권/동남권/서북권/서남권) 실시간 대기환경 현황을 조회하는 MCP 서버입니다. 서울 열린데이터광장의 RealtimeCityAir API를 기반으로 합니다.

제공 툴

get_realtime_air_by_region

권역별(또는 특정 권역/측정소) 실시간 대기환경 현황을 조회합니다.

파라미터

필수

설명

sarea_nm

선택

권역명 — 도심권/동북권/동남권/서북권/서남권 중 하나. 생략 시 전체 권역

msrstn_nm

선택

측정소명. sarea_nm 없이 단독 사용 불가 (아래 제약사항 참고)

start_index, end_index

선택

조회 범위 (기본값 1~25, 서울시 전체 측정소 수 기준)

반환 필드: 측정일시(MSRMT_DT), 권역(SAREA_NM), 측정소(MSRSTN_NM), 미세먼지(PM, ㎍/㎥), 초미세먼지(FPM, ㎍/㎥), 오존(OZON, ppm), 이산화질소(NTDX, ppm), 일산화탄소(CBMX, ppm), 아황산가스(SPDX, ppm), 통합대기환경등급(CAI_GRD), 통합대기환경지수(CAI_IDX), 지수결정물질(CRST_SBSTN)

list_available_regions

조회 가능한 권역명 5개(도심권/동북권/동남권/서북권/서남권) 고정 목록을 반환합니다. API 호출 없음.

Related MCP server: mcp-waqi

실측으로 확인된 제약사항

  • 인증키는 URL 경로 세그먼트로 전달합니다 (/{KEY}/json/RealtimeCityAir/...), 쿼리 파라미터가 아닙니다.

  • msrstn_nmsarea_nm 없이 단독으로 사용할 수 없습니다. API 경로 구조상 선택 파라미터는 SAREA_NM 자리 → MSRSTN_NM 자리 순서로 고정되어 있어, sarea_nm을 생략하고 msrstn_nm만 넘기면 그 값이 SAREA_NM 자리로 해석되어 INFO-200(데이터 없음)이 반환됩니다. 이 서버는 msrstn_nm만 지정된 요청을 API 호출 전에 걸러 명확한 에러로 안내합니다.

  • start_index/end_index 범위를 넓히면 실제로 여러 건이 정상 반환됩니다 (전체 조회 시 25건 확인).

  • 정상 응답은 JSON이지만, 인증키 오류(INFO-100) 등 일부 에러 응답은 TYPE=json 요청에도 XML로 돌아옵니다. 이 서버는 JSON 파싱 실패 시 XML <CODE>/<MESSAGE>를 추출하는 폴백 파서를 사용합니다.

  • CAI_GRD(통합대기환경등급) 값은 실측 시점 기준 "좋음", "보통"이 확인되었습니다("나쁨"/"매우나쁨"은 실측 시점에 관측되지 않았으나 명세상 존재 가능).

설치 및 실행 (로컬)

git clone https://github.com/hlucent/seoul-realtime-air-by-region-mcp.git
cd seoul-realtime-air-by-region-mcp
pip install -r requirements.txt
cp .env.example .env  # SEOUL_API_KEY 값 입력
python server.py

환경변수

변수명

설명

SEOUL_API_KEY

서울 열린데이터광장에서 발급받은 인증키

PORT

서버 포트 (fly.io 배포 시 기본 8000)

배포 (fly.io)

fly launch --no-deploy
fly secrets set SEOUL_API_KEY=<발급받은키>
flyctl deploy

배포 후 Claude.ai 커넥터 연결 시 아래 형태로 /mcp 경로를 붙여 등록합니다:

https://<앱이름>.fly.dev/mcp

보안

인증키 없이 공개되는 서버로, IP 기반 3단계 rate limit이 적용되어 있습니다 (분당 3회 — 멀티 머신 배포 시 머신 수에 비례해 실질 완화될 수 있음, 시간당 5회 위반 시 24시간 차단, 일 30회 총량 제한).

IP는 Fly-Client-IP 헤더(fly.io 엣지가 직접 설정, 클라이언트 위조 불가)를 우선 사용합니다. rate limit 카운터는 인메모리(dict)로 프로세스별로 유지되며 머신 간 공유되지 않으므로, fly.io가 요청을 여러 머신에 분산하는 경우 동일 IP 기준 실질 제한이 "분당 3회 × 실행 중인 머신 수"로 완화될 수 있습니다. 이는 외부 저장소 없이 in-memory로 구현하기로 한 설계상 트레이드오프입니다.

라이선스

MIT License. 원본 데이터는 공공누리 1유형을 따릅니다.

A
license - permissive license
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Servers

  • A
    license
    -
    quality
    D
    maintenance
    Enables AI to query real-time Korean public data including weather, real estate prices, air quality, economic indicators, and business registration via natural language.
    1
    MIT
  • F
    license
    -
    quality
    B
    maintenance
    MCP server for querying Seoul's official air quality data, including real-time and hourly measurements by district. Enables AI assistants to answer questions about fine dust and air pollution using public data from Seoul Open Data Plaza.
  • A
    license
    A
    quality
    B
    maintenance
    Provides real-time Seoul city data including population congestion, traffic, parking, transit, bikes, EV chargers, weather, events, commercial, accidents, alerts, and news across 121 locations using Seoul Open Data API.
    3
    0
    1
    MIT

View all related MCP servers

Related MCP Connectors

  • Find air-quality stations and read pollutant observations from government monitors via OpenAQ v3.

  • Air Quality MCP — wraps air-quality-api.open-meteo.com (free, no auth)

  • EPA AirNow MCP — official US real-time AQI + forecast (free key)

View all MCP Connectors

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/hlucent/seoul-realtime-air-by-region-mcp'

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