az-gov-mcp
# az-gov-mcp
An MCP server that gives AI assistants the in-force text of Azerbaijani law and official state wording, read
live from the primary sources: [e-qanun.az](https://e-qanun.az), [president.az](https://president.az) and
[mfa.gov.az](https://mfa.gov.az). No API keys, no dependencies beyond the Python standard library.
Language models misquote legal articles and invent official titles. This server lets them cite the source.
## Tools
| Tool | Returns |
|---|---|
| `eqanun_akt` | Title, number, adoption date and legal status of an act |
| `eqanun_madde` | Verbatim in-force text of an article (Maddə) |
| `eqanun_bend` | Verbatim text of a numbered clause (bənd) in Cabinet or Presidential acts |
| `eqanun_axtar` | Articles of an act that contain a word |
| `president_axtar` | president.az search: official titles and document links |
| `president_metn` | Clean text of a president.az page |
| `mfa_metn` | Clean text of a mfa.gov.az page |
| `olke_adi` | Official Azerbaijani name of a state, full and short form (195 states) |
e-qanun.az pages mix cp1254 bytes into UTF-8, keep repealed clauses as struck-through text and repeat earlier
wordings in footnotes. The server handles all three, so `eqanun_madde` returns only the current text.
`framework_id` is the number in an e-qanun.az link: the Constitution is `https://e-qanun.az/framework/897`.
## Install
```bash
pip install git+https://github.com/khanprod/az-gov-mcp
```
Claude Code:
```bash
claude mcp add az-gov -- az-gov-mcp
```
Claude Desktop or any MCP client (`claude_desktop_config.json`):
```json
{ "mcpServers": { "az-gov": { "command": "az-gov-mcp" } } }
```
## Tests
```bash
PYTHONPATH=src python3 -m unittest -v tests.test_server
AZ_GOV_MCP_LIVE=1 PYTHONPATH=src python3 -m unittest tests.test_server.Live
```
## Azərbaycanca
AI köməkçilərinə qüvvədə olan qanun mətnini və rəsmi adlandırmanı birbaşa e-qanun.az, president.az və
mfa.gov.az mənbələrindən verən MCP serveri. Maddə və bənd mətni hərfi hərfinə, ləğv edilmiş bəndlər çıxarılmış
şəkildə qaytarılır.
## License
MIT
TDQS
Scored across 8 tools
Each tool targets a distinct resource and action: act details, article text, clause text, within-act search, president search, president page text, MFA page text, and country name lookup. Although eqanun_madde and eqanun_bend both return verbatim legal text, their article-vs-clause granularity is clearly stated, and the site-specific metn tools are unambiguous.
Names use consistent snake_case and a source/domain prefix pattern (eqanun_, president_, mfa_, olke_). The main deviation is that some tools end with a noun (akt, madde, metn) while others end with a verb (axtar), and olke_adi lacks a source prefix, but the style remains predictable.
Eight tools is well within the ideal 3-15 range for a multi-source retrieval server. Each tool covers a specific retrieval need across legal, presidential, and MFA sources, with no redundant entries.
The server covers act details, article/clause retrieval, within-act search, president search/page text, MFA page text, and country names. However, notable gaps exist: no global search across legal acts (to discover an act by title or keyword), and no search capability for mfa.gov.az, which limits discovery workflows.