Logo Data.gov.il MCP 服务器

Data.gov.il MCP 服务器

Cộng đồng
DavidOsherdiagnostica

Advanced MCP server for seamless access to Israeli Government Open Data

Nhà phát hànhDavidOsherdiagnostica
Kho mãdata-gov-il-mcp
Ngôn ngữTypeScript
Bản fork
21
Sao
109
Công cụ có sẵn
0
Phương thức truyền tảistdio
Danh mục
Giấy phépMIT
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    Data.gov.il MCP 服务器 cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    109 sao và 21 bản fork từ kho mã được liên kết.

data-gov-il-mcp

Production-grade Model Context Protocol (MCP) server for Israeli Government Open Data from data.gov.il.

This server gives MCP-compatible clients structured access to Israeli government datasets, resources, tags, organizations, and tabular records through the official CKAN API. It is written in TypeScript, validates inputs and outputs with Zod, returns JSON-first tool responses, and supports both local stdio and remote Streamable HTTP transports.

Highlights

AreaStatus
MCP tools9 tools by default, 10 with optional Sampling enabled
MCP resources5 static resources + 1 dataset resource template
MCP prompts3 domain prompts with argument completions
DiscoveryIn-memory catalog snapshot with Hebrew normalization, fuzzy matching, tag ranking, and co-occurrence
Transportsstdio and Streamable HTTP
Authnone, API key bearer auth, OAuth 2.1 JWT/JWKS
HTTP hardeningHelmet, CORS, rate limiting, request IDs, Host/Origin validation
ResponsesstructuredContent plus identical JSON in content[0].text
Runtime configEnvironment-driven, validated at startup with Zod

Quick Start

Claude Desktop / Local Stdio

Use the published package directly:

json
{
  "mcpServers": {
    "data-gov-il": {
      "command": "npx",
      "args": ["-y", "data-gov-il-mcp"]
    }
  }
}

Streamable HTTP

bash
npm install -g data-gov-il-mcp
data-gov-il-mcp-http

Then configure your MCP client:

json
{
  "mcpServers": {
    "data-gov-il": {
      "url": "http://localhost:3664/mcp"
    }
  }
}

Docker

bash
docker run -p 3664:3664 ghcr.io/davidosherproceed/data-gov-il-mcp:latest

For local development:

bash
npm install
npm run build
npm run start:stdio
# or
npm run start:http

Catalog Discovery Layer

The server ships with a committed catalog snapshot at src/data/catalog/catalog.snapshot.json. The snapshot is generated from data.gov.il and bundled into the build. At startup, it is validated and indexed in memory.

The discovery layer powers:

  • find_datasets catalog-first search with live CKAN fallback.
  • list_all_datasets instant local enumeration with optional organization filter.
  • list_organizations instant local organization list with dataset counts.
  • list_available_tags and search_tags from real CKAN tag/facet data.
  • Dynamic completions for datagov://dataset/{id}.
  • datagov://tags and datagov://catalog/stats resources.

It includes:

  • Hebrew normalization, including nikud removal and final-letter normalization.
  • Tokenization and trigram indexes for fuzzy matches and typo tolerance.
  • Dataset, tag, and organization maps.
  • Tag-to-dataset and organization-to-dataset indexes.
  • Tag co-occurrence for related tag suggestions.
  • Weighted ranking across exact, token, tag, organization, and fuzzy signals.

Refresh the snapshot:

bash
npm run catalog:refresh
npm run build

A scheduled GitHub Actions workflow (.github/workflows/catalog-refresh.yml) refreshes the snapshot and opens a PR when catalog data changes.

More detail: docs/catalog-discovery-layer.md.

Tools

All successful tool responses return:

  • structuredContent: the typed JSON object.
  • content[0].text: the same object serialized as JSON for text-only clients.

Default Tools

ToolPurpose
find_datasetsPrimary dataset discovery tool. Uses the local catalog first, then live CKAN fallback when needed.
get_dataset_infoFull CKAN metadata for a dataset, including tags and resources.
list_all_datasetsInstant catalog-backed dataset summaries, optionally filtered by organization.
list_resourcesLists files/datastores inside a dataset and identifies datastore_active resources.
search_recordsQueries CKAN datastore records with full-text search, filters, fields, sorting, pagination, and distinct values.
list_organizationsCatalog-backed organizations with Hebrew titles and dataset counts.
get_organization_infoLive CKAN organization metadata.
list_available_tagsRanked catalog tags with dataset counts and related tags.
search_tagsFuzzy tag search with related tag suggestions.

Optional Tools

ToolEnabled ByPurpose
summarize_datasetMCP_ENABLE_SAMPLING=trueRequests MCP Sampling from compatible clients to produce a human-readable dataset summary. Falls back to metadata when Sampling is unavailable.

Elicitation in find_datasets

find_datasets can optionally expose an interactive parameter:

json
{
  "query": "תחבורה",
  "interactive": true
}

