Purpose
ifc-ruhsat is used to perform an automated pre-check of IFC models before submitting a building permit (yapı ruhsatı) project in Turkey. The Turkish Regulation on the Digital Preparation of Building and Engineering Projects (Official Gazette 5 August 2026, No. 33331, effective 1 September 2027) requires the IFC model of every permit project to comply with the 241-page annex and requires an EK-9 model quality control table to be issued with each delivery. The tool converts these annexes into machine-executable rules: it reads the model, reports missing items by clause number, and fills in the EK-9 table.
Main capabilities
- Encodes the full content of the 68 mandatory class tables in EK-6, checked page by page against the final Official Gazette annex; each property is tested and verified against the IFC 4.3 schema, and each property set against the official buildingSMART Pset templates.
- Checks the mandatory IFC 4.3 classes and three-digit class codes specified in EK-5, and prohibits proxy classes (EK-6 6.1.3).
- Checks the property and property set requirements of each class in EK-6, as well as the project, person, organization and TUREF coordinate requirements in EK-7 (including the Turkey-specific TREpys_ sets).
- Generates the 21-row EK-9 model quality control table, giving "Yes / No / Partial / Manual" and the basis for each row.
- Every finding cites the clause and annex table and lists the GlobalId.
- Geometry checks (room volumes, overlaps, elevations) are based on bounding boxes: fast but coarse; L-shaped rooms may produce false positives, which is noted in the finding text.
- Provides buildingSMART IDS files usable in Solibri, BIMcollab, and usBIM.
- Modeling-software-agnostic: Revit, Archicad, Allplan, Bonsai, etc. all work as long as they output IFC.
Usage
Requires Python 3.10+. If uv is installed, no installation is needed; simply run uvx ifc-ruhsat … directly; a persistent installation is also possible.
The MCP mode supports Claude Desktop, Claude Code, Cursor, and any client that supports MCP. The model tools (model_ozeti、yonetmelik_kontrolu、ek9_formu) accept a file path or ifc_metni(IFC text, plus dosya_adi). All tools are read-only and carry MCP annotations (readOnlyHint、destructiveHint: false、idempotentHint、openWorldHint: false); each tool description states when to use it, input examples, and the return format. The server only reads the given files, sends nothing over the network, and does not write persistently. Agents such as Cline can complete the installation on their own based on llms-install.md .
Remote server (Docker):ifc-ruhsat mcp --http is exposed via streamable HTTP at http://<host>:8080/mcp (stateless; multiple replicas can run behind a load balancer). In remote mode, for security reasons, file parameters are disabled: the server does not read any path on its own disk, and passing one returns a "remote files are disabled" error; models must be provided via ifc_metni Send (the server opens it in a temporary directory and deletes it after processing). The image is based on Python 3.12 slim and runs as a non-root user (uid 10001); the key is only a simple shared secret, and when exposed to the internet it should be placed behind a reverse proxy that terminates TLS.
Applicable scenarios
- Design firms self-check the gap between IFC models and regulatory annexes before submitting for a permit.
- Through MCP, directly ask in Claude/Cursor whether a model is compliant, what attributes a certain type of object requires, and which clause a certain error is based on.
- Use IDS for rule checking in Solibri/BIMcollab/usBIM.
- Evaluate "readiness" on public models: according to the materials, when run on three public models without any modification, typical Revit output has a relatively large gap from regulatory requirements but is quantifiable, mainly involving migration to IFC 4.3, proxy class classification, naming templates, fire/use attributes, and Turkey-specific parcel/floor area ratio sets; the tool lists them by GlobalId. The materials also point out that the regulations themselves have gaps: the IfcPlate into which Revit places curtain wall panels is not in the two lists of EK-5.
Limitations
- It is only an automated pre-check, not legal advice; the final assessment belongs to the project designer and the relevant competent authority.
- Some clauses (LOD, room geometry, consistency between PDF and IFC) cannot be machine-verified, and the tool explicitly marks them as "manual" and does not count them as passed.
- Geometry checks are based on bounding boxes and may produce false positives for L-shaped rooms.
- In remote mode, server-local file paths cannot be read.
Custom rules
Regulatory data is located in src/ifc_ruhsat/ekler/*.json, and each file is in the kaynak field to indicate the source. To add an EK-6 table: read the corresponding official gazette page, and in ek6_ozellikler.json write the rows and page numbers, then run the tests. To add a rule: under src/ifc_ruhsat/kurallar/ create a new module with the signature kontrol(baglam) -> list[Bulgu] , and in kontrol.py add a line to MODULLER . Each finding must be associated with a clause and an EK-9 row; rules without a basis must not be added.
License
MIT. The regulatory texts and annexes are public documents; the JSON files in the repository are the machine form of these annexes, and each file indicates which page it was taken from.