Datagov MCP logo

Datagov MCP

Community
aviveldan

MCP server for Israel Government Data

Publisheraviveldan
Repositorydatagov-mcp
LanguageHTML
Forks
30
Stars
146
Available tools
0
Transport typestdio
LicenseMIT
Links
  • Connect tools to AI workflows

    Datagov MCP exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    146 stars and 30 forks from the linked repository.

DataGov Israel MCP Server

An MCP server for exploring Israeli government open data (data.gov.il) — with built-in interactive visualizations powered by MCP Apps.

Search thousands of public datasets, profile their structure, generate charts, and plot geographic data on maps — all from your AI assistant.

Tests Python 3.10+ License: MIT


What Can You Do With This?

🏠 Explore the Housing Market

Profile public housing datasets to understand unit sizes, locations, and availability:

Dataset Profile — Public Housing

See which cities have the most demand in government housing lotteries:

Housing Lottery Subscribers by City

Understand the distribution of apartment sizes across the country:

Distribution of Public Housing Unit Sizes

Track housing unit availability over time:

Housing Units Available per Lottery

🗺️ Map Public Infrastructure

Visualize education institutions across Israel:

Education Institutions Map

Plot public transport stations:

Public Transport Stations


Quick Start

Installation

bash
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]"

Using with Claude Desktop

bash
fastmcp install claude-desktop server.py

Restart Claude Desktop — you'll see the DataGovIL tools available immediately.

Try It with the MCP Inspector

bash
fastmcp dev inspector server.py

This opens a web UI where you can browse tools, test them interactively, and preview MCP App visualizations in the Apps tab.

Using with fastmcp dev apps

Preview the interactive visualization apps locally:

bash
fastmcp dev apps server.py

Example: Finding Real Estate Opportunities

Here's a real workflow for someone exploring the Israeli housing market:

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²

Insight: Cities like Ashkelon and Sderot show 25,000-35,000 subscribers per lottery — that's intense competition. Smaller cities in the periphery (Umm al-Fahm, Nazareth) have far fewer. If you're flexible on location, your odds improve dramatically.


Available Tools

Core Data Tools

ToolDescription
status_showGet CKAN version and site info
license_listList available dataset licenses
package_listGet all dataset IDs
package_searchSearch datasets with filters and sorting
package_showGet detailed metadata for a specific dataset
organization_listList all organizations
organization_showGet details of a specific organization
resource_searchSearch for resources within datasets
datastore_searchQuery data within a specific resource
fetch_dataConvenience tool — find dataset by name and fetch its data

Visualization Tools (MCP Apps) 📊

These tools render interactive UI directly in MCP-compatible clients.

dataset_profile

Profile a dataset to understand its structure and quality.

  • Fields detected: integer, number, string, coordinate
  • Statistics: min, max, mean, null count, unique values
  • Output: Interactive DataTable with search/filter
dataset_profile(resource_id="c3a68837-9b7a-4ee7-bd92-130678dc8ae3", sample_size=200)

chart_generator

Generate interactive charts from any dataset.

Chart TypeUse Case
histogramDistribution of numeric values (e.g., apartment sizes)
barCompare categories (e.g., subscribers per city)
lineTrends over time (e.g., housing units per lottery)
scatterCorrelations between two numeric fields
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

Plot geographic data on interactive Leaflet maps.

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

Useful Resource IDs

Here are some interesting datasets to get started with:

DatasetResource IDGood For
✈️ Flights (טיסות)e83f763b-b7d7-479e-b172-ae981ddc6de5Bar charts by airline
🏠 Public Housing (דיור ציבורי)c3a68837-9b7a-4ee7-bd92-130678dc8ae3Histograms, profiling
🎰 Housing Lotteries (דירה בהנחה)7c8255d0-49ef-49db-8904-4cf917586031Bar/line charts
🚌 Transport Stations (תחנות)e873e6a2-66c1-494f-a677-f5e77348edb0Maps (has Lat/Long)
🏫 Schools (מוסדות חינוך)5c5d6bb0-755d-470d-84b6-d7dd3135ba9cMaps (UTM_X/UTM_Y)

Architecture

MCP Apps

Visualization tools use FastMCPApp providers with prefab-ui components:

  • DataProfile app → DataTable, Metric components
  • Charts app → BarChart, LineChart, ScatterChart, Histogram
  • Maps app → Embed with Leaflet HTML

Tools registered via @app.ui() automatically get proper MCP Apps metadata and render in compatible clients.

Async HTTP Layer

All API calls use httpx.AsyncClient with:

  • 30-second timeout
  • Automatic retries for 5xx errors
  • Connection pooling

Data Safety

  • Numeric values from CKAN are coerced (handles "25" → 25.0)
  • Map popup content is HTML-escaped to prevent XSS
  • Line charts are sorted by x-axis for correct rendering

Development

Running Tests

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

Code Style

bash
ruff check .   # Lint
ruff format .  # Format

Project Structure

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

We welcome contributions! See CONTRIBUTING.md for guidelines.

  1. Fork the repository
  2. Create a feature branch
  3. Make changes with tests
  4. Submit a pull request

Troubleshooting

Port Conflicts with MCP Inspector

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

Windows + OneDrive

Avoid running installation in OneDrive-synced folders. See uv#7906.

Import Errors

bash
uv pip install -e ".[dev]"

License

MIT — see LICENSE.

Acknowledgments

Use Datagov MCP MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Datagov MCP is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Datagov MCP as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Datagov MCP MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "datagov-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Datagov MCP MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Datagov MCP MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Datagov MCP to help me with this task?
Datagov MCP
Sure. I read it.
Here is what I found using Datagov MCP.

Frequently asked questions

What is the Datagov MCP MCP server used for?

Datagov MCP is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Datagov MCP MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Datagov MCP with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Datagov MCP MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Datagov MCP connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Datagov MCP MCP to TypingMind?

Datagov MCP runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Datagov MCP MCP provide in TypingMind?

Datagov MCP exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Datagov MCP MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Datagov MCP requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