mozaia-laws-mcp
MCP server for real-time access to Mozambican legislation, enabling search, status checks, article retrieval, historical versions, and citation resolution via the Mozaia platform.
README
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.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。