Skip to main content
Glama

Gyeongbuk MCP

CI License: MIT

A FastMCP server that provides Gyeongbuk regional and public data to AI agents.

It currently provides hospitals, bus stops, traditional markets, age-group population ratios, regional safety ratings, and a market-centered living-area recommendation tool for elderly people without cars. In the default execution mode, public data source files are converted to SQLite and queried, so no API authentication key or external server connection is required. For each tool's inputs and outputs and data limitations, see docs/.

Quick Start

Python 3.12 or later and uv are required.

make sync
make data-setup
make run

make data-setup downloads the official sources pinned in data/sources.toml, verifies their SHA-256 and file format, and then creates a local SQLite database. No API authentication key is required. The source files and the generated DB are not included in Git or GitHub Releases.

The snapshot generated from the currently downloaded sources includes 3,415 hospitals and clinics in Gyeongbuk, 16,031 medical department entries, 29,735 bus stops in Gyeongbuk, 53 Pohang routes and 196 route patterns, 51 Pohang routes for which dispatch intervals can be determined, 132 traditional markets, 3,949 age-group entries, and 138 regional safety ratings.

Copy the example configuration if needed. File mode does not require an authentication key.

cp .env.example .env
DATA_MODE=file
LOCAL_DATABASE_PATH=data/processed/gyeongbuk.sqlite3

Set DATA_MODE=api and DATA_GO_KR_SERVICE_KEY only when using API mode temporarily. API mode applies only to hospital, bus stop, and market lookups; population and safety tools continue to use the local SQLite database. .env is excluded from Git, and shell/CI environment variables with the same name take precedence over .env.

Related MCP server: pubdata-mcp

Registering an MCP Client

Register it in the stdio MCP configuration as follows. Replace /absolute/path/gyeongbuk-mcp with the absolute path of your actual repository.

{
  "mcpServers": {
    "gyeongbuk": {
      "command": "uv",
      "args": [
        "--directory",
        "/absolute/path/gyeongbuk-mcp",
        "run",
        "fastmcp",
        "run",
        "src/server.py"
      ]
    }
  }
}

Commands

make run          # stdio MCP 서버 실행
make data-fetch   # 고정된 공식 원본 다운로드·검증
make data-check   # 네트워크 없이 기존 원본 검증
make data         # 기존 원본에서 로컬 SQLite 재생성
make data-setup   # 원본 다운로드 후 SQLite 생성
make format       # Ruff로 포매팅
make format-check # 포맷 변경 없이 검사
make lint         # Ruff 린트
make typecheck    # mypy 타입 체크
make test         # pytest 테스트
make audit        # Python 의존성 취약점 검사
make check        # 포맷, 린트, 타입, 테스트 전체 검사
make pre-commit   # 모든 파일에 pre-commit 훅 실행

Each command can also be run directly with uv run ....

To contribute, see CONTRIBUTING.md; to report vulnerabilities, see SECURITY.md.

Structure

src/
├── server.py       # FastMCP 서버 진입점
├── tools/          # MCP 도구 정의
├── services/       # 비즈니스 로직
├── clients/        # 외부 API 클라이언트
└── models/         # 입력/출력 모델
tests/
docs/                 # 도구 계약, 데이터 출처, 구현 계획
data/
├── raw/              # 직접 내려받은 원본(커밋 제외)
├── reference/        # 출처가 명시된 작은 보조 매핑
└── processed/        # 생성된 SQLite(커밋 제외)
scripts/
└── build_snapshot.py # 파일 정규화 진입점

License

The source code is distributed under the MIT License. The MIT license does not apply to the public data sources, the generated SQLite database, or the derived review materials in data/reference/, which are subject to each provider's terms of use. See DATA_LICENSES.md for detailed attribution and redistribution policies.

Available Tools

6 tools
get_age_population_ratioC

Return the resident-population share for an inclusive age range.

Inputs: region (required), as_of, age_to, age_from. Returns: Population count and share for one inclusive age range.

get_safety_gradeC

Return an official relative safety grade; lower grades are safer.

Inputs: region (required), category, publication_year. Returns: Relative regional safety grade for one official safety category.

recommend_car_free_neighborhoodsC

Rank market-centered areas that pass hospital and bus constraints.

Inputs: region, service_day, result_limit, candidate_limit, +3 more. Returns: Ranked car-free neighborhood candidates.

search_nearby_bus_stopsB

Find nearby stops meeting an estimated daily-service threshold.

Inputs: latitude (required), longitude (required), service_day, max_walk_minutes, +1 more. Returns: Nearby bus-stop search result.

search_nearby_hospitalsB

Find hospitals within an estimated straight-line walking time.

Inputs: latitude (required), longitude (required), department_code, max_walk_minutes, +1 more. Returns: Nearby hospital search result with calculation metadata.

search_nearby_marketsA

Find registered traditional markets within an estimated walking time.

Inputs: region (required), latitude (required), longitude (required), max_walk_minutes. Returns: Nearby traditional-market search result.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool targets a distinctly different concern: hospital proximity, bus-stop coverage, market-walkability, overall neighborhood recommendation, age ratio, and safety grade. Even the similar 'search_nearby_*' tools are clearly separable by resource type.

    Naming Consistency5/5

    All tool names follow a consistent snake_case verb_noun pattern: search_nearby_*, recommend_*, and get_*. The naming is predictable and makes the tool surface easy to navigate.

    Tool Count5/5

    Six tools is a well-scoped size for this domain. Each tool fills a clear role in the workflow of finding and justifying car-free neighborhoods, with no padding or obvious duplication.

    Completeness4/5

    The set covers the core workflow: find nearby amenities, receive neighborhood recommendations, and retrieve demographic or safety context. It is not a CRUD system, so no create/update/delete is needed, though richer facility details or result filtering could add depth.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      D
      maintenance
      Enables querying Korean public datasets (apartment prices, weather, air quality) via natural language using an MCP server and local LLM agent.
      5
      -
    • A
      license
      Not graded
      quality
      C
      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
      Not graded
      quality
      C
      maintenance
      Korean public-data MCP servers for AI agents, enabling natural language queries to KOSIS statistics and other Korean official data sources without requiring local accounts or API keys.
      -