Get the FREE Ultimate OpenClaw Setup Guide →

bacnet

A Model Context Protocol (MCP) server for BACnet.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio ezhuk-bacnet-mcp uvx bacnet-mcp \
  --env BACNET_MCP_BACNET__HOST="host of BACnet device (e.g., 10.0.0.1) or leave as placeholder" \
  --env BACNET_MCP_BACNET__PORT="BACnet/IP port (e.g., 47808) or placeholder port"

How to use

This MCP server exposes BACnet read and write capabilities to LLM-driven workflows via the MCP protocol. It maps each BACnet object on a device to a corresponding resource (tool) and provides templates for reading properties and writing values, enabling agents to query sensor data and actuate devices in a standardized way. You can also define multiple devices via environment variables or a devices.json file, and reference them by name in prompts. Use the built-in inspector to explore available tools and verify connectivity to the BACnet MCP server at the default endpoint (http://127.0.0.1:8000/mcp/) with the Streamable HTTP transport.

To interact with BACnet devices, you can use these core capabilities:

  • Read Property: read a specific object property (e.g., analogInput,1 presentValue) from a device by specifying host, port, object, instance, and property.
  • Write Property: atomically set a property value on a BACnet object (e.g., analogValue,1 presentValue).
  • Device targeting: configure host/port globally or per-device via devices.json to direct prompts to the appropriate device.
  • Authentication: enable AuthKit-based authentication for the Streamable HTTP transport by configuring provider settings in .env.
  • Interactive prompts: leverage MCP prompts to guide user interactions, request missing parameters, and handle errors gracefully.

How to install

Prerequisites:

  • Python 3.8+ installed on your system
  • Optional: uv (for dependency management) installed as a tool
  • Optional: Docker if you prefer containerized deployment

Installation using uv (recommended for development and direct usage):

  1. Install the package (bacnet-mcp) via uv:

uv add bacnet-mcp

  1. If you need to install it directly with pip (for local development):

pip install bacnet-mcp

  1. Run the MCP server (examples using uvx CLI):

uvx bacnet-mcp

If you prefer running via Docker:

  1. Create a .env file in your working directory to configure BACnet host/port and any authentication settings.
  2. Run the container:

docker run -d
--name bacnet-mcp
--restart=always
-p 8080:8000
--env-file .env
ghcr.io/ezhuk/bacnet-mcp:latest

Note: The default MCP endpoint will be http://127.0.0.1:8000/mcp/ with Streamable HTTP transport. Adjust port mappings as needed for your environment.

Additional notes

Environment variables:

  • BACNET_MCP_BACNET__HOST: default host for BACnet device access (override per device with devices.json or per-request parameters)
  • BACNET_MCP_BACNET__PORT: default BACnet/IP port (e.g., 47808)
  • For multi-device setups, provide a devices.json with name, host, and port, and reference by name in prompts.
  • If using authentication, configure AuthKit provider details in .env and ensure the transport is set to Streamable HTTP.
  • The MCP inspector can be used to discover available resources, prompts, and tools exposed by the BACnet MCP server.
  • When running in Docker, ensure port 8000 (inside container) is exposed to your desired host port (e.g., 8080).

Related MCP Servers

Sponsor this space

Reach thousands of developers