An MCP (Model Context Protocol) server that exposes the Italian legislative database Normattiva to AI assistants. Built with Laravel 13 and deployed serverlessly on AWS Lambda via Bref.
This project wraps the Normattiva public API into a set of MCP tools, making it possible for AI assistants (Claude, Cursor, etc.) to search, retrieve, and read Italian legislation in context — without manual browsing.
The server is publicly available at:
https://api.losapio.dev/mcp/normattiva
| Tool | Description |
|---|---|
search-acts-simple |
Full-text search across legislative acts |
search-acts-advanced |
Structured search with filters (type, year, date range…) |
get-act-details-by-urn |
Retrieve an act or specific article by URN NIR (e.g. urn:nir:stato:legge:2001-12-28;448~art2) |
get-act-details |
Retrieve an act using redactional code and GU date |
search-updated-acts |
List acts updated within a given date/time interval |
get-act-denominations |
List available act denominations and their codes |
get-available-extensions |
List available download formats |
get-provision-class-types |
List provision class types and codes |
- PHP 8.5 / Laravel 13
- laravel/mcp — official MCP server package for Laravel
- Bref — PHP runtime for AWS Lambda
- Serverless Framework — infrastructure and deployment
- AWS Lambda (arm64,
eu-central-1) - SSM Parameter Store — secrets management (
APP_KEY,APP_URL,SENTRY_LARAVEL_DSN) - Sentry — error tracking
Add the following to your MCP configuration:
{
"mcpServers": {
"normattiva": {
"type": "url",
"url": "https://api.losapio.dev/mcp/normattiva"
}
}
}For Claude Desktop, edit claude_desktop_config.json (usually found in ~/Library/Application Support/Claude/ on macOS or %APPDATA%\Claude\ on Windows).
Any client that supports the MCP SSE transport can connect to https://api.losapio.dev/mcp/normattiva.
- PHP 8.5+
- Composer
git clone https://github.com/cirolosapio/normattiva-mcp.git
cd normattiva-mcp
composer install
cp .env.example .env
php artisan key:generate
php artisan serveThe project deploys to AWS Lambda using the Serverless Framework and Bref.
serverless deploySecrets are read from SSM Parameter Store at deploy time. Make sure the following parameters exist under /<service-name>/:
APP_KEYAPP_URLSENTRY_LARAVEL_DSN