mozaia-laws-mcp
MCP server for the Mozambican law library — give any AI agent real-time access to Mozambican legislation: current text, historical versions, validity status, and citation resolution.
Built on the Mozaia legal intelligence platform. Covers 42 legal domains, 225+ instruments from the Boletim da República, with authoritative citators and temporal versioning.
Quick start
# Install
pip install mozaia-laws-mcp
# Or run without installing (requires uvx)
uvx mozaia-laws-mcp
Get an API key at mozaia.mz/developers (free tier available).
Installation
pip / uv
pip install mozaia-laws-mcp
uv add mozaia-laws-mcp
Claude Desktop
Add to claude_desktop_config.json
(~/Library/Application Support/Claude/ on macOS, %APPDATA%\Claude\ on Windows):
{
"mcpServers": {
"mozaia-laws": {
"command": "mozaia-laws-mcp",
"env": {
"MOZAIA_API_KEY": "sk-mozaia-your-key-here",
"MOZAIA_BASE_URL": "https://api.mozaia.mz"
}
}
}
}
Cursor / VS Code (Copilot)
{
"mcp": {
"servers": {
"mozaia-laws": {
"command": "mozaia-laws-mcp",
"env": {
"MOZAIA_API_KEY": "sk-mozaia-your-key-here"
}
}
}
}
}
uvx (no install)
{
"mcpServers": {
"mozaia-laws": {
"command": "uvx",
"args": ["mozaia-laws-mcp"],
"env": {
"MOZAIA_API_KEY": "sk-mozaia-your-key-here"
}
}
}
}
Configuration
| Variable | Required | Default | Description |
|---|---|---|---|
MOZAIA_API_KEY |
Yes | — | API key (sk-mozaia-<hex>). Get one at mozaia.mz/developers |
MOZAIA_BASE_URL |
No | https://api.mozaia.mz |
Override for on-premise or staging |
MOZAIA_TIMEOUT |
No | 30 |
HTTP timeout in seconds |
Tools
search_semantic — natural language search over articles
The primary search tool. Use it when the user asks a legal question in plain language.
Inputs:
| Field | Type | Required | Description |
|---|---|---|---|
q |
string | Yes | Legal question in natural language |
top_k |
integer | No | Number of results, max 50 (default: 10) |
Example:
search_semantic(q="qual é o prazo de aviso prévio no contrato de trabalho?")
search_semantic(q="indemnização por despedimento sem justa causa", top_k=5)
Returns: ranked article list with excerpt, canonical citation, relevance score, and hit type.
get_law_relationships — normative graph
Reveals the full normative chain: what a diploma revokes, amends, implements, and which later instruments affect it. Use before citing a law to ensure it hasn't been superseded by a downstream instrument.
Inputs:
| Field | Type | Required | Description |
|---|---|---|---|
law_id |
string | Yes | Canonical diploma identifier |
relation_type |
string | No | Filter: amends, revokes, supersedes, references, complements, conflicts, implements, suspends, exceptions |
Example:
get_law_relationships(law_id="lei_trabalho_2007")
get_law_relationships(law_id="lei_trabalho_2007", relation_type="revokes")
Returns: outgoing and incoming relationships with peer law_id, effective date, and confidence score.
list_amendments — article version history
Returns every version of an article since original publication, with the amending law and date of each change. Essential for retroactivity analysis and past-fact disputes.
Inputs:
| Field | Type | Required | Description |
|---|---|---|---|
law_id |
string | Yes | Diploma identifier |
article_number |
string | Yes | Article number, e.g. "70" |
Example:
list_amendments(law_id="lei_trabalho_2023", article_number="128")
Returns: chronological list of versions — text, version label, amending law, validity range, and is_current flag.
search_laws — find a diploma by name or topic
Use this first when you know a law by name or subject but not its law_id.
Inputs:
| Field | Type | Required | Description |
|---|---|---|---|
q |
string | No | Free text: title, number (3/2022), or partial law_id |
domain |
string | No | Canonical legal domain, e.g. labour_law, tax_law, family_law |
instrument_type |
string | No | lei, decreto, codigo, regulamento |
year |
integer | No | Publication year, e.g. 2022 |
page |
integer | No | Page number (default: 1) |
page_size |
integer | No | Results per page, max 50 (default: 20) |
Example:
search_laws(q="trabalho", domain="labour_law", year=2023)
Returns: paginated list with law_id, title, type, status, legal domain, and quota balance.
get_law_status — check if a diploma is in force
Inputs:
| Field | Type | Required | Description |
|---|---|---|---|
law_id |
string | Yes | Canonical identifier, e.g. lei_trabalho_2023, constituicao_2004 |
Example:
get_law_status(law_id="lei_trabalho_2023")
Returns: validity status (active / revoked / superseded), revoked_by_law_id when applicable, full citator badge, and publication metadata.
get_article — current text of an article
Inputs:
| Field | Type | Required | Description |
|---|---|---|---|
law_id |
string | Yes | Diploma identifier |
article_number |
string | Yes | Article number, e.g. "15", "70", "102" |
Example:
get_article(law_id="lei_trabalho_2023", article_number="70")
Returns: full article text, amendment/revocation status, and citator with Boletim da República reference.
get_article_at_date — historical version of an article
Retrieves the exact text that was in force on a given past date. Essential for retroactivity analysis, past-fact disputes, and temporal conflicts between norms.
Inputs:
| Field | Type | Required | Description |
|---|---|---|---|
law_id |
string | Yes | Diploma identifier |
article_number |
string | Yes | Article number |
as_of |
string | Yes | ISO 8601 date, e.g. "2021-03-15" |
Example:
get_article_at_date(law_id="codigo_civil_1966", article_number="217", as_of="2019-06-01")
Returns: article text at the requested date, version number, validity range, is_current flag, and temporal_alert if the norm changed shortly before or after.
cite — resolve a Portuguese legal citation
Parses a free-text Portuguese citation and resolves it to a structured law_id + article record.
Inputs:
| Field | Type | Required | Description |
|---|---|---|---|
citation |
string | Yes | Citation string in Portuguese |
Accepted formats:
"Lei n.º 3/2022, artigo 15.º""Decreto-Lei n.º 1/2020""Constituição da República, artigo 70.º""art. 102 do Código Civil"
Example:
cite(citation="Lei n.º 3/2022, artigo 15.º")
Returns: parsed_law_number, parsed_article_number, resolved_law, resolved_article, confidence score (0–1), and unresolved_reason when the diploma is not in the database.
Typical agent workflow
1. cite("Lei n.º 23/2007, artigo 128.º")
→ law_id: "lei_trabalho_2007", article: "128", confidence: 0.97
2. get_law_status(law_id="lei_trabalho_2007")
→ status: "revoked", revoked_by: "lei_trabalho_2023"
3. get_article(law_id="lei_trabalho_2023", article_number="128")
→ current text + citator
4. (if analysing a past case)
get_article_at_date(law_id="lei_trabalho_2007", article_number="128", as_of="2018-01-01")
→ text that was in force in 2018
Error handling
| HTTP | MCP response |
|---|---|
401 |
"Erro: API key inválida ou expirada." |
402 |
"Erro: Quota mensal esgotada. Contactar suporte." |
404 |
{"error": "not_found", "detail": "..."} |
422 |
{"error": "invalid_input", "detail": "..."} |
| timeout | "Timeout ao contactar a API Mozaia. Tente novamente." |
Pricing
| Tier | Credits/month | Price | Best for |
|---|---|---|---|
| Community | 1 000 | Free | Evaluation, personal projects |
| Institutional | 10 000 | — | Legal firms, NGOs, universities |
| Commercial | 50 000 | — | SaaS products, fintechs |
| Strategic | 500 000 | — | Platforms, enterprise integrations |
1 credit = 1 API call. Credits reset on the 1st of each month. Get a key and upgrade at mozaia.mz/developers.
Legal domains supported
labour_law · tax_law · family_law · commercial_law · criminal_law · civil_law · administrative_law · constitutional_law · environmental_law · land_law · mining_law · consumer_law · and 30 more.
Full list: search_laws(domain=<domain>) returns an empty list with a 422 if the domain is invalid.
Requirements
- Python 3.11+
- Network access to
api.mozaia.mz(or your configuredMOZAIA_BASE_URL) - A valid
MOZAIA_API_KEY
License
MIT — see LICENSE.
Data provided through this MCP server is subject to the Mozaia Terms of Service.
Metadata
Release files for mozaia-laws-mcp 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mozaia_laws_mcp-0.2.0.tar.gz | 8.6 kB | Without provenance | Details for mozaia_laws_mcp-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mozaia_laws_mcp-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for mozaia_laws_mcp-0.2.0-py3-none-any.whl |
Total release size: 18.6 kB
Release files / mozaia_laws_mcp-0.2.0.tar.gz
| Download URL | mozaia_laws_mcp-0.2.0.tar.gz |
|---|---|
| Size | 8.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5aed4b7745e31151987d34310870ad3eed1b70cf7eddf14f6e2f419a97aac0fa
|
|
BLAKE2b-256 checksum How to use checksums |
2c173ee1efb4a474230bb48aa3bea0855e4e2d48f2b802fd2c66cb53bbcc33c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.14.5 Windows/11
|
Release files / mozaia_laws_mcp-0.2.0-py3-none-any.whl
| Download URL | mozaia_laws_mcp-0.2.0-py3-none-any.whl |
|---|---|
| Size | 10.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e0ccc4edde37c63e9dbdb2d83c1a351a421b75fc7fdf523e26aaa5e710eeae13
|
|
BLAKE2b-256 checksum How to use checksums |
5530c9dd9eac6dbbff239208bc21ffe629fbb058a4bd1cf9be2b95712f1241ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.14.5 Windows/11
|
Security for mozaia-laws-mcp 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.