This is only registered when:

bash
MCP_ENABLE_ELICITATION=true

When enabled, compatible clients may show a clarification form for broad searches. For example, the server can ask the user to narrow many matching datasets by publisher organization. If the client does not support Elicitation, the user declines, or the request times out, the tool falls back to normal search results.

This is disabled by default because MCP client support varies.

Resources

URITypeDescription
datagov://organizationsStatic JSONOrganization list from CKAN, cached.
datagov://tagsStatic JSONRanked tags from the committed catalog snapshot.
datagov://featuredStatic JSONCurated high-value datasets with ready-to-use resource_id values and field schemas.
datagov://guideStatic textUsage guide for tools, resources, and recommended workflows.
datagov://catalog/statsStatic JSONSnapshot metadata: generated time, dataset count, tag count, organization count, top organizations.
datagov://dataset/{id}Template JSONFull dataset metadata by dataset slug or ID. Includes dynamic completions and a catalog-backed resource list.

The server also implements resource subscriptions in a minimal standards-compliant way:

  • Advertises resources.subscribe.
  • Handles resources/subscribe and resources/unsubscribe.
  • Sends notifications/resources/updated only for resources a client subscribed to.
  • Does not poll CKAN in real time.

Prompts

PromptArgumentPurpose
food-nutrition-analysisanalysis_typeFood prices, nutrition, kosher, safety, import/export.
environmental-sustainability-analysisanalysis_focusAir quality, green buildings, waste, water, contaminated sites.
real-estate-market-analysismarket_focusHousing, urban renewal, subsidized housing, city/property analysis.

Prompt arguments use MCP completions. Domain focus suggestions are curated, and organization completions are catalog-backed.

Optional MCP Client Features

These features are off by default. Enable them only when your target MCP client supports them and you want the server to expose them.

VariableDefaultEffect
MCP_ENABLE_ELICITATIONfalseAdds interactive to find_datasets and allows server-initiated clarification forms. Works in clients such as Cursor and Claude Code.
MCP_ENABLE_SAMPLINGfalseRegisters summarize_dataset, which requests client-side model generation through MCP Sampling.

Client support differs:

  • Cursor supports Elicitation, but does not currently expose Sampling.
  • Claude Code supports Elicitation in recent versions.
  • Claude Desktop supports many MCP features, but Elicitation support is not reliable/available.
  • Sampling availability varies; the server always falls back safely.

Configuration

Copy .env.example to .env:

bash
cp .env.example .env

Core

VariableDefaultDescription
TRANSPORTstdioDefault transport when using the generic entry point. Dedicated binaries are also available.
PORT3664HTTP port.
HOST0.0.0.0HTTP bind host.
CORS_ORIGIN*Allowed CORS origins. Avoid wildcard in production browser deployments.
LOG_LEVELinfofatal, error, warn, info, debug, or trace.
NODE_ENVproductiondevelopment, production, or test.

CKAN

VariableDefaultDescription
CKAN_BASE_URLhttps://data.gov.il/api/3/actionCKAN action API base URL.
CKAN_TIMEOUT_MS10000Default CKAN request timeout.
CKAN_SEARCH_TIMEOUT_MS15000Timeout for heavier datastore/search requests.
CACHE_TTL_MS300000Default cache TTL.
CACHE_MAX_ITEMS500Max entries per in-memory cache.

HTTP Hardening

VariableDefaultDescription
TRUST_PROXYfalseTrust reverse proxy headers. Set when behind nginx/Caddy/ALB.
RATE_LIMIT_WINDOW_MS60000Rate limit window. Set 0 to disable.
RATE_LIMIT_MAX120Requests per IP per window. Set 0 to disable.
ALLOWED_HOSTSemptyHost allowlist for DNS rebinding protection. Defaults to loopback/local hosts when unset.
ALLOWED_ORIGINSemptyBrowser Origin allowlist. Falls back to CORS_ORIGIN when appropriate.

Authentication

VariableDefaultDescription
AUTH_MODEnonenone, apikey, or oauth.
API_KEYSemptyComma-separated bearer tokens for AUTH_MODE=apikey.
OAUTH_ISSUERunsetExpected JWT issuer for AUTH_MODE=oauth.
OAUTH_AUDIENCEunsetExpected JWT audience for AUTH_MODE=oauth.
OAUTH_JWKS_URIunsetJWKS URL for JWT verification.
OAUTH_RESOURCE_SERVERunsetCanonical MCP resource URL for OAuth protected resource metadata. Usually includes /mcp.

Service Identity

VariableDefaultDescription
SERVICE_NAMEpackage/server defaultMCP server name override.
SERVICE_VERSIONpackage versionMCP server version override.
SERVICE_DESCRIPTIONbuilt-in descriptionMCP server semantic description override.

Recommended Workflows

