eu.ansvar/costa-rican-law-mcp

Costa Rican legislation via MCP — full-text search across statutes and provisions

0NOASSERTIONsearch

Install

Config snippet generator goes here (5 client tabs)

README

# Costa Rican Law MCP Server

**The SCIJ alternative for the AI age.**

[![npm version](https://badge.fury.io/js/@ansvar%2Fcosta-rican-law-mcp.svg)](https://www.npmjs.com/package/@ansvar/costa-rican-law-mcp)
[![MCP Registry](https://img.shields.io/badge/MCP-Registry-blue)](https://registry.modelcontextprotocol.io)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![GitHub stars](https://img.shields.io/github/stars/Ansvar-Systems/Costa-Rican-law-mcp?style=social)](https://github.com/Ansvar-Systems/Costa-Rican-law-mcp)
[![CI](https://github.com/Ansvar-Systems/Costa-Rican-law-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/Ansvar-Systems/Costa-Rican-law-mcp/actions/workflows/ci.yml)
[![Provisions](https://img.shields.io/badge/provisions-120%2C455-blue)]()

Query **16,724 Costa Rican laws** -- from the Penal Code and Data Protection Law to the Telecommunications Law, Digital Signatures Act, and more -- directly from Claude, Cursor, or any MCP-compatible client.

If you're building legal tech, compliance tools, or doing Costa Rican legal research, this is your verified reference database.

Built by [Ansvar Systems](https://ansvar.eu) -- Stockholm, Sweden

---

## Why This Exists

Costa Rican legal research means navigating [SCIJ](https://pgrweb.go.cr/scij/) (Sistema Costarricense de Informacion Juridica), downloading HTML pages from an ASP.NET portal, and manually cross-referencing between laws and articles. Whether you're:

- A **lawyer** validating citations in a brief or contract
- A **compliance officer** checking data protection obligations under Ley 8968
- A **legal tech developer** building tools on Costa Rican law
- A **researcher** tracing legislative provisions across 16,724 laws

...you shouldn't need dozens of browser tabs and manual cross-referencing. Ask Claude. Get the exact provision. With context.

This MCP server makes Costa Rican law **searchable, cross-referenceable, and AI-readable**.

---

## Quick Start

### Use Remotely (No Install Needed)

> Connect directly to the hosted version -- zero dependencies, nothing to install.

**Endpoint:** `https://costa-rican-law-mcp.vercel.app/mcp`

| Client | How to Connect |
|--------|---------------|
| **Claude.ai** | Settings > Connectors > Add Integration > paste URL |
| **Claude Code** | `claude mcp add costa-rican-law --transport http https://costa-rican-law-mcp.vercel.app/mcp` |
| **Claude Desktop** | Add to config (see below) |
| **GitHub Copilot** | Add to VS Code settings (see below) |

**Claude Desktop** -- add to `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "costa-rican-law": {
      "type": "url",
      "url": "https://costa-rican-law-mcp.vercel.app/mcp"
    }
  }
}
```

**GitHub Copilot** -- add to VS Code `settings.json`:

```json
{
  "github.copilot.chat.mcp.servers": {
    "costa-rican-law": {
      "type": "http",
      "url": "https://costa-rican-law-mcp.vercel.app/mcp"
    }
  }
}
```

### Use Locally (npm)

```bash
npx @ansvar/costa-rican-law-mcp
```

**Claude Desktop** -- add to `claude_desktop_config.json`:

**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
**Windows:** `%APPDATA%\Claude\claude_desktop_config.json`

```json
{
  "mcpServers": {
    "costa-rican-law": {
      "command": "npx",
      "args": ["-y", "@ansvar/costa-rican-law-mcp"]
    }
  }
}
```

**Cursor / VS Code:**

```json
{
  "mcp.servers": {
    "costa-rican-law": {
      "command": "npx",
      "args": ["-y", "@ansvar/costa-rican-law-mcp"]
    }
  }
}
```

---

## Example Queries

Once connected, just ask naturally:

- *"What does Ley 8968 say about data protection consent?"*
- *"Find provisions about delitos informaticos in Costa Rican law"*
- *"Is the Telecommunications Law (Ley 8642) still in force?"*
- *"What does Article 196 bis of the Penal Code say about computer crimes?"*
- *"Search for firma digital requirements across Costa Rican statutes"*
- *"Validate the citation 'Articulo 5 Ley 8968'"*
- *"Build a legal stance on personal data protection in Costa Rica"*

---

## What's Included

| Category | Count | Details |
|----------|-------|---------|
| **Laws** | 16,724 statutes | Census-first from SCIJ (18,761 discovered, 15,997 accessible) |
| **Provisions** | 120,455 articles | Full-text searchable with FTS5 |
| **Legal Definitions** | 3,620 definitions | Extracted from definition articles |
| **Database Size** | ~276 MB | Optimized SQLite, portable |
| **Weekly Freshness Checks** | Automated | Drift detection against SCIJ |

### Key Laws

| Law | Description | Provisions |
|-----|-------------|-----------|
| Ley 8968 | Data Protection Law | Personal data, consent, data subject rights |
| Ley 9048 | Computer Crime Reform | Cybercrime provisions in the Penal Code |
| Ley 8642 | General Telecommunications Law | Telecom regulation and oversight |
| Ley 8454 | Digital Signatures and Certificates | Electronic documents and PKI |
| Ley 4573 |