Skip to main content
Glama
Israel Law Data API & MCP

Israel Law Data API & MCP

by nadavshalev

Israel Law Data API & MCP

REST and MCP services for searching Israeli laws on Hebrew Wikisource, listing sections, fetching section text, and building citation URLs.


Data Source & Licensing

Related MCP server: il-eli-mcp

Disclaimer

This is an unofficial, community-driven tool. It was built to improve accessibility to public legal data, but it is not an official government service.

  1. Not Legal Advice: The information provided by this API is for informational purposes only and does not constitute legal advice.

  2. No Guarantee of Accuracy: While we strive to provide accurate data, legal texts may be incomplete, unvetted, or outdated.


Run locally

uvicorn api:app --reload

REST base URL: http://127.0.0.1:8000/api

REST endpoints

  • GET /api/health

  • GET /api/laws/search?phrase=...&limit=10

  • GET /api/laws/{page_id}/sections

  • POST /api/laws/{page_id}/sections/text

  • POST /api/citations

Search notes:

  • Law search results are filtered to titles listed on the main laws page (page_id=247). That page is cached locally under data/cache/page_247.json; if it cannot be fetched and no cache exists, searches return an error.

Example:

curl --get \
  --data-urlencode "phrase=איסור עישון" \
  --data-urlencode "limit=5" \
  "http://127.0.0.1:8000/api/laws/search"

To request full section text, pass full: true in the JSON body:

curl -X POST "http://127.0.0.1:8000/api/laws/279238/sections/text" \
  -H "Content-Type: application/json" \
  -d '{"sections":["1","2"],"full":true}'

MCP (HTTP)

MCP endpoint: http://127.0.0.1:8000/mcp/

If you deploy behind a public domain, set MCP_ALLOWED_HOSTS to include it. Example:

MCP_ALLOWED_HOSTS=localhost:*,127.0.0.1:*,israel-law-api-mcp.sliplane.app:*

To allow all hosts (not recommended for public deployments), disable DNS rebinding protection:

MCP_DNS_REBINDING_PROTECTION=false

Example MCP client config:

{
  "mcpServers": {
    "israel-law": {
      "url": "http://127.0.0.1:8000/mcp/"
    }
  }
}

Test MCP client:

python3 scripts/test_mcp_client.py --server "http://127.0.0.1:8000/mcp/"

API check helper:

BASE_URL=http://127.0.0.1:8000/api python3 scripts/check_api.py

Docker

Build and run (VPS-local access by default):

docker compose up -d --build

The container reads HOST and PORT from .env.

Limits and safety

Default limits are configured via .env and applied per IP. You can adjust:

  • RATE_LIMIT_PER_IP for request rates

  • MAX_SECTIONS_PER_REQUEST

  • MAX_SECTION_TEXT_CHARS

  • MAX_SEARCH_PHRASE_LEN

  • MAX_SEARCH_LIMIT

  • CONCURRENT_LIMIT_TOTAL for concurrency caps

Tool Schema Changelog

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

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      An MCP server for accessing Turkish legislation (laws, regulations, decrees) via the Adalet Bakanligi API, providing search, full-text retrieval, and structured citations.
      5
      2
      Apache 2.0
    • A
      license
      A
      quality
      B
      maintenance
      Enables searching and retrieving metadata of Israeli primary legislation via the Knesset's official OData API, including law names, status, and Basic Law classification.
      7
      50 PyPI
      1
      Apache 2.0
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables MCP-compatible clients to discover, inspect, and query Israeli government open datasets, resources, tags, and organizations through the official CKAN API, including full-text datastore record search and guided domain prompts. It ships a locally indexed catalog snapshot with Hebrew-aware fuzzy matching, so clients get fast dataset discovery plus structured JSON responses over stdio or Streamable HTTP.
      146 npm
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables MCP-compatible clients to discover, inspect, and query Israeli government open datasets, resources, tags, organizations, and tabular records through the official CKAN API, with catalog-backed search, fuzzy Hebrew matching, and local or remote transports.
      146 npm
      MIT