MCP server for analyzing building sustainability metrics through Excel, PDF, and standardized frameworks (ESG, LEED, BREEAM, DGNB) with IFC integration
Project description
Real Estate Sustainability Analysis MCP
MCP server for analyzing building sustainability metrics through Excel, PDF, and standardized frameworks (ESG, LEED, BREEAM, DGNB) with IFC integration
Built with FastMCP and mcp-refcache for efficient handling of large data in AI agent tools.
Features
-
✅ Reference-Based Caching - Return references instead of large data, reducing context window usage
-
✅ Preview Generation - Automatic previews for large results (sample, truncate, paginate strategies)
-
✅ Pagination - Navigate large datasets without loading everything at once
-
✅ Access Control - Separate user and agent permissions for sensitive data
-
✅ Private Computation - Let agents compute with values they cannot see
-
✅ Docker Ready - Production-ready containers with Python slim base image
-
✅ GitHub Actions - CI/CD with PyPI publishing and GHCR containers
-
✅ Langfuse Tracing - Built-in observability integration
-
✅ Type-Safe - Full type hints with Pydantic models
-
✅ Testing Ready - pytest with 73% coverage requirement
-
✅ Pre-commit Hooks - Ruff formatting and linting
Quick Start
Prerequisites
- Python 3.12+
- uv (recommended) or pip
Installation
# Clone the repository
git clone https://github.com/l4b4r4b4b4/real-estate-sustainability-mcp
cd real-estate-sustainability-mcp
# Install dependencies
uv sync
# Run the server (stdio mode for Claude Desktop)
uv run real-estate-sustainability-mcp
# Run the server (SSE/HTTP mode for deployment)
uv run real-estate-sustainability-mcp --transport sse --port 8000
Install from PyPI
# Run directly with uvx (no install needed)
uvx real-estate-sustainability-mcp stdio
# Or install globally
uv tool install real-estate-sustainability-mcp
real-estate-sustainability-mcp --help
Docker Deployment
# Pull and run from GHCR
docker pull ghcr.io/l4b4r4b4b4/real-estate-sustainability-mcp:latest
docker run -p 8000:8000 ghcr.io/l4b4r4b4b4/real-estate-sustainability-mcp:latest
# Or build locally with Docker Compose
docker compose up
# Build images manually
docker compose --profile build build base
docker compose build
Using with Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"real-estate-sustainability-mcp": {
"command": "uv",
"args": ["run", "real-estate-sustainability-mcp"],
"cwd": "/path/to/real-estate-sustainability-mcp"
}
}
}
Using with Zed
The project includes .zed/settings.json pre-configured for MCP context servers.
Project Structure
real-estate-sustainability-mcp/
├── app/ # Application code
│ ├── __init__.py # Version export
│ ├── server.py # Main server with tools
│ ├── tools/ # Tool modules
│ └── __main__.py # CLI entry point
├── tests/ # Test suite
│ ├── conftest.py # Pytest fixtures
│ └── test_server.py # Server tests
├── docker/
│ ├── Dockerfile.base # Python slim base image with dependencies
│ ├── Dockerfile # Production image (extends base)
│ └── Dockerfile.dev # Development with hot reload
├── .github/
│ └── workflows/
│ ├── ci.yml # CI pipeline (lint, test, security)
│ ├── publish.yml # PyPI trusted publisher
│ └── release.yml # Docker build & publish to GHCR
├── .agent/ # AI assistant workspace
│ └── goals/
│ └── 00-Template-Goal/ # Goal tracking template
├── pyproject.toml # Project config
├── docker-compose.yml # Local development & production
├── flake.nix # Nix dev shell
└── .rules # AI assistant guidelines
Development
Setup
# Install dependencies
uv sync
# Install pre-commit and pre-push hooks
uv run pre-commit install --install-hooks
uv run pre-commit install --hook-type pre-push
Running Tests
uv run pytest
uv run pytest --cov # With coverage
Linting and Formatting
uv run ruff check . --fix
uv run ruff format .
Type Checking
uv run mypy app/
Docker Development
# Run development container with hot reload
docker compose --profile dev up
# Build base image (for publishing)
docker compose --profile build build base
# Build all images
docker compose build
Using Nix (Optional)
nix develop # Enter dev shell with all tools
Configuration
Environment Variables
| Variable | Description | Default |
|---|---|---|
LANGFUSE_PUBLIC_KEY |
Langfuse public key | - |
LANGFUSE_SECRET_KEY |
Langfuse secret key | - |
LANGFUSE_HOST |
Langfuse host URL | https://cloud.langfuse.com |
CLI Commands
uvx real-estate-sustainability-mcp --help
Commands:
stdio Start server in stdio mode (for Claude Desktop and local CLI)
sse Start server in SSE mode (Server-Sent Events)
streamable-http Start server in streamable HTTP mode (recommended for remote/Docker)
# Examples:
uvx real-estate-sustainability-mcp stdio # Local CLI mode
uvx real-estate-sustainability-mcp sse --port 8000 # SSE on port 8000
uvx real-estate-sustainability-mcp streamable-http --host 0.0.0.0 # Docker/remote mode
Publishing
PyPI
Configure trusted publisher at PyPI:
- Project name:
real-estate-sustainability-mcp - Owner:
l4b4r4b4b4 - Repository:
real-estate-sustainability-mcp - Workflow:
publish.yml - Environment:
pypi
Docker Images
Images are automatically published to GHCR on:
- Push to
mainbranch →latesttag - Version tags (
v*.*.*) →latest,v0.0.1,0.0.1,0.0tags
License
MIT License - see LICENSE for details.
Contributing
See CONTRIBUTING.md for development guidelines.
Related Projects
- mcp-refcache - Reference-based caching for MCP servers
- FastMCP - High-performance MCP server framework
- Model Context Protocol - The underlying protocol specification
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file real_estate_sustainability_mcp-0.0.0.tar.gz.
File metadata
- Download URL: real_estate_sustainability_mcp-0.0.0.tar.gz
- Upload date:
- Size: 146.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ea6ed136685350be3b5bac6cf058c0217c39720675b3895ca39f6c0f9ae80ae
|
|
| MD5 |
12e415bd8ad6d468a0c4b624dd5387d7
|
|
| BLAKE2b-256 |
fa4c595a25f8574ab88ac5f35309bd500d782a9700b48923d0b88d313f4a478c
|
Provenance
The following attestation bundles were made for real_estate_sustainability_mcp-0.0.0.tar.gz:
Publisher:
publish.yml on l4b4r4b4b4/real-estate-sustainability-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
real_estate_sustainability_mcp-0.0.0.tar.gz -
Subject digest:
7ea6ed136685350be3b5bac6cf058c0217c39720675b3895ca39f6c0f9ae80ae - Sigstore transparency entry: 822835896
- Sigstore integration time:
-
Permalink:
l4b4r4b4b4/real-estate-sustainability-mcp@5fc41bbdc6b76168563d7e214c1b0da77fed42de -
Branch / Tag:
refs/tags/v0.0.0 - Owner: https://github.com/l4b4r4b4b4
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5fc41bbdc6b76168563d7e214c1b0da77fed42de -
Trigger Event:
release
-
Statement type:
File details
Details for the file real_estate_sustainability_mcp-0.0.0-py3-none-any.whl.
File metadata
- Download URL: real_estate_sustainability_mcp-0.0.0-py3-none-any.whl
- Upload date:
- Size: 24.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a224bf96cea817b5c2d625686768464e75d7d52fd57d18ac1779ab19b31d26a
|
|
| MD5 |
70b4cef98ac5e02c32d6569c0c4b15c2
|
|
| BLAKE2b-256 |
7a975275d9f95697c2c6040e28b4e813b269147821d7028c5c34b655c4711c9c
|
Provenance
The following attestation bundles were made for real_estate_sustainability_mcp-0.0.0-py3-none-any.whl:
Publisher:
publish.yml on l4b4r4b4b4/real-estate-sustainability-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
real_estate_sustainability_mcp-0.0.0-py3-none-any.whl -
Subject digest:
3a224bf96cea817b5c2d625686768464e75d7d52fd57d18ac1779ab19b31d26a - Sigstore transparency entry: 822835951
- Sigstore integration time:
-
Permalink:
l4b4r4b4b4/real-estate-sustainability-mcp@5fc41bbdc6b76168563d7e214c1b0da77fed42de -
Branch / Tag:
refs/tags/v0.0.0 - Owner: https://github.com/l4b4r4b4b4
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5fc41bbdc6b76168563d7e214c1b0da77fed42de -
Trigger Event:
release
-
Statement type: