EU-law MCP server ships then trims its own SPARQL layer
lucianschw-dev added a self-contained MCP server for EU-law lookup under `backend/mcp-servers/eu-law/`, backed by EUR-Lex and CELLAR. Three commits later the SPARQL search tools were gone - dropped because the CELLAR SPARQL endpoint proved unreliable in practice.
The v0.1 commit (47b76931) landed about 5,800 lines: a SPARQL client, a REST client, CELEX/ECLI/ELI helpers, rate limiting, an LRU cache, an MCP server entrypoint, and seven tools - three keyword-search tools plus three by-identifier fetchers and verifyCitation. The test suite ships alongside with fixture HTML and JSON.
A small Windows/Node 24 portability pass (8fa02bb2) followed. It adjusts the build script to run TypeScript with --max-old-space-size=6144, decodes percent-encoded URLs in a test assertion, and extends the ELI regex to accept two-digit pre-2000 years (e.g. /eli/dir/95/46 for Directive 95/46/EC). None of those changes touch the tool surface.
The substantive revision is f513b61a. The author concluded that CELLAR SPARQL is not reliable enough to ship against, so sparql.ts and all three SPARQL-backed search tools were deleted (-844 lines). What remains in v0.1.1: getDocumentByCelex, getDocumentByEcli, getDocumentByEli, and a verifyCitation that does pure regex validation with no network call. End-to-end verification used Schrems II (CELEX 62018CJ0311). The test describe block was also renamed from "CELLAR REST fetcher" to "EUR-Lex REST fetcher," and the fallback-language test was tightened to match EUR-Lex's actual "not found" HTML rather than an empty body.
The tradeoff is real. Free-text search is gone; callers must already know a CELEX, ECLI, or ELI identifier. The REST fetches hit eur-lex.europa.eu/legal-content/ HTML pages via cheerio scraping, so any EUR-Lex layout change would break retrieval. The module ships its own package-lock.json targeting Node 24 and lives entirely under backend/mcp-servers/eu-law/, so it doesn't touch upstream paths.
Spotted something wrong? Or know the PR text has fresher detail than the writeup above?