Find and Query a Dataset

  1. Use find_datasets with natural Hebrew or English terms.
  2. Use get_dataset_info or list_resources for a chosen dataset.
  3. Pick a resource with datastore_active=true.
  4. Use search_records with limit=5 first to inspect fields.
  5. Add filters, fields, sort, distinct, or pagination as needed.

Example flow:

text
find_datasets({ "query": "מחיר למשתכן" })
get_dataset_info({ "dataset": "mechir-lamishtaken" })
search_records({
  "resource_id": "7c8255d0-49ef-49db-8904-4cf917586031",
  "limit": 5,
  "include_total": true
})

Discover Tags

text
search_tags({ "keyword": "דיור", "limit": 5 })
find_datasets({ "query": "תחבורה", "tags": "תחבורה ציבורית" })

Use Interactive Discovery

Requires:

bash
MCP_ENABLE_ELICITATION=true

Then an agent may call:

text
find_datasets({ "query": "תחבורה", "interactive": true })

Compatible clients may show a form asking the user to narrow results.

Use Client-Side Summaries

Requires:

bash
MCP_ENABLE_SAMPLING=true

Then:

text
summarize_dataset({ "dataset": "mechir-lamishtaken", "language": "he" })

If Sampling is unavailable, the tool returns the dataset metadata and sampling.used=false.

Development

bash
npm install

# Type-check
npm run typecheck

# Lint
npm run lint

# Test
npm test

# Build
npm run build

# Refresh local catalog snapshot
npm run catalog:refresh

Run locally:

bash
# stdio
npm run build
npm run start:stdio

# HTTP
npm run build
npm run start:http

Enable optional features locally:

bash
MCP_ENABLE_ELICITATION=true MCP_ENABLE_SAMPLING=true npm run start:http

On PowerShell:

powershell
$env:MCP_ENABLE_ELICITATION="true"
$env:MCP_ENABLE_SAMPLING="true"
npm run start:http

Project Structure

text
src/
  auth/           Authentication providers and Express middleware
  bin/            stdio and HTTP entry points
  cache/          In-memory TTL/LRU cache
  catalog/        Snapshot validation, indexing, fuzzy search, CatalogService
  ckan/           Typed CKAN API client and CKAN response types
  config/         Zod env config, constants, server identity
  core/           Dependency container, MCP server factory, lifecycle
  data/catalog/   Committed catalog snapshot artifact
  formatting/     JSON response builders and guidance text
  observability/  Pino logger
  prompts/        MCP prompt definitions, templates, registration
  resources/      MCP resources, templates, subscriptions
  services/       Domain services for CKAN data access
  tools/          MCP tool definitions and Zod schemas
  transports/     stdio and Streamable HTTP transports
tests/
  fixtures/       Test fixtures
  unit/           Unit tests
scripts/
  refresh-catalog.ts
docs/
  catalog-discovery-layer.md
  MIGRATION.md

Docker

bash
docker build -t data-gov-il-mcp .
docker run -p 3664:3664 data-gov-il-mcp

With optional features:

bash
docker run -p 3664:3664 \
  -e MCP_ENABLE_ELICITATION=true \
  -e MCP_ENABLE_SAMPLING=true \
  data-gov-il-mcp

Quality

The project is expected to pass:

bash
npm run typecheck
npm run lint
npm test
npm run build

Current implementation includes unit coverage for environment parsing, auth providers, CKAN errors, cache, formatting, catalog text normalization/fuzzy/index/search logic, snapshot validation, services, resources, subscriptions, and HTTP Host/Origin guard.

License

MIT

Cài đặt

TypingMind
{
  "mcpServers": {
    "data-gov-il-mcp": {
      "command": "node",
      "args": [
        "/path/to/data-gov-il-mcp/stdio.js"
      ]
    }
  }
}

Dùng MCP Data.gov.il MCP 服务器 với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối Data.gov.il MCP 服务器, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm Data.gov.il MCP 服务器 làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của Data.gov.il MCP 服务器.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "data-gov-il-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "data-gov-il-mcp"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của Data.gov.il MCP 服务器, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của Data.gov.il MCP 服务器.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng Data.gov.il MCP 服务器 giúp tôi làm việc này không?
Data.gov.il MCP 服务器
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng Data.gov.il MCP 服务器.

Câu hỏi thường gặp

Máy chủ MCP Data.gov.il MCP 服务器 dùng để làm gì?

Data.gov.il MCP 服务器 là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP Data.gov.il MCP 服务器 với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng Data.gov.il MCP 服务器 với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP Data.gov.il MCP 服务器 với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối Data.gov.il MCP 服务器, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP Data.gov.il MCP 服务器 với TypingMind?

Data.gov.il MCP 服务器 hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP Data.gov.il MCP 服务器 cung cấp những công cụ nào trong TypingMind?

Data.gov.il MCP 服务器 cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP Data.gov.il MCP 服务器 không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu Data.gov.il MCP 服务器 yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