airkorea-realtime-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., "@airkorea-realtime-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.
⚠️ Service Termination Notice This MCP server ended its fly.io deployment on 2026-08-23. The code remains in the repository for development reference.
airkorea-realtime-mcp
An MCP server that queries real-time air pollution information, Comprehensive Air-quality Index (CAI), and monitoring station information from the Korea Environment Corporation's AirKorea OpenAPI.
Provided Tools (5)
Tool | Description |
| Queries real-time air pollution measurement data (SO2/CO/O3/NO2/PM10/PM2.5, Comprehensive Air-quality Index) for a station by station name |
| Queries real-time measurement data for all stations in a province by province name |
| Queries real-time Comprehensive Air-quality Index (CAI) by station name |
| Searches station list/coordinates by address or station name |
| Queries nearby stations and distances by input coordinates |
Related MCP server: seoul-air-quality-mcp
Data Source
Provider: Korea Environment Corporation, Climate & Air Quality Bureau, Air Environment Division, Air Policy Support Department
Platform: Public Data Portal (data.go.kr)
Service Group: Korea Environment Corporation_AirKorea_Air Pollution Information, Korea Environment Corporation_AirKorea_Station Information, Korea Environment Corporation_AirKorea_Comprehensive Air-quality Index (CAI) Inquiry Service (service group code
B552584)License Scope: Attribution-NoDerivatives (obligation to indicate the data source (Ministry of Environment/Korea Environment Corporation))
Measurement Units and Grade Criteria
Item | SO2 | CO | O3 | NO2 | PM10 | PM2.5 |
Unit | ppm | ppm | ppm | ppm | ㎍/㎥ | ㎍/㎥ |
Grade values: 1=Good, 2=Moderate, 3=Unhealthy, 4=Very Unhealthy
Known Limitations (verified through actual measurements)
Station list (
search_stations) coordinate axes: When called withver=1.1fixed,dmX=longitude,dmY=latitude confirmed normal (cross-validated with 5 different stations). Based on WGS84.Nearby station lookup (
get_nearby_stations) coordinate system: Entering WGS84 lat/long directly produces completely wrong results (e.g., entering Gangnam-gu, Seoul coordinates returns Jeju Island stations), as verified by actual measurement. TM Central Belt (EPSG:5181) coordinate conversion is mandatory, and this server automatically converts WGS84→EPSG:5181 using pyproj before calling the API (the user only needs to enter lat/long). Entering Gangnam-gu Office coordinates (37.515336, 127.049357) returned the Gangnam-gu station at the top with a distance of 0.4km, validating conversion accuracy.CAI lookup (
get_station_cai) response fields: Unlike the specification table (khaiValue/khaiGrade/khaiItem), the actual field names arecaiValue/caiGrade/caiItem. The full fields arestationCode,stationName,mangName,dataTime,caiValue,caiGrade,caiItem(individual pollutant fields such as so2Value are not included in this operation's response).CAI lookup normal resultCode: The other 4 operations return
resultCode="00"on success, but onlygetMsrstnKhaiRltmDnsty(CAI) responds withresultCode="200",resultMsg="NORMAL_CODE"on success. The server code is designed to also treatresultMsgvalues of"NORMAL_CODE"/"NORMAL SERVICE"as normal.items response structure difference:
ArpltnInforInqireSvc/MsrstnInfoInqireSvchaveitemsas an array, whileRltmKhaiInfoSvc(CAI) wraps it one level deeper asitems.item. The server absorbs this difference and always returns an array.Missing value representation: In this measurement range (normal air quality data), no
"-"missing cases appeared, but based on the specification examples,_safe_numericis implemented to safely convert"-"/None/empty strings/floats all toNone(not arbitrarily replacing with 0).API server stability:
SERVICETIMEOUT_ERROR(error code 05, HTTP 504) was frequently observed during measurement. The server automatically retries up to 3 times for code 05 only.sidoName "전남광주": Queries successfully (reflecting the 2026 launch of Jeonnam-Gwangju Special City, totalCount of 64 confirmed).
Environment Variables
Variable | Description |
| AirKorea service key issued from the Public Data Portal (Decoding key) |
Installation and Execution (Local)
pip install -r requirements.txt --break-system-packages
cp .env.example .env # AIRKOREA_SERVICE_KEY 값 입력
python server.pyDeployment (fly.io)
fly launch --no-deploy
# fly.toml이 [http_service] 방식인지 확인 후
fly secrets set AIRKOREA_SERVICE_KEY=발급받은키
flyctl deployClaude.ai Connector Connection
After deployment, connect by appending /mcp to the address.
https://airkorea-realtime-mcp.fly.dev/mcpRate Limit Policy
Since this is a public server accessible by URL alone without an API key, a 3-tier IP-based rate limit applies.
More than 3 requests per minute returns 429 (may be effectively relaxed in proportion to the number of machines in multi-machine deployments)
Receiving 429 five or more times within an hour results in a 24-hour block
More than 30 total requests per day (rolling 24 hours) returns 429
Error Codes
This API uses the Public Data Portal standard error code system (different from Seoul Open Data Plaza's INFO-000/ERROR-3xx system).
Code | Meaning |
00 | Normal |
03 | No Data |
10 | Invalid request parameter |
11 | Required parameter missing |
20 | Service access denied (no usage application) |
22 | Daily traffic limit exceeded |
30 | Unregistered service key |
31 | Service key usage period expired |
Related Projects
The AirKorea OpenAPI is large in scale, so it is developed as 3 separate independent MCPs:
Stage | Repository | Scope |
Stage 1 (this project) |
| Real-time measurement data, CAI, station information |
Stage 2 |
| Air quality forecast, fine dust alerts, ozone·yellow dust advisories |
Stage 3 |
| Province·station statistics (daily/monthly averages), stations with CAI of Unhealthy or worse |
License
MIT (code) / KOGL Type 1 (Attribution) compliance — data source (Ministry of Environment/Korea Environment Corporation) attribution required
This server cannot be deployed
Maintenance
Related MCP Connectors
Free, keyless real-time air quality (US AQI plus PM2.5, PM10, ozone, NO2, SO2, CO) for any city.
Access UK air quality data, monitoring sites, and hourly pollutant measurements across regions
Air Quality MCP — wraps air-quality-api.open-meteo.com (free, no auth)
Find air-quality stations and read pollutant observations from government monitors via OpenAQ v3.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceProvides real-time Air Quality Index data from the World Air Quality Index service, enabling queries by location, station, or keyword search.6 npmMIT
- FlicenseNot gradedqualityBmaintenanceMCP 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.-
- AlicenseNot gradedqualityBmaintenanceEnables querying real-time air quality data by region in Seoul, South Korea, using the Seoul Open Data Platform API, supporting multiple regions and monitoring stations.MIT
- AlicenseNot gradedqualityCmaintenanceEnables querying Korean air quality forecasts, weekly ultrafine dust forecasts, high-concentration PM2.5 forecasts, particulate matter alarm statuses, ozone advisories, and yellow dust advisories from the AirKorea OpenAPI.MIT