il-opendata-mcp
Searches and queries Israeli government open data (data.gov.il) through its public CKAN API, without dumping raw blobs into context.
Search the catalog (
search_datasets): free-text query, optional organization slug, paginated; returns compact dataset metadata, tags, organization and resource summaries indicating datastore availability.Browse publishers (
list_organizations): list ~60 ministries/authorities sorted by dataset count, filterable by slug or Hebrew title.Inspect a dataset (
get_dataset): fetch metadata and resources by package name or UUID.Explore a resource (
describe_resource): get field names/types and total record count; clear error if no active datastore.Query rows (
search_records): full-textq, exact-match or any-offilters, field selection, up to 5 sort keys, limit (max 100) and offset.Get exact totals (
count_records): count matching records without downloading rows, plusgroup_bybreakdowns (up to 25 values) with counts, shares and remainder.Discover filter values (
list_field_values): sorted distinct values of a field, flaggedcomplete:falseif partial.Start from a shortlist (
list_featured_datasets): offline curated datasets for companies, vehicles, education, fuel, government.Attach context via MCP resources:
opendata://featured,opendata://organizations, andopendata://dataset/{name}.Run it flexibly: stdio (Claude Desktop/Cursor), stateless Streamable HTTP for shared remote agents, Docker/one-click deploy, or import as a TypeScript library (
CkanClient), with in-memory TTL response caching.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@il-opendata-mcp find datasets about Israeli companies and show their resources"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Search and query Israeli government open data (data.gov.il) from any MCP client.
A Model Context Protocol server that lets AI agents search the official data.gov.il catalog and query datastore-backed resources through the public CKAN 3 API — datasets, resources and records, without dumping raw CKAN blobs into the context window.
This is the network / open-data counterpart to hebrew-il-mcp, which covers local deterministic validators (ID, phone, VAT, IBAN, plates, postal codes, holidays).
Tools
Tool | What it does |
| CKAN |
| CKAN |
| CKAN |
| CKAN |
| CKAN |
| Exact number of matching records without downloading rows ( |
| Sorted distinct values of one field ( |
| No network. Optional |
Every tool returns both human-readable JSON text and structuredContent. Failures produce an MCP isError result instead of crashing the session.
Related MCP server: data-gov-il-mcp
Resources
Clients that support MCP resources can attach catalog context directly, without a tool call:
URI | What it returns |
| The curated featured-dataset shortlist with categories. No network. |
| Every publishing ministry/authority (~60), sorted by dataset count — same shape as |
| Resource template: compact metadata + resources for one CKAN package, e.g. |
All resources are application/json.
Typical flow:
search_datasetswith a query such as"חברות ממשלתיות"(or start fromlist_featured_datasets).get_datasetwith a package name from the results, e.g.gsa.describe_resourcewith a resource id wheredatastore_activeis true.list_field_valuesto see which values a field takes (statuses, cities, manufacturers).count_recordsfor exact totals and breakdowns, andsearch_recordswithfilters,sortand a smalllimitfor the rows themselves.
Example (live, 2026-11-27, vehicle registry 053cea08-09bc-40ec-8f7a-156f0677aff3, 4.2M rows): count_records with filters: { "shnat_yitzur": 2026 } and group_by: { "field": "tozeret_nm", "values": ["טויוטה יפן", "קיה סלובקיה"] } returns 304,049 vehicles from 2026 — 16,745 Toyota Japan (5.5%) and 5,168 Kia Slovakia (1.7%) — in three small requests instead of paging millions of rows.
Caching
data.gov.il is slow (a full organization_list takes several seconds) and the catalog changes slowly, so successful CKAN GET responses are cached in memory, keyed by the full request URL:
Default TTL 5 minutes;
--cache-ttl <seconds>orIL_OPENDATA_CACHE_TTLchanges it,0disables caching.Shared across HTTP requests: the stateless HTTP mode creates a fresh MCP server per request but reuses one
CkanClient, so every agent hitting the same instance benefits.Concurrent identical requests share one network call, errors and HTTP failures are never cached, and at most 256 responses are kept (oldest evicted first).
list_organizationsfilters locally, so everyqreuses one cachedorganization_listresponse.
Live on 2026-11-18: reading opendata://organizations took ~9.3 s cold and the following list_organizations call 4 ms; get_dataset gsa went from ~580 ms to 2 ms.
Why
Agents that work with Israeli companies, vehicles, schools or public registries should query the official catalog instead of guessing URLs or inventing dataset ids. data.gov.il already exposes a documented CKAN API; this server wraps it with pagination caps, truncated notes, compact resource summaries and MCP-safe errors so an agent can search and then drill into datastore rows without flooding its context.
Quick start
Claude Desktop / Cursor / any MCP client
{
"mcpServers": {
"il-opendata": {
"command": "npx",
"args": ["-y", "github:Shtibel1/il-opendata-mcp"]
}
}
}Or from a local clone:
npm install && npm run build
node dist/cli.js # speaks MCP over stdioHosted: Streamable HTTP
Run it as a network service that any remote MCP client (or several agents at once) can share:
npx -y github:Shtibel1/il-opendata-mcp --http --port 3000
# → il-opendata-mcp listening on http://127.0.0.1:3000/mcp
curl http://127.0.0.1:3000/healthz # {"status":"ok","name":"il-opendata-mcp","version":"0.6.0"}Then point a client that supports remote servers at it:
{ "mcpServers": { "il-opendata": { "url": "http://127.0.0.1:3000/mcp" } } }Flag | Env | Default | Notes |
| off | Serve Streamable HTTP instead of stdio | |
|
|
| |
|
|
| Binds to loopback by default; use |
|
| none | Repeatable flag, or a comma-separated env var. Browser requests from any other |
|
|
| Seconds to cache CKAN responses in memory (see Caching); |
The HTTP mode is stateless: every POST /mcp gets a fresh server and transport, there are no session ids, and GET/DELETE /mcp return 405. That means instances can sit behind any load balancer with no sticky sessions. Bodies over 1 MB get 413, malformed JSON gets 400.
Docker
The image runs the HTTP mode as the unprivileged node user, binds 0.0.0.0:3000, and ships a HEALTHCHECK against /healthz:
docker build -t il-opendata-mcp .
docker run --rm -p 3000:3000 -e ALLOWED_ORIGINS=https://app.example il-opendata-mcpCI builds the image on every push and smoke-tests it: health check, a real tools/list call, the origin guard, and the non-root user.
One-click deploy
The render.yaml blueprint builds the Dockerfile, wires /healthz as the health check, and prompts for ALLOWED_ORIGINS. Any container host (Fly.io, Railway, Cloud Run, ECS) works the same way: run the image and expose port 3000.
Programmatic use:
import { startHttpServer } from "il-opendata-mcp";
const { url, close } = await startHttpServer({ port: 0, allowedOrigins: ["https://app.example"] });As a library
import { CkanClient, listFeaturedDatasets } from "il-opendata-mcp";
const ckan = new CkanClient({ cacheTtlMs: 60_000 }); // optional; default 5 min, 0 disables
const { count, datasets } = await ckan.searchDatasets({ q: "חינוך" });
const dataset = await ckan.getDataset("gsa");
const resource = dataset.resources.find((item) => item.datastore_active);
if (resource) {
const schema = await ckan.describeResource(resource.id);
const rows = await ckan.searchRecords({ resource_id: resource.id, limit: 5 });
}
listFeaturedDatasets("companies"); // curated names such as ica_companies, gsa, …Architecture
flowchart LR
C["MCP client<br/>(Claude Desktop, Cursor, agents)"] -- stdio --> CLI[cli.ts]
R["Remote agents"] -- "POST /mcp" --> H["http.ts<br/>stateless Streamable HTTP<br/>origin check · /healthz"]
CLI --> S["server.ts<br/>zod schemas · isError results"]
CLI -- "--http" --> H
H -- "new server per request<br/>shared CkanClient" --> S
S --> CKAN
S --> CAT
subgraph L["src/lib — no MCP imports"]
CKAN["ckan.ts<br/>injectable fetch · CKAN 3 client"]
CACHE["cache.ts<br/>in-memory TTL cache"]
CAT["catalog.ts<br/>curated featured list"]
end
CKAN --> CACHE
CKAN -- HTTPS --> GOV["data.gov.il<br/>/api/3/action"]
APP["Your TS app"] -- import --> LLayout
src/
lib/ckan.ts injectable-fetch CKAN client (no MCP imports)
lib/catalog.ts curated featured-dataset list (static, verified names only)
lib/cache.ts in-memory TTL cache (promise sharing, no cached errors, bounded size)
server.ts MCP tool + resource wiring (zod schemas)
version.ts single source of the version (handshake, User-Agent, /healthz)
http.ts stateless Streamable HTTP transport (node:http, no framework)
cli.ts entry: stdio by default, --http for hosted mode
index.ts public exports
test/
ckan.test.ts URL building, parsing, errors, pagination caps
catalog.test.ts category filters
cache.test.ts TTL cache + CkanClient caching (expiry, keys, in-flight sharing, errors, disable)
server.test.ts end-to-end tests through a real MCP client (tools, resources, completion; in-memory transport, mocked fetch)
http.test.ts real HTTP server on an ephemeral port: client round-trip, statelessness, shared cache, health, 400/403/404/405Pure core, thin adapter. Networking and mapping live in
src/libwith no MCP dependency, so the client is reusable as a plain TypeScript library.Compact payloads. Long notes are truncated (~500 characters) and raw CKAN blobs are mapped down to the fields agents actually need.
Pagination caps. Dataset search is limited to 50 rows; datastore queries are limited to 100 records.
Curated starting point.
list_featured_datasetsis a verified shortlist (companies, vehicles, education, fuel, government), not a complete catalog.
Featured datasets
These CKAN package names were verified against the live catalog on 2026-11-08:
Category | Package name | Title |
companies |
| מאגר חברות - רשם החברות |
companies |
| מאגר שותפויות - רשם החברות |
companies |
| פרטי שינויים בחברות ושותפויות |
companies / government |
| רשימת חברות ממשלתיות ודירקטורים מכהנים |
companies |
| פנקס הקבלנים הרשומים |
vehicles |
| מספרי רישוי של כלי רכב פרטיים ומסחריים |
vehicles |
| היסטוריית כלי רכב פרטיים |
education |
| מוסדות חינוך |
education |
| מאפייני מוסדות חינוך בפיקוח משרד החינוך |
fuel |
| מאגר תחנות הדלק |
fuel |
| תחנות דלק |
Use search_datasets to discover anything that is not on this list.
Development
npm test # vitest (mocked fetch — no network required)
npm run typecheck
npm run buildAttribution
This is an unofficial client. Data comes from data.gov.il and its original publishers under their terms. This project does not claim any government affiliation.
Roadmap
Publish to npm so
npx il-opendata-mcpworks without the GitHub shorthandHosted (Streamable HTTP) transport option (v0.2.0)
Dockerfile and one-click deploy for the HTTP mode (v0.3.0)
Browse by publisher:
list_organizations+search_datasets.organizationfilter (v0.4.0)In-memory response cache (
--cache-ttl) shared across HTTP requests, and MCP resourcesopendata://featured,opendata://organizations,opendata://dataset/{name}(v0.5.0)count_records(exact totals andgroup_bybreakdowns),list_field_values,search_records.sortand multi-value filters (v0.6.0)Range filters beyond exact match.
datastore_search_sqlis reachable, but data.gov.il's gateway rejectsWHEREclauses andCOUNT(*)with an HTML 404, so it is not a reliable base yet
Contributing
Issues and PRs are welcome. Keep CKAN mapping in src/lib with unit tests, and add an end-to-end case in test/server.test.ts for new tools. Please do not invent dataset ids — verify names against the live catalog.
License
MIT © Nadav Shtibel
Available Tools
8 toolscount_recordsCount datastore recordsA
Exact number of records in a data.gov.il datastore resource that match optional q/filters, without downloading rows (datastore_search with limit 0). Optional group_by counts records per value of one field (up to 25 values, e.g. manufacturers or roles from list_field_values) and returns each count, its share of the total and the remainder ("other").
Inputs: resource_id (required), q, filters, group_by.
describe_resourceDescribe a datastore resourceA
Return field names/types and the total record count for a CKAN datastore resource (datastore_search with limit 0). Fails with a clear error if the resource has no active datastore — use get_dataset to find resources where datastore_active is true.
Inputs: resource_id (required).
get_datasetGet a data.gov.il datasetA
Fetch metadata and resources for one dataset by CKAN package name or UUID (package_show). Resource summaries include format, last_modified and whether datastore_active is true (needed before search_records).
Inputs: id (required).
list_featured_datasetsList curated featured datasetsA
Return a curated starting point of well-known data.gov.il datasets (companies, vehicles, education, fuel, government). This is not a complete index of the catalog — use search_datasets to find everything else. No network request is made.
Inputs: category.
list_field_valuesList distinct values of a fieldA
Distinct values of one field in a data.gov.il datastore resource (datastore_search with distinct=true), sorted, optionally under q/filters. Use it to discover valid filter values (statuses, cities, manufacturers) before search_records or count_records. limit caps the rows CKAN scans (default 100, max 1000); complete=false means the list is partial.
Inputs: field (required), resource_id (required), q, limit, +1 more.
list_organizationsList data.gov.il publishing organizationsA
List the government ministries and authorities that publish on data.gov.il (CKAN organization_list), sorted by number of datasets. Optional q matches the slug or the Hebrew title, e.g. 'תחבורה' or 'transport'. Pass a returned name as search_datasets.organization.
Inputs: q, limit, offset.
search_datasetsSearch data.gov.il datasetsA
Search the Israeli government open-data catalog (data.gov.il CKAN package_search). Returns a compact list of matching datasets with titles, truncated notes, organizations, tags and resource summaries, including how many resources have an active datastore. Optionally restrict to one publishing organization (slug from list_organizations). Use list_featured_datasets for a curated starting point.
Inputs: q, rows, start, organization.
search_recordsSearch datastore recordsA
Query rows in a data.gov.il datastore resource (CKAN datastore_search). Supports full-text q, exact-match filters (a list means any of these), field selection, sort, limit (default 10, max 100) and offset. The resource must have an active datastore.
Inputs: resource_id (required), q, sort, limit, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Most tools target distinct resource+action pairs, and descriptions actively steer agents (e.g. list_featured_datasets says it is not a complete index, use search_datasets). The main soft spots are describe_resource vs count_records, both of which issue datastore_search with limit 0 and report a record count, though the schema-vs-filtered-count distinction is explained.
Uniform verb_noun snake_case throughout: get_dataset, list_organizations, search_datasets, describe_resource, search_records, count_records, list_field_values. Verbs (get/list/search/describe/count) map predictably to intent.
Eight tools cleanly cover the CKAN discovery and datastore querying surface without padding. Each tool has a distinct role in a discover-then-query workflow, which is a well-scoped size for this domain.
Covers catalog discovery (search, organizations, featured, dataset detail), resource introspection, and row querying/counting/field values — a solid lifecycle. Minor gaps: no tool to surface download URLs or fetch non-datastore resources, and no organization-level dataset listing beyond search_datasets.organization.
Maintenance
Related MCP Connectors
data.gov.il MCP — Israel national open-data portal (CKAN API).
Public Data Ukraine Mcp connects AI agents to real public APIs via MCP. Tools include
Live Israeli public data for AI agents: alerts, prices, open data, FX rates, Shabbat times.
UK Government Data.gov.uk CKAN API for dataset discovery, agency catalogs, resource links, and tags.
51
Related MCP Servers
- AlicenseCqualityCmaintenanceEnables AI assistants to search, discover, and analyze thousands of datasets from Israel's national open data portal. It provides tools for querying government ministries, municipalities, and public bodies using the CKAN API.9141 npm111MIT
- AlicenseNot gradedqualityAmaintenanceEnables MCP-compatible clients to discover, inspect, and query Israeli Government Open Data from data.gov.il through the official CKAN API, including datasets, resources, tags, organizations, and tabular records. Supports catalog search, metadata resources, domain prompts, and structured tool responses over local stdio or remote Streamable HTTP.141 npmMIT
- AlicenseNot gradedqualityAmaintenanceProvides MCP clients with structured access to Israeli government open data, enabling discovery and querying of datasets, resources, tags, organizations, and tabular records through the official CKAN API.141 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables MCP-compatible clients to discover and query Israeli Government Open Data from data.gov.il, including datasets, resources, tags, organizations, and tabular records through the official CKAN API. It provides catalog search, metadata retrieval, resource listing, record querying, prompts, and static/templated resources for streamlined exploration.141 npmMIT