il-opendata-mcp
Summary: It's an MCP server that lets an AI agent search the Israeli government open-data catalog (data.gov.il, CKAN 3) and drill down from datasets to datastore records — via stdio or hosted Streamable HTTP.
search_datasets— free-text search over the catalog (package_search); returns match count plus compact dataset summaries (title, truncated notes, organization, tags, resource summaries, count ofdatastore_activeresources), withrows/startpagination (max 50).get_dataset— fetch full metadata and resource list for one dataset by package name or UUID (e.g.gsa), including each resource's format,last_modifiedanddatastore_activeflag.describe_resource— get a datastore resource's field names/types and total record count (limit 0); errors clearly if there's no active datastore.search_records— query actual rows in a datastore-backed resource with full-textq, exact-matchfilters, field selection,limit(max 100) andoffset.list_featured_datasets— offline, curated shortlist of well-known datasets by category (companies, vehicles, education, fuel, government, all) as a starting point.Typical flow — search → inspect dataset → describe resource schema → query records.
Deployment/usage — run as a local stdio MCP server, as a stateless shared HTTP service (
--http,/mcp,/healthz, origin guard), in Docker, or import itsCkanClient/startHttpServerdirectly in TypeScript.Caveats — the schema requires
qonsearch_datasets(README says optional), and the README-advertisedlist_organizations/organizationfilter is not present in this schema; failures come back as MCPisErrorresults rather than crashing.
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 |
| No network. Optional |
Every tool returns both human-readable JSON text and structuredContent. Failures produce an MCP isError result instead of crashing the session.
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.search_recordswith that resource id, optionalq/filters, and a smalllimit.
Related MCP server: data-gov-il-mcp
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"}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 |
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();
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" --> S
S --> CKAN
S --> CAT
subgraph L["src/lib — no MCP imports"]
CKAN["ckan.ts<br/>injectable fetch · CKAN 3 client"]
CAT["catalog.ts<br/>curated featured list"]
end
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)
server.ts MCP tool wiring (zod schemas)
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
server.test.ts end-to-end tests through a real MCP client (in-memory transport, mocked fetch)
http.test.ts real HTTP server on an ephemeral port: client round-trip, statelessness, 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)
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
5 toolsdescribe_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.
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. Use list_featured_datasets for a curated starting point.
Inputs: q (required), rows, start.
search_recordsSearch datastore recordsA
Query rows in a data.gov.il datastore resource (CKAN datastore_search). Supports full-text q, exact-match filters, field selection, limit (default 10, max 100) and offset. The resource must have an active datastore.
Inputs: resource_id (required), q, limit, fields, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool occupies a distinct stage of the workflow: catalog search (search_datasets), curated browsing (list_featured_datasets), metadata fetch (get_dataset), schema inspection (describe_resource), and row querying (search_records). Descriptions explicitly cross-reference each other to steer the agent (e.g. use list_featured_datasets vs search_datasets, check datastore_active via get_dataset before search_records).
All names follow a clean verb_noun snake_case pattern: search_datasets, get_dataset, describe_resource, search_records, list_featured_datasets. Resource nouns are used consistently (dataset vs resource vs records), matching the CKAN domain model.
Five tools is well-scoped for a read-only CKAN catalog server, covering the full discovery-to-query path without redundancy. Each tool earns its place and none feels like filler.
The core lifecycle (discover -> metadata -> schema -> query rows) is fully covered, including a clear failure path for non-datastore resources. Minor gaps: no organization/tag/group browsing tools and no way to fetch or download a resource's raw file when datastore_active is false.
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.
Data.gov MCP — wraps Data.gov CKAN API (catalog.data.gov/api/3)
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.973 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.73 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.73 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.73 npmMIT