home / mcp / peruvian law mcp server

Peruvian Law MCP Server

Provides full-text search, article-level retrieval, citation validation, and currency checks for Peruvian laws via MCP.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "ansvar-systems-peruvian-law-mcp": {
      "url": "https://peruvian-law-mcp.vercel.app/mcp"
    }
  }
}

You can access the Peruvian Law MCP server to search and retrieve Peruvian legislation with full-text search, article-level lookups, citation validation, and currency checks. This MCP server connects you to authoritative legal texts and provides fast, structured results for compliance research and policy work.

How to use

You can use the MCP server through either a remote HTTP endpoint or a local runtime. With the remote option, point your MCP client to the provided URL to perform searches, fetch specific articles, validate citations, and verify law currency. With the local option, install and run the MCP client locally to query the same data without relying on an external service.

How to install

Prerequisites: ensure Node.js is installed on your system. You can verify by running node -v and npm -v in your shell.

Option A: Run the MCP client locally via npx (no installation required for global setup)

npx @ansvar/peruvian-law-mcp

Option B: Install locally and run from your project (requires npm)

npm install @ansvar/peruvian-law-mcp
npx @ansvar/peruvian-law-mcp

Additional notes

The MCP server sources official legal text from Diario Oficial El Peruano and supports discovery/indexing via a GraphQL endpoint and full text rendering through a web visor. Ensure you validate all critical provisions against primary sources and be aware that laws can change over time.

Available tools

full_text_search

Performs comprehensive full-text search across legislation provisions using BM25 ranking to deliver relevant results.

article_level_retrieval

Retrieves exact legal provisions at the article level for precise reference.

citation_validation

Checks citations to prevent hallucinated or incorrect references.

currency_checks

Verifies whether laws are still in force and up to date.

Peruvian Law MCP Server - ansvar-systems/peruvian-law-mcp