ifc-geometry-mcp
MCP server for IFC geometric audit, providing tools to detect space clashes, extract space inventories, compute surface losses, check boundaries, and verify opening correspondences in BIM models.
README
ifc-geometry-mcp
Serveur MCP ifc-geometry d'audit géométrique IFC basé sur IfcOpenShell.
Il fournit le moteur « préliminaire » consommé par
audit-bim-i3f : il analyse une maquette IFC et écrit
5 fichiers JSON que audit-bim-i3f fusionne dans son audit via
import_preliminary_findings (rapport Word, annexe XLSX, topics BCF, Smart Views).
Ce qu'il détecte
| Outil MCP | Fichier produit | Contrôles |
|---|---|---|
run_space_clash_audit |
<stem>_space_clash_findings.json |
doublons de pièces, chevauchements, placards double-modélisés, chevauchement vertical entre étages |
extract_space_inventory |
<stem>_space_inventory.json |
pièces trop petites, écart surface déclarée/recalculée, pièces sans zone / sans étage / sans surface, typologies de zones (T1..T5), continuité & duplex, cohérence de nommage, fraîcheur de l'export |
compute_surface_loss |
<stem>_surface_loss.json |
m² perdus par pièce (empiètement murs / poteaux) |
check_space_boundaries |
<stem>_boundaries.json |
pièces sans IfcRelSpaceBoundary, limites manquantes entre pièces adjacentes |
check_opening_correspondence |
<stem>_openings_check.json |
réservations structure sans ouverture archi correspondante (mode bi-maquette) |
Le vocabulaire de sortie (flags, classifications, sévérités) est le contrat
défini par audit_bim/audit/rules/preliminary.py côté audit-bim-i3f. Ne pas le
modifier sans mettre à jour les deux côtés.
Installation
git clone https://github.com/Slimouzi/ifc-geometry-mcp.git
cd ifc-geometry-mcp
python -m venv .venv && source .venv/bin/activate
# bim-sandbox (sandbox de chemins partagée) n'est PAS publié sur PyPI : on
# l'installe d'abord depuis son tag Git, sinon la résolution de la dépendance
# ``bim-sandbox>=0.1.0,<0.2`` échoue.
pip install "git+https://github.com/Slimouzi/bim-sandbox.git@bim-sandbox-v0.1.0"
pip install -e .
Dépendances clés : ifcopenshell>=0.8, shapely>=2.0, numpy, fastmcp>=3.0
(sur PyPI) et bim-sandbox (tag Git — préinstallation ci-dessus).
Configuration MCP (Claude Desktop / Cowork)
Ajouter dans le bloc mcpServers, en alignant AUDIT_OUTPUT_DIR sur celui
d'audit-bim-i3f pour que les JSON atterrissent là où l'import les lit :
"ifc-geometry": {
"command": "/Users/stani/code/MCP/ifc-geometry-mcp/.venv/bin/ifc-geometry-mcp",
"args": ["--transport", "stdio"],
"env": {
"AUDIT_OUTPUT_DIR": "/Users/stani/code/MCP/audit_out",
"AUDIT_INPUT_DIR": "/Users/stani/code/MCP/audit_in"
}
}
AUDIT_INPUT_DIR: dossier autorisé pour les IFC lus (sandbox). Si absent, des chemins absolus existants sont acceptés (mode local/dev).AUDIT_OUTPUT_DIR: dossier d'écriture des JSON (défaut./out).
Pipeline type (premier run)
extract_space_inventory(ifc_path=".../250613_MN_BAT.ifc")
run_space_clash_audit(ifc_path=...)
compute_surface_loss(ifc_path=...)
check_space_boundaries(ifc_path=...)
check_opening_correspondence(ifc_path=..., structure_ifc_path=...) # optionnel
│ (5 JSON dans AUDIT_OUTPUT_DIR)
▼
audit-bim-i3f : import_preliminary_findings(space_clash_json=..., inventory_json=...,
surface_loss_json=..., boundaries_json=..., openings_json=...)
▼
generate_avp_i3f_pack / generate_word_report → rapport d'audit préliminaire
Les 5 outils sont indépendants et peuvent tourner en parallèle. Voir
Runbook_Cablage_ifc-geometry_Premier_Run.md pour la procédure détaillée.
Seuils (à confirmer avec I3F)
| Paramètre | Défaut | Outil |
|---|---|---|
| surface mini pièce habitable | 9.0 m² |
extract_space_inventory.min_area_threshold_m2 |
| tolérance écart surface | 5.0 % |
extract_space_inventory.area_tol_pct |
| fraîcheur export | 90 j |
extract_space_inventory.stale_after_days |
| recouvrement pièces | 0.10 |
run_space_clash_audit.overlap_min_ratio |
| seuil doublon | 0.90 |
run_space_clash_audit.duplicate_ratio |
| adjacence limites | 0.35 m |
check_space_boundaries.adjacency_tol_m |
| appariement ouvertures | 0.10 m |
check_opening_correspondence.tolerance_m |
Détails géométriques
- Empreinte 2D d'un élément = union (
shapely.unary_union) des facettes du maillage IfcOpenShell (coordonnées monde) projetées sur le plan XY ; les faces verticales, projetées en segments, sont éliminées. - Surface recalculée = aire de cette empreinte ; comparée à la surface déclarée
(
Qto_SpaceBaseQuantities.NetFloorArea). - Perte de surface = intersection de l'empreinte d'une pièce avec celles des
murs/poteaux dont la plage d'altitude recoupe la pièce (indexation
STRtree).
Tests
pytest -q # contrat de schéma + smoke géométrique (mini-maquette IFC)
tests/test_contract.py verrouille la forme des payloads ; tests/test_geometry_smoke.py
construit une petite maquette (2 pièces qui se chevauchent + placard inclus +
mur empiétant) et vérifie que le clash, l'inventaire et les pertes de surface
fonctionnent réellement via IfcOpenShell.
Licence
Apache-2.0 — © Stanislas Limouzi / BIMData.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.