air-emission-facility-mcp: Instructions file for Claude Code

CLAUDE.md

air-emission-facility-mcp CLAUDE.md is an instructions file for Claude Code from hlucent/air-emission-facility-mcp. It costs 5,090 tokens per session, scanned A, original, MIT.

Project-specific instructions for developing and testing an air-emission facility MCP server, a program that connects an AI assistant to an air-emissions service.

In plain words
What is it for?
They are for guiding Claude Code through this project: reading only the development plan first, avoiding automatic Fly.io deployment, writing UTF-8 files without a byte-order mark, configuring stateless HTTP, and reporting unresolved issues.
Why use it?
They set boundaries for implementation, testing, documentation, environment-file handling, retries, web searches, and deployment commands.

Instructions file for Claude Code

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

This is hlucent/air-emission-facility-mcp's own configuration. It tells Claude Code how to work on air-emission-facility-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 air-emission-facility-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to hlucent/air-emission-facility-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/air-emission-facility-mcp/master/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/hlucent/air-emission-facility-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 air-emission-facility-mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/hlucent/air-emission-facility-mcp/claude-md.svg)](https://agentmods.dev/instructions/hlucent/air-emission-facility-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/hlucent/air-emission-facility-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/hlucent/air-emission-facility-mcp/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 5,090 This file is loaded in full into every session.
When invoked 5,090 The same file — it is already loaded in full.
Security scan A 1 finding. 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.05090 $0.05090
Opus 5 $0.02545 $0.02545
Sonnet 5 $0.01018 $0.01018
Haiku 4.5 $0.00509 $0.00509

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

Security

Grade A, and why

air-emission-facility-mcp CLAUDE.md scanned grade A with 1 finding 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 7d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -X POST http://localhost:8000/mcp/initialize \
CLAUDE.md · 613 lines

How it starts

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

Claude Code 실행 지침 — air-emission-facility-mcp

절대 규칙

  1. DEVPLAN.md 하나만 읽고 시작. 다른 문서 재탐색 금지.
  2. 웹 검색 금지. API 스펙은 DEVPLAN.md에 이미 있음.
  3. 불확실하면 추측성 재설계 대신 기본값 1개로 구현 후 DEVLOG.md에 "확인 필요" 기록.
  4. 동일 오류 최대 3회까지만 재시도. 3회 실패 시 기록하고 사용자에게 보고.
  5. Claude Code의 역할은 "코드 구현 + 로컬 실측 테스트"까지.
    • fly launch / fly secrets set / flyctl deploy 등 fly.io 관련 명령은 절대 자동 실행 금지.
    • 배포는 사용자가 PowerShell에서 직접 수행함.
    • 로컬 테스트까지 마친 후 아래 "작업 완료" 섹션 안내 문구 그대로 출력하고 정지.

기술적 필수 사항

.env 파일 처리 (BOM 문제 방지)

.env 파일을 생성하거나 갱신할 때 **반드시 UTF-8 (BOM 없음)**으로 저장한다.

# python-dotenv가 BOM을 읽지 못하는 문제 방지
# .env 값을 생성/갱신할 때:
import os

env_content = f"SEOUL_AIR_EMISSION_API_KEY={api_key}\n"
# ❌ 틀린 방법:
# with open('.env', 'w') as f:
#     f.write(env_content)  # Python 기본값이 BOM을 붙일 수 있음

# ✅ 올바른 방법:
with open('.env', 'w', encoding='utf-8') as f:
    f.write(env_content)

stateless_http=True 필수

server.py의 mcp.run() 호출에 반드시 이 옵션을 포함한다:

mcp.run(
    transport="streamable-http", 
    host="0.0.0.0", 
    port=port, 
    stateless_http=True  # ← 절대 빼지 말 것
)

이유: fly.io는 기본적으로 머신 2대(HA)를 띄우는데, streamable-http 세션이 프로세스 메모리에만 저장되면 다른 머신이 요청을 받을 때 세션을 모르고 404를 반환한다. 이 옵션 없이 배포하면 Claude.ai 커넥터에서 "사용 가능한 도구 없음" 오류가 발생한다.

API 키 취급 원칙

  • 실제 키 값은 코드에 하드코딩하지 않음. os.environ으로만 읽기.
  • .env 파일을 갱신했다는 사용자 보고 후 재테스트하기 전에, 반드시 파일이 실제로 갱신됐는지 확인할 것.
    • 파일 크기(바이트), 값의 앞 몇 글자 등으로 이전과 달라졌는지 비교.
    • 과거: 사용자가 "갱신했다"고 했으나 실제로는 파일이 그대로여서 같은 오류가 여러 번 반복된 사례 있음.

rate limit 미들웨어 (3단계)

이 MCP는 API 키 없이 공개되므로 반드시 아래 3단계 IP 기반 rate limit을 구현한다.

# server.py 상단에 미들웨어 로직 포함

# 1단계: 분당 호출 제한 (슬라이딩 윈도우)
#   - 같은 IP에서 60초 내 3회 초과 → 429 반환

# 2단계: 반복 위반 차단
#   - 1시간 내 429 응답 5회 이상 → 해당 IP 24시간 차단

# 3단계: 일일 총량 제한
#   - IP당 24시간(rolling) 기준 총 30회 초과 → 429 반환

# 구현 원칙:
# - 저장: in-memory dict/map (서버 재시작 시 초기화 허용)
# - IP 추출: X-Forwarded-For 헤더 (fly.io 프록시 환경) 또는 remote_addr
# - 응답: 429 + "Rate limit exceeded" 메시지
# - 다른 머신의 카운터와 완벽히 동기화되지 않아도 무방 (근사값 허용)

Read the full file on GitHub · 613 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. 7d ago First seen · 613 lines · 5,090 tokens per session scan A 9f8ca2740a3a

Subscribe to this mod's changes

air-emission-facility-mcp CLAUDE.md is an instructions file published in the GitHub repository hlucent/air-emission-facility-mcp (0 stars, last pushed 15d ago), licensed MIT. It adds 5,090 tokens to every session, about $0.0255 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). 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

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

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens