Skip to main content
Glama
Datagov Israel MCP

Datagov Israel MCP

by aviveldan

DataGov Israel MCP 서버

이스라엘 정부 오픈 데이터(data.gov.il)를 탐색하기 위한 MCP 서버입니다. MCP Apps 기반의 대화형 시각화 기능이 내장되어 있습니다.

AI 어시스턴트를 통해 수천 개의 공공 데이터셋을 검색하고, 구조를 프로파일링하며, 차트를 생성하고, 지도에 지리 데이터를 표시할 수 있습니다.

Tests Python 3.10+ License: MIT


무엇을 할 수 있나요?

🏠 주택 시장 탐색

공공 주택 데이터셋을 프로파일링하여 유닛 크기, 위치 및 가용성을 파악하세요:

Dataset Profile — Public Housing

정부 주택 추첨에서 어떤 도시의 수요가 가장 많은지 확인하세요:

Housing Lottery Subscribers by City

전국 아파트 크기 분포를 이해하세요:

Distribution of Public Housing Unit Sizes

시간에 따른 주택 가용성을 추적하세요:

Housing Units Available per Lottery

🗺️ 공공 인프라 지도화

이스라엘 전역의 교육 기관을 시각화하세요:

Education Institutions Map

대중교통 정류장을 표시하세요:

Public Transport Stations


Related MCP server: data-gov-il-mcp

빠른 시작

설치

git clone https://github.com/aviveldan/datagov-mcp.git
cd datagov-mcp

# Create virtual environment and install (requires uv)
uv venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
uv pip install -e ".[dev]"

Claude Desktop과 함께 사용하기

fastmcp install claude-desktop server.py

Claude Desktop을 재시작하면 DataGovIL 도구를 즉시 사용할 수 있습니다.

MCP Inspector로 테스트하기

fastmcp dev inspector server.py

웹 UI가 열리면 도구를 탐색하고, 대화형으로 테스트하며, Apps 탭에서 MCP 앱 시각화를 미리 볼 수 있습니다.

fastmcp dev apps 사용하기

대화형 시각화 앱을 로컬에서 미리 보세요:

fastmcp dev apps server.py

예시: 부동산 기회 찾기

이스라엘 주택 시장을 탐색하는 사용자를 위한 실제 워크플로우입니다:

You: "Search for discounted housing lottery datasets"

→ package_search(q="דירה בהנחה")
  Found: "נתונים תקופתיים - תכנית דירה בהנחה" (Discounted Housing Program)
  Resource ID: 7c8255d0-49ef-49db-8904-4cf917586031

You: "Profile this dataset so I can understand what fields are available"

→ dataset_profile(resource_id="7c8255d0-49ef-49db-8904-4cf917586031")
  Shows: LamasName (city), Subscribers, Winners, PriceForMeter,
         LotteryHousingUnits, ProjectName, Neighborhood...

You: "Show me which cities have the most subscribers competing for units"

→ chart_generator(
    resource_id="7c8255d0-49ef-49db-8904-4cf917586031",
    chart_type="bar",
    x_field="LamasName",
    y_field="Subscribers",
    title="Housing Lottery Subscribers by City"
  )
  → Interactive bar chart rendered in MCP Apps UI

You: "Now show the public housing units — map them and show me sizes"

→ dataset_profile(resource_id="c3a68837-9b7a-4ee7-bd92-130678dc8ae3")
  Shows: CityLmsName, NumOfRooms (avg 2.4), Floor, TotalArea (21-110 m²)...

→ chart_generator(
    resource_id="c3a68837-9b7a-4ee7-bd92-130678dc8ae3",
    chart_type="histogram",
    x_field="TotalArea",
    title="Distribution of Housing Unit Sizes (m²)"
  )
  → Most units are 48-57 m², with a long tail up to 110 m²

통찰: 아슈켈론(Ashkelon)이나 스데로트(Sderot) 같은 도시는 추첨당 25,000~35,000명의 신청자가 몰려 경쟁이 매우 치열합니다. 반면 외곽의 작은 도시들(움 알-파흠, 나사렛)은 훨씬 적습니다. 위치 선택이 자유롭다면 당첨 확률을 크게 높일 수 있습니다.


사용 가능한 도구

핵심 데이터 도구

도구

설명

status_show

CKAN 버전 및 사이트 정보 가져오기

license_list

사용 가능한 데이터셋 라이선스 목록

package_list

모든 데이터셋 ID 가져오기

package_search

필터 및 정렬을 사용하여 데이터셋 검색

package_show

특정 데이터셋의 상세 메타데이터 가져오기

organization_list

모든 조직 목록

organization_show

특정 조직의 세부 정보 가져오기

resource_search

데이터셋 내 리소스 검색

datastore_search

특정 리소스 내 데이터 쿼리

fetch_data

편리 도구 — 이름으로 데이터셋을 찾아 데이터 가져오기

시각화 도구 (MCP Apps) 📊

MCP 호환 클라이언트에서 대화형 UI를 직접 렌더링합니다.

dataset_profile

데이터셋을 프로파일링하여 구조와 품질을 파악합니다.

  • 감지된 필드: integer, number, string, coordinate

  • 통계: min, max, mean, null count, unique values

  • 출력: 검색/필터 기능이 포함된 대화형 DataTable

dataset_profile(resource_id="c3a68837-9b7a-4ee7-bd92-130678dc8ae3", sample_size=200)

chart_generator

모든 데이터셋에서 대화형 차트를 생성합니다.

차트 유형

사용 사례

histogram

수치 값의 분포 (예: 아파트 크기)

bar

카테고리 비교 (예: 도시별 신청자 수)

line

시간 경과에 따른 추세 (예: 추첨당 주택 수)

scatter

두 수치 필드 간의 상관관계

chart_generator(
  resource_id="7c8255d0-49ef-49db-8904-4cf917586031",
  chart_type="bar",
  x_field="LamasName",
  y_field="Subscribers",
  title="Housing Lottery Subscribers by City",
  limit=50
)

map_generator

대화형 Leaflet 지도에 지리 데이터를 표시합니다.

map_generator(
  resource_id="e873e6a2-66c1-494f-a677-f5e77348edb0",
  lat_field="Lat",
  lon_field="Long",
  limit=500
)

유용한 리소스 ID

시작하기 좋은 흥미로운 데이터셋들입니다:

데이터셋

리소스 ID

용도

✈️ 항공편 (טיסות)

e83f763b-b7d7-479e-b172-ae981ddc6de5

항공사별 막대 차트

🏠 공공 주택 (דיור ציבורי)

c3a68837-9b7a-4ee7-bd92-130678dc8ae3

히스토그램, 프로파일링

🎰 주택 추첨 (דירה בהנחה)

7c8255d0-49ef-49db-8904-4cf917586031

막대/선 차트

🚌 교통 정류장 (תחנות)

e873e6a2-66c1-494f-a677-f5e77348edb0

지도 (위도/경도 포함)

🏫 학교 (מוסדות חינוך)

5c5d6bb0-755d-470d-84b6-d7dd3135ba9c

지도 (UTM_X/UTM_Y)


아키텍처

MCP Apps

시각화 도구는 prefab-ui 컴포넌트와 함께 FastMCPApp 제공자를 사용합니다:

  • DataProfile 앱 → DataTable, Metric 컴포넌트

  • Charts 앱 → BarChart, LineChart, ScatterChart, Histogram

  • Maps 앱 → Leaflet HTML이 포함된 Embed

@app.ui()를 통해 등록된 도구는 자동으로 적절한 MCP 앱 메타데이터를 가져와 호환 클라이언트에서 렌더링됩니다.

비동기 HTTP 계층

모든 API 호출은 다음 설정을 포함한 httpx.AsyncClient를 사용합니다:

  • 30초 타임아웃

  • 5xx 오류에 대한 자동 재시도

  • 연결 풀링

데이터 안전성

  • CKAN의 수치 값은 강제 형변환됩니다 ("25" → 25.0)

  • 지도 팝업 콘텐츠는 XSS 방지를 위해 HTML 이스케이프 처리됩니다

  • 선 차트는 올바른 렌더링을 위해 x축 기준으로 정렬됩니다


개발

테스트 실행

pytest tests/ -v          # 39 tests
pytest tests/ --cov=datagov_mcp  # With coverage

코드 스타일

ruff check .   # Lint
ruff format .  # Format

프로젝트 구조

datagov-mcp/
├── datagov_mcp/
│   ├── server.py          # Core CKAN tools + provider registration
│   ├── apps.py            # FastMCPApp definitions (DataProfile, Charts, Maps)
│   ├── visualization.py   # Visualization tools (@app.ui entry points)
│   ├── api.py             # CKAN API helper
│   └── client.py          # HTTP client
├── tests/                 # 39 tests with HTTP mocking
│   ├── test_api.py
│   ├── test_contracts.py
│   ├── test_tools.py
│   └── test_visualization.py
├── screenshots/           # Auto-generated demo screenshots
├── server.py              # Entrypoint
└── pyproject.toml

기여하기

기여를 환영합니다! 가이드라인은 CONTRIBUTING.md를 참조하세요.

  1. 저장소 포크

  2. 기능 브랜치 생성

  3. 테스트와 함께 변경 사항 적용

  4. 풀 리퀘스트 제출


문제 해결

MCP Inspector와의 포트 충돌

pip install nano-dev-utils
python -c "from nano_dev_utils import release_ports; release_ports.PortsRelease().release_all()"

Windows + OneDrive

OneDrive와 동기화된 폴더에서 설치를 실행하지 마세요. uv#7906을 참조하세요.

가져오기 오류

uv pip install -e ".[dev]"

라이선스

MIT — LICENSE 참조.

감사의 말

Available Tools

10 tools
fetch_dataC

Fetch data from public API based on a dataset name query

Inputs: dataset_name (required), limit, offset.

license_listB

Get the list of licenses available for datasets on the site.

Inputs: no named parameters.

organization_listB

Get names of all organizations.

Inputs: no named parameters.

organization_showB

Get details of a specific organization.

Inputs: id (required).

package_listB

Get a list of all package IDs (datasets).

Inputs: no named parameters.

package_showC

Get metadata about one specific package (dataset).

Inputs: id (required).

status_showA

Get the CKAN version and a list of installed extensions.

Inputs: no named parameters.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 10 tools

    Disambiguation4/5

    Most tools have distinct purposes, such as searching datastores vs. fetching data from APIs, but 'datastore_search' and 'resource_search' could be confused as both involve searching within datasets. The descriptions help clarify, but some overlap exists.

    Naming Consistency4/5

    Tools follow a consistent snake_case pattern with clear verb_noun structures like 'package_search' and 'organization_show', but 'fetch_data' deviates slightly with a less specific verb. Overall, the naming is predictable and readable.

    Tool Count5/5

    With 10 tools, the server is well-scoped for interacting with a data catalog, covering operations like listing, searching, and showing details for datasets, organizations, and resources. Each tool earns its place without being overwhelming.

    Completeness4/5

    The toolset provides good coverage for browsing and querying a CKAN-based data catalog, including CRUD-like operations for packages and organizations. Minor gaps exist, such as no tools for creating or updating datasets, but agents can work around this for read-only access.

    Maintenance

    ActivityInactive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables MCP-compatible clients to discover, inspect, and query Israeli government open datasets, resources, organizations, tags, and tabular records through the official data.gov.il CKAN API.
      146 npm
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables MCP-compatible clients to discover, inspect, and query Israeli Government Open Data from data.gov.il, including datasets, resources, tags, organizations, and tabular records through the official CKAN API.
      146 npm
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables MCP-compatible clients to discover, inspect, and query Israeli government datasets, resources, organizations, tags, and tabular records through the official data.gov.il CKAN API.
      146 npm
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables MCP-compatible clients to discover, inspect, and query Israeli Government Open Data from data.gov.il, including datasets, organizations, tags, resources, and tabular records through the CKAN API.
      146 npm
      MIT