๐ IDS MCP Server
AI-powered creation of buildingSMART IDS files with 100% compliance
An MCP (Model Context Protocol) server that enables AI agents to deterministically create, validate, and manage Information Delivery Specification (IDS) files that are fully compliant with the buildingSMART IDS 1.0 standard.

โจ Features
- โ
100% IDS 1.0 Compliant - All exports validate against official XSD schema
- โ
IfcTester Integration - Uses the official IfcOpenShell library
- โ
FastMCP Context-Based Sessions - Automatic session management
- โ
Test-Driven Development - 95%+ code coverage with comprehensive tests
- โ
Deterministic Output - Same input always produces identical output
- โ
Type-Safe - Full type hints with Pydantic validation
๐ Quick Start
๐ฆ Installation
git clone https://github.com/Quasar-Consulting-Group/ifc-ids-mcp.git
cd ifc-ids-mcp
pip install -r requirements.txt
pip install -e .
๐ป Usage with Claude Desktop
Add to your Claude Desktop configuration (claude_desktop_config.json):
{
"mcpServers": {
"ids-mcp": {
"command": "python",
"args": ["-m", "ids_mcp_server"],
"env": {
"IDS_LOG_LEVEL": "INFO"
}
}
}
}
๐ป Programmatic Usage
from ifctester import ids
my_ids = ids.Ids(title="Project Requirements")
spec = ids.Specification(name="Wall Requirements", ifcVersion=["IFC4"])
spec.applicability.append(ids.Entity(name="IFCWALL"))
requirement = ids.Property(
baseName="FireRating",
propertySet="Pset_WallCommon",
cardinality="required"
)
spec.requirements.append(requirement)
my_ids.specifications.append(spec)
my_ids.to_xml("requirements.ids")
๐ Available MCP Tools
๐ Document Management
- create_ids - Create new IDS document
- load_ids - Load existing IDS from file or XML string
- export_ids - Export IDS to XML with validation
- get_ids_info - Get document structure and metadata
๐ Specification Management
- add_specification - Add specification with IFC version and cardinality
๐ฏ Facet Management
๐ Basic Facets
- add_entity_facet - Add IFC entity type filter (e.g., IFCWALL)
- add_property_facet - Add property requirements
- add_attribute_facet - Add IFC attribute requirements
๐ Advanced Facets
- add_classification_facet - Add classification requirements
- add_material_facet - Add material requirements
- add_partof_facet - Add spatial relationship requirements
โ๏ธ Restriction Management
- add_enumeration_restriction - Constrain to list of valid values
- add_pattern_restriction - Constrain with regex pattern
- add_bounds_restriction - Constrain numeric ranges
- add_length_restriction - Constrain string length
โ
Validation
- validate_ids - Validate IDS document against XSD schema
- validate_ifc_model - Validate IFC model against IDS (bonus feature)
๐ง Early Validation & Constraint Checking
The MCP server includes early validation to catch IDS 1.0 schema violations immediately when tools are called, rather than waiting until export time. This provides AI agents with clear, actionable error messages.
๐ IDS 1.0 Schema Constraints
1. Single Entity Facet per Applicability
Constraint: IDS 1.0 allows only ONE entity facet per specification's applicability section.
Early Validation: The add_entity_facet tool validates this constraint before adding the facet:
add_entity_facet(spec_id="S1", location="applicability", entity_name="IFCWALL")
add_entity_facet(spec_id="S1", location="applicability", entity_name="IFCDOOR")
Workaround: Create separate specifications for each entity type:
add_specification(name="Wall Requirements", ifc_versions=["IFC4"], identifier="S1")
add_entity_facet(spec_id="S1", location="applicability", entity_name="IFCWALL")
add_specification(name="Door Requirements", ifc_versions=["IFC4"], identifier="S2")
add_entity_facet(spec_id="S2", location="applicability", entity_name="IFCDOOR")
2. Property Set Required for Property Facets
Constraint: IfcTester requires property_set parameter for valid IDS export.
Early Validation: The add_property_facet tool validates this requirement before adding the facet:
add_property_facet(
spec_id="S1",
location="requirements",
property_name="FireRating"
)
add_property_facet(
spec_id="S1",
location="requirements",
property_name="FireRating",
property_set="Pset_WallCommon"
)
Common Property Sets:
Pset_WallCommon - Wall properties
Pset_DoorCommon - Door properties
Pset_WindowCommon - Window properties
Pset_SpaceCommon - Space properties
Pset_Common - Custom/generic properties
๐ Benefits of Early Validation
- Immediate Feedback - Errors caught at tool invocation, not export time
- Clear Error Messages - Includes workarounds and examples
- Prevents Invalid States - IDS documents stay valid throughout creation
- Better AI Agent Experience - Agents receive actionable guidance
See CLAUDE.md for detailed documentation on IDS 1.0 constraints.
๐๏ธ Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ AI Agent (Claude, GPT) โ
โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MCP Protocol
โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโ
โ FastMCP Server โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ MCP Tools (15+ tools) โ โ
โ โโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Session Manager (Context) โ โ
โ โโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ IfcTester Integration (IDS Engine) โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
IDS XML File (100% XSD compliant)
๐ ๏ธ Development
๐งช Test-Driven Development
This project strictly follows TDD methodology:
pytest tests/ -v
pytest tests/ --cov=src/ids_mcp_server --cov-report=html
pytest tests/unit/ -v
pytest tests/integration/ -v
pytest tests/validation/ -v
pytest tests/ --cov-fail-under=95
๐ TDD Workflow (Red-Green-Refactor)
- RED - Write failing test
- GREEN - Implement minimum code to pass
- REFACTOR - Improve code quality
Example:
def test_create_specification():
result = add_specification(name="Test", ifc_versions=["IFC4"])
assert result["status"] == "success"
def add_specification(name, ifc_versions):
return {"status": "success"}
๐จ Code Quality
black src/ tests/
ruff check src/ tests/
mypy src/
๐ Project Structure
ifc-ids-mcp/
โโโ src/
โ โโโ ids_mcp_server/
โ โโโ __init__.py
โ โโโ __main__.py
โ โโโ server.py # FastMCP server
โ โโโ config.py # Configuration
โ โโโ version.py # Version management
โ โโโ session/ # Session management
โ โ โโโ manager.py
โ โ โโโ storage.py
โ โ โโโ cleanup.py
โ โ โโโ models.py # Session data models
โ โโโ tools/ # MCP tools (17 total)
โ โโโ document.py
โ โโโ specification.py
โ โโโ facets.py
โ โโโ restrictions.py # Phase 007
โ โโโ validation.py # Phase 008
โ โโโ validators.py # Early validation helpers
โโโ tests/ # 168 tests, 94% coverage
โ โโโ unit/ # Unit tests
โ โโโ component/ # Component tests
โ โโโ integration/ # Integration tests
โ โโโ validation/ # XSD compliance tests
โ โโโ fixtures/ # Test fixtures
โโโ samples/ # Sample IDS/IFC files
โ โโโ wall_fire_rating.ids
โ โโโ walls-fire-rating.ifc
โโโ specs/ # Implementation plans (PRDs)
โโโ .mcp.json # MCP server configuration
โโโ .coveragerc # Coverage configuration
โโโ constitution.md # Project principles
โโโ DESIGN_SPECIFICATION.md # Technical specification
โโโ CLAUDE.md # AI agent guide
โโโ pyproject.toml
โโโ pytest.ini
โโโ README.md
๐ Constitution Principles
This project follows 6 non-negotiable principles:
- 100% IDS Schema Compliance - All exports validate against XSD
- Test-Driven Development - 95%+ coverage, tests before code
- IfcTester Integration First - No custom XML generation
- Deterministic Generation - Identical input = identical output
- FastMCP Context-Based Sessions - Automatic session management
- Python Best Practices - Type hints, PEP 8, modern Python
See constitution.md for full details.
๐ Documentation
- Constitution - Non-negotiable principles
- Design Specification - Complete technical design
- AI Agent Guide - Guide for AI agents working on this project
- Implementation Plans - Phase-by-phase PRDs
๐ฆ Dependencies
๐ง Core
- fastmcp - MCP server framework
- ifctester - IDS authoring and validation (from IfcOpenShell)
- pydantic - Data validation
๐ ๏ธ Development
- pytest - Testing framework
- pytest-asyncio - Async test support
- pytest-cov - Coverage reporting
- black - Code formatting
- ruff - Linting
๐ References
- IDS Standard: https://www.buildingsmart.org/standards/bsi-standards/information-delivery-specification-ids/
- IDS XSD Schema: https://standards.buildingsmart.org/IDS/1.0/ids.xsd
- IfcTester Docs: https://docs.ifcopenshell.org/ifctester.html
- FastMCP: https://gofastmcp.com/
- buildingSMART: https://www.buildingsmart.org/
๐ License
MIT License - see LICENSE file for details
๐ฅ Contributing
- Read constitution.md for project principles
- Follow TDD methodology (Red-Green-Refactor)
- Ensure 95%+ test coverage
- All exports must validate against IDS 1.0 XSD
- Use IfcTester for all IDS operations
๐ Support
- Issues: https://github.com/Quasar-Consulting-Group/ifc-ids-mcp/issues
- Discussions: https://github.com/Quasar-Consulting-Group/ifc-ids-mcp/discussions
Status: โ
Implementation Complete | 94% Test Coverage | 17 MCP Tools | 168 Tests | Early Validation
Built with โค๏ธ using IfcOpenShell and FastMCP