brick-ontology-mcp

brick-ontology-mcp

Provides offline access to the Brick Schema ontology, enabling validation and search of building metadata classes through MCP tools.

Category
Visit Server

README

brick-ontology-mcp

An MCP server that gives LLMs native access to the Brick Schema ontology — the open standard for describing building metadata (equipment, sensors, locations, and relationships).

Validate, search, and explore 1000+ Brick classes without leaving your AI coding assistant. Fully offline after install.

Why

If you work with smart building data, you've hit these problems:

  1. Assigning classes that don't exist — RDF silently accepts brick:Chilled_Water_Thingy without complaint
  2. Not knowing what's available — with 1000+ classes, it's hard to find the right one
  3. Reinventing existing classes — creating My_Custom_Temp_Sensor when Zone_Air_Temperature_Sensor already exists
  4. Wrong specificity level — using brick:Sensor when a more precise subclass is available

This MCP server solves all four by making any MCP-compatible client (Claude Code, Claude Desktop, Cursor, etc.) aware of the full Brick class hierarchy.

Tools

Tool What it does
brick_validate_class Check if a class exists. Handles camelCase, spaces, typos — returns fuzzy suggestions if not found.
brick_search_classes Search classes by keyword with optional category filter.
brick_get_hierarchy Get ancestors and/or descendants of a class.
brick_list_classes List all classes under a category (Equipment, Sensor, Setpoint, etc.) as a tree.

All tools are read-only and fully offline — the Brick ontology is bundled with the brickschema Python package. No API keys, no network calls.

Installation

From source

git clone https://github.com/ucl-sbde/brick-ontology-mcp.git
cd brick-ontology-mcp
pip install .

Or with uv:

uv pip install .

Configuration

Claude Code

Add to your project's .mcp.json:

{
  "mcpServers": {
    "brick-ontology": {
      "command": "brick-ontology-mcp"
    }
  }
}

Or globally in ~/.claude.json:

{
  "mcpServers": {
    "brick-ontology": {
      "command": "brick-ontology-mcp"
    }
  }
}

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "brick-ontology": {
      "command": "brick-ontology-mcp"
    }
  }
}

Cursor

Add to .cursor/mcp.json in your project:

{
  "mcpServers": {
    "brick-ontology": {
      "command": "brick-ontology-mcp"
    }
  }
}

Example Usage

"Does this class exist?"

You: Assign brick:Chilled_Water_Thingy to this valve

The LLM calls brick_validate_class("Chilled_Water_Thingy") and gets:

{
  "exists": false,
  "normalized_to": "Chilled_Water_Thingy",
  "suggestions": [
    {"class_name": "Chilled_Water_Valve", "similarity": 0.8},
    {"class_name": "Chilled_Water_Pump", "similarity": 0.65}
  ]
}

"What classes exist for temperature sensors?"

You: What types of temperature sensors does Brick have?

The LLM calls brick_search_classes("temperature sensor") and gets all matching classes with their categories and parent classes.

"Am I reinventing the wheel?"

You: I'll create a custom Hot_Water_Supply_Temp class

The LLM calls brick_search_classes("hot water temperature") and discovers Hot_Water_Supply_Temperature_Sensor already exists.

"What's the hierarchy?"

You: Where does Zone_Air_Temperature_Sensor sit in the ontology?

The LLM calls brick_get_hierarchy("Zone_Air_Temperature_Sensor", direction="ancestors") and gets:

Zone_Air_Temperature_Sensor
  -> Air_Temperature_Sensor
    -> Temperature_Sensor
      -> Sensor
        -> Point

Development

# Install with dev dependencies
pip install -e ".[dev]"

# Run tests
pytest tests/ -v

# Test the server with MCP Inspector
npx @modelcontextprotocol/inspector brick-ontology-mcp

How It Works

The server loads the Brick Schema ontology (v1.4+) at startup using the brickschema Python library. It pre-indexes all class names, parent/child relationships, and category assignments into in-memory data structures. Tool calls are sub-millisecond lookups against this index — no SPARQL queries at runtime for validation and search.

Built with FastMCP (the official MCP Python SDK).

License

MIT

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured