Ireland Law MCP
Production-oriented MCP server for Irish legislation, including:
- Full-text statute/provision search
- Provision retrieval and citation helpers
- EU cross-reference endpoints
- Golden contract tests
- Scheduled freshness/drift automation
- Vercel streamable HTTP deployment
Requirements
- Node.js 18+ (Node 20/22 recommended)
- npm
Local Setup
npm ci
npm run typecheck
npm run build
npm test
Run as stdio MCP server:
npm run dev
Use an explicit DB path:
IRISH_LAW_DB_PATH=/absolute/path/to/database.db npm run dev
Database Pipeline
Fetch/refresh source material:
npm run ingest
Build SQLite from seed files:
npm run build:db
EU cross-reference seed data is loaded from:
data/source/eu-references.json
Testing
Run all tests:
npm test
Run contract/golden suite only:
npm run test:contract
Nightly contract mode (enables upstream assertions):
CONTRACT_MODE=nightly npm run test:contract
Drift and Freshness Automation
Check upstream data freshness:
npm run check-updates
Detect drift against upstream hash anchors:
npm run drift:detect
Golden hash anchors are defined in fixtures/golden-hashes.json.
Initialize or refresh hashes:
npm run golden:refresh-hashes
Vercel Deployment
This repo deploys /mcp (Streamable HTTP), /health, and /version.
For GitHub Actions deployment, configure repository secrets:
VERCEL_TOKENVERCEL_ORG_IDVERCEL_PROJECT_ID
Deployment workflow:
.github/workflows/vercel-deploy.yml
Vercel build fetches data/database.db.gz from the GitHub release matching package version (via scripts/download-db.sh).
GitHub Workflows
ci.yml: build, tests, coverage, contract tests, scheduled nightly contract modecheck-updates.yml: daily freshness check + issue creation on detected updatesdrift-detect.yml: nightly drift detection + issue creation on hash mismatchvercel-deploy.yml: production deploy (when Vercel secrets are set)