Skip to main content
Glama
taktekhq

Lebanese Legislation

by taktekhq

Lebanese Legislation

The code and data behind LebaneseLegislation.com: 103,118 laws, 389,078 articles, 47,657 court rulings and 6,851 Official Gazette issues, with search, a REST API and an MCP server.

Where everything is

You want

Go to

Read the laws

LebaneseLegislation.com

Connect an AI assistant

The free MCP server at https://lebaneselegislation.com/mcp. Setup

The data as tables

Parquet files on Hugging Face

The data as a PostgreSQL database

The 6.4 GB dump on Hugging Face, with search vectors. The -db image below loads it for you.

The original court scans

Court scans on Hugging Face

Everything on your own machine

Run the services locally

Data lives on Hugging Face. Code and Docker images live here. Each GitHub release is a code version, never a data download.

Related MCP server: korean-law-mcp

Run the services locally

git clone https://github.com/taktekhq/lebanese-legislation.git
cd lebanese-legislation
./start

You need Docker Compose, 4 GB of free memory and 30 GB of free disk. The first start downloads the latest dump from Hugging Face, checks its SHA-256 and restores it. That can take up to two hours. Later starts reuse the volume.

Then open the website at http://localhost:8080, the API at http://localhost:8000/docs, or point an MCP client at http://localhost:8001/mcp. Exact and citation search need no AI key. For semantic search, add your own GEMINI_API_KEY to .env.

Image

What it is

ghcr.io/taktekhq/lebanese-legislation-db:0.3.0

PostgreSQL 18.6 with pgvector. Restores the dump into an empty volume on first start.

ghcr.io/taktekhq/lebanese-legislation-api:0.3.0

REST API: laws, articles, rulings, Gazette, exact and semantic search.

ghcr.io/taktekhq/lebanese-legislation-mcp:0.3.0

The same backend as the API, served over MCP.

ghcr.io/taktekhq/lebanese-legislation-web:0.3.0

The website, in Arabic and English, with keyword search.

All four run on Linux AMD64 and ARM64. Nothing is baked into the images: the data comes from Hugging Face.

Hugging Face releases/latest.json --> db  (restores once into a volume)
                                      ^
                       web :8080 -----+
                       api :8000 -----+
                       mcp :8001 -----+

Service reference: configuration, using your own PostgreSQL, rebuilding the dump.

What is in this repository

Folder

What it is

db/

The PostgreSQL image. Builds pgvector from source on the official postgres:18.6 image.

server/

The Python package lebleg: one backend for the API and the MCP server, plus the restore, build and publish tools.

web/

The Go website, published as the -web image.

examples/

The MCP image on Cloudflare Containers, and the handwriting demo.

docs/

Service reference, MCP setup and the data update pipeline.

compose.yaml runs the four images. compose.build.yaml builds them from this checkout instead. compose.local.yaml loads a dump you already downloaded. server.json is the MCP Registry entry and .mcp.json the client configuration for the hosted server.

Collecting the source texts stays in a separate private repository.

Contribute and licence

See CONTRIBUTING.md.

Code is MIT licensed, by Taktek and Nizar Mahmoud. The data has its own terms and attribution: credit the Centre for Research and Studies in Legal Informatics, Lebanese University, for the texts. The code licence does not cover the legal texts or court scans. This is not legal advice or an official publication.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides access to official French legal databases (Légifrance and JudiLibre) to search and retrieve French legislation, legal codes, case law, and judicial decisions through authenticated APIs.
    36
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Enables natural language search and retrieval of Korean laws, precedents, administrative rules, and legal terms, with deep legal chain analysis and full-text access. Supports stdio and streamable-http transports for local and remote deployment.
    10
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables legal research by providing unified search across ~3.3 million court decisions (French and European) and ~1.5 million consolidated law articles, with tools for retrieving full texts and historical versions, all without authentication.
    12
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI assistants to search and read consolidated legislation from multiple countries, retrieve exact law texts as of any historical date with citations and git commit SHAs, and create webhook or email subscriptions to track legal changes.
    2
    MIT