Skip to main content

qavanin-mcp: Iranian laws and regulations MCP server for AI agents ⚖️

Unofficial, read-only MCP server for qavanin.ir (سامانه ملی قوانین و مقررات جمهوری اسلامی ایران), the national database of Iranian laws, regulations, court votes and legal opinions.
Search about 168,000 documents by title or full text, read a law or a single article, see how an article was amended, and follow the regulations and court votes that cite it, all from Claude, Cursor or Copilot.

Quick start · For AI agents · Tools · Notes · فارسی


For AI agents

  • What: unofficial MCP server for qavanin.ir. Queries work in Persian (Arabic ي/ك and Persian ی/ک are equivalent); dates are Jalali YYYY/MM/DD.
  • Install: claude mcp add qavanin -- uvx qavanin-mcp (stdio transport, needs uv and Python 3.10+).
  • Auth: none. Optional QAVANIN_MCP_PROXY sets an HTTP proxy for requests to qavanin.ir.
  • Access: read-only. No login, subscription or purchase calls exist.
  • Tools: 7, all prefixed qv_. Typical sequence: qv_search → qv_law (with article) → qv_amendments → qv_article_history.
  • Use when: looking up what an Iranian law, regulation, court ruling or legal opinion says, when it was approved and published, whether it was amended or repealed, and what cites it.
  • Do not use when: the user needs legal advice or a binding interpretation. The site is a reference database; always say which version and status you read.
  • Output: compact JSON. Document ids (id, the site's IDS) are 20-digit strings: keep them as strings. Output uses Persian letters. Sections marked repealed or amended are not current text.
  • Machine-readable: server.json, and the catalog of all Iranian MCP servers at awesome-iran-mcp.

Quick start

claude mcp add qavanin -- uvx qavanin-mcp
{ "mcpServers": { "qavanin": { "command": "uvx", "args": ["qavanin-mcp"] } } }

Example: «ماده ۱۰ قانون مدنی چه می‌گوید؟» → qv_search(query="قانون مدنی", kind="law") → qv_law(ids=..., article="10").

Tools

Tool What it does
qv_search Search titles or full text, with filters for kind, approving body, executor, subject, type, status, dates and gazette numbers
qv_lookup Find the ids the search filters take: approving bodies, executing bodies, subjects, document types, statuses, curated lists
qv_law Read the text of a law as sections, one article with its notes, or the text as of a past date
qv_law_info Metadata: type, approver, approval, notification and gazette numbers and dates, last status, executors
qv_amendments Which laws amended this one, which it amends, and which of its articles were amended
qv_article_history Every amendment of one article: type, date, amending law, replacing text
qv_related Regulations, court votes and legal opinions related to a law

Notes

  • The site is slow: 1-15 s per call, the civil code about 15 s on first read (it is cached for 5 minutes, so paging through it is fast).
  • The site sometimes ignores search filters and answers with the whole database; the server detects and retries that.
  • Sorting by date has many ties, so paging a long list can repeat or skip a row: narrow the filters instead of paging deep.
  • A bot-check cookie (ArvanCloud) is solved in Python; no browser is needed.

فارسی

سرور MCP غیررسمی و فقط‌خواندنی برای سامانه ملی قوانین و مقررات (qavanin.ir): جستجو در عنوان یا متن حدود ۱۶۸ هزار سند، خواندن متن قانون یا یک ماده، تاریخچهٔ اصلاحات هر ماده و مقررات، آرا و نظرات مرتبط. نصب: claude mcp add qavanin -- uvx qavanin-mcp

License

MIT. Not affiliated with qavanin.ir or the Iranian government.

Metadata

Release files for qavanin-mcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qavanin-mcp 0.1.0
File Size Uploaded Provenance
qavanin_mcp-0.1.0.tar.gz 130.8 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for qavanin-mcp 0.1.0
File Interpreter ABI Platform
qavanin_mcp-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 152.4 kB

Release files / qavanin_mcp-0.1.0.tar.gz

Download URL qavanin_mcp-0.1.0.tar.gz
Size 130.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5869f1c416ba8ad92252eb2884609a927cea53171a2b529831e2e1f8b7435dfc
BLAKE2b-256 checksum
How to use checksums
0713b2ce424d77204f94931bb2c2b6c0335fd2edfc6e538c8609407dbfe1a5de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Release files / qavanin_mcp-0.1.0-py3-none-any.whl

Download URL qavanin_mcp-0.1.0-py3-none-any.whl
Size 21.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
364cb10a63e82033b15d30a2095f28b6f5fd1b11ef1f9cdc6233601d990e9d6e
BLAKE2b-256 checksum
How to use checksums
e46b614085354f568df4db4cbca465f21aa7e8407774d4e5b5ec90ee7489d8da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Security for qavanin-mcp 0.1.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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for qavanin_mcp-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page