@notset/boe-legal-mcp
v0.2.0
Published
MCP server for Spanish legislation. Access Spain's entire consolidated legal database (BOE) from Claude, Cursor, or any MCP-compatible AI agent.
Maintainers
Readme
@notset/boe-legal-mcp
MCP server to access Spain's entire consolidated legal database (BOE) from Claude, Cursor, or any MCP-compatible AI agent.
Zero config. No API keys. Always up to date.
Quick Start
Add to your MCP host configuration:
{
"mcpServers": {
"boe-legal": {
"command": "npx",
"args": ["-y", "@notset/boe-legal-mcp"]
}
}
}Then ask your AI assistant:
- "¿Qué dice el artículo 14 de la Constitución Española?"
- "Busca leyes sobre protección de datos"
- "¿Qué obligaciones fiscales tiene un autónomo?"
Tools
| Tool | Description |
|---|---|
| search_legislation | Search laws by title, full text, subject, rank, date, or status |
| get_law | Get full metadata and legal analysis for a specific law |
| get_article | Get the exact text of a specific article from any law |
| get_law_index | Browse a law's structure (titles, chapters, articles) |
| get_law_analysis | Get legal references: repeals, amendments, subjects |
| get_auxiliary_tables | Get BOE reference codes (subjects, law types, departments) |
Common Law IDs
| Law | BOE ID |
|---|---|
| Constitución Española | BOE-A-1978-31229 |
| Código Civil | BOE-A-1889-4763 |
| Código Penal | BOE-A-1995-25444 |
| Estatuto de los Trabajadores | BOE-A-2015-11430 |
| LOPDGDD (Protección de datos) | BOE-A-2018-16673 |
| Ley General Tributaria | BOE-A-2003-23186 |
| Ley IRPF | BOE-A-2006-20764 |
| Ley IVA | BOE-A-1992-28740 |
| Ley Autónomos (LETA) | BOE-A-2007-13409 |
| Ley Arrendamientos Urbanos | BOE-A-1994-26003 |
Examples
Search legislation
User: "Search for laws about protección de datos"
→ Tool: search_legislation({ query: "protección datos" })
→ Returns: LOPDGDD (BOE-A-2018-16673) and related regulationsGet article text
User: "What does Article 14 of the Constitution say?"
→ Tool: get_article({ boe_id: "BOE-A-1978-31229", article_id: "a14" })
→ Returns: "Los españoles son iguales ante la ley..."Browse a law
User: "Show me the structure of the Workers' Statute"
→ Tool: get_law_index({ boe_id: "BOE-A-2015-11430" })
→ Returns: Full table of contents with article IDsData Source
All data comes directly from the official BOE Open Data API maintained by the Agencia Estatal Boletín Oficial del Estado (AEBOE).
- ✅ Always up to date (live API)
- ✅ Covers state and autonomous community legislation
- ✅ Consolidated texts with full amendment history
Requirements
- Node.js ≥ 18
- Internet connection (queries the BOE API in real time)
Legal Notice
⚖️ Consolidated legal texts are informational and have no official legal validity. For decisions with legal implications, always consult a qualified legal professional and the official publication in the BOE.
License
MIT — NotSet
