airkorea-realtime-mcp: Instructions file for Claude Code

CLAUDE.md

airkorea-realtime-mcp CLAUDE.md is an instructions file for Claude Code from hlucent/airkorea-realtime-mcp. It costs 2,847 tokens per session, scanned A, original, MIT.

A Korean-language repository instruction file for an AirKorea real-time MCP server, which provides public air-quality data through the Model Context Protocol. It sets rules for implementation, testing, API response parsing, and Fly.io deployment preparation.

In plain words
What is it for?
Use it when modifying the server, reading its development plan, parsing AirKorea responses, testing locally, or preparing—but not performing—Fly.io deployment.
Why use it?
It reduces implementation mistakes by requiring a fixed reading order, JSON and XML error handling, local tests, and specific server settings for stateless deployment.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md.

This is hlucent/airkorea-realtime-mcp's own configuration. It tells Claude Code how to work on airkorea-realtime-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything airkorea-realtime-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to hlucent/airkorea-realtime-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/hlucent/airkorea-realtime-mcp/master/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/hlucent/airkorea-realtime-mcp

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for airkorea-realtime-mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/hlucent/airkorea-realtime-mcp/claude-md/github.svg)](https://agentmods.dev/instructions/hlucent/airkorea-realtime-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/hlucent/airkorea-realtime-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/hlucent/airkorea-realtime-mcp/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for airkorea-realtime-mcp CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/hlucent/airkorea-realtime-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/hlucent/airkorea-realtime-mcp/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,847 This file is loaded in full into every session.
When invoked 2,847 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.02847 $0.02847
Opus 5 $0.01424 $0.01424
Sonnet 5 $0.00569 $0.00569
Haiku 4.5 $0.00285 $0.00285

Measured 8d ago against content hash acf8795bf354, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

airkorea-realtime-mcp CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 232 lines

How it starts

The opening of the file, as written. The whole thing — 232 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md — airkorea-realtime-mcp

절대 규칙

  • DEVPLAN.md 하나만 먼저 읽고 시작한다. 다른 문서 재탐색 금지.
  • 웹서치 금지 (API 스펙은 DEVPLAN.md에 이미 있음).
  • 불확실하면 추측성 재설계 대신 기본값 1개로 구현 후 DEVLOG.md에 "확인 필요"로 기록.
  • 동일 오류 최대 3회까지만 재시도. 3회 실패 시 기록하고 사용자에게 보고.
  • 역할은 "코드 구현 + 로컬 실측 테스트"까지다. fly launch, fly secrets set, flyctl deploy, fly logs 등 fly.io 관련 명령은 절대 스스로 실행하지 않는다.
  • 배포 준비(코드 구현, 로컬 테스트, git commit/push)가 끝나면 아래 "작업 순서"의 정지 시점에서 멈추고, "사용자 안내 문구"를 그대로 출력한다.

기술적으로 반드시 적용할 것

.env

BOM 없는 UTF-8로 저장한다.

# [System.IO.File]::WriteAllText(경로, "KEY=값", [System.Text.UTF8Encoding]::new($false))

server.pymcp.run()은 항상 stateless_http=True 포함

mcp.run(transport="streamable-http", host="0.0.0.0", port=port, stateless_http=True)

이유: fly.io는 기본 2대 머신(고가용성)을 띄우므로, 세션이 프로세스 인메모리에만 저장되면 다른 머신으로 라우팅될 때 404가 발생한다. 이 옵션 누락 시 Claude.ai 커넥터에서 "사용 가능한 도구 없음"으로 보이는 문제가 발생한 전례가 있으므로 절대 빠뜨리지 않는다.

응답 파싱: JSON 우선, XML 폴백 필수

returnType=json으로 요청해도 일부 에러 응답은 XML로 돌아올 수 있다 (다른 공공 API에서 실측 확인된 패턴). response.json()ValueError를 던지면 정규식으로 <resultCode>/<resultMsg> 패턴을 추출하는 폴백을 반드시 구현한다.

import re

def parse_response(text: str) -> dict:
    try:
        return json.loads(text)
    except ValueError:
        code_match = re.search(r"<resultCode>(.*?)</resultCode>", text)
        msg_match = re.search(r"<resultMsg>(.*?)</resultMsg>", text)
        return {
            "response": {
                "header": {
                    "resultCode": code_match.group(1) if code_match else "99",
                    "resultMsg": msg_match.group(1) if msg_match else "UNKNOWN_XML_RESPONSE",
                }
            }
        }

이 API의 에러코드 체계 (DEVPLAN.md 1-6절 참고)

서울시 계열(INFO-000/ERROR-3xx)과 다른 공공데이터포털 표준 방식이다. resultCode가 "00"이 아니면 에러로 처리하고, resultMsg를 그대로 사용자에게 전달한다. HTTP status는 정상 요청/에러 요청 모두 200에 가까우므로 반드시 body의 resultCode로 판단해야 한다.

숫자/결측 필드는 항상 안전하게 변환

이 API는 결측치가 문자열 "-"로 오는 사례가 명세서 예제에서 실제로 확인되었다 (<khaiValue>-</khaiValue>). 다른 프로젝트에서 확인된 null/빈 문자열/실수(float) 패턴에 더해 이 "-" 케이스까지 처리하는 안전 변환 함수를 반드시 넣는다:

Read the full file on GitHub · 232 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 232 lines · 2,847 tokens per session scan A acf8795bf354

Subscribe to this mod's changes

airkorea-realtime-mcp CLAUDE.md is an instructions file published in the GitHub repository hlucent/airkorea-realtime-mcp (0 stars, last pushed 17d ago), licensed MIT. It adds 2,847 tokens to every session, about $0.0142 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

vibe-coding-prompt-template backend.instructions.md

Instructions for KhazP/vibe-coding-prompt-template: Read AGENTS.md, agentdocs/techstack.md, and agentdocs/codepatterns.md.

KhazP/vibe-coding-prompt-template · 139 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens