OpenHAB MCP Server

An MCP server for OpenHAB

Local serverstdioPython

What is the OpenHAB MCP server?

OpenHAB MCP server exists for a simple reason — assistants are far more useful when they can act on OpenHAB directly instead of describing what you should do. An MCP server for OpenHAB.

What you get

A MCP (Model Context Protocol) server that interacts with a real openHAB instance.

This project provides an implementation of an MCP server that connects to a real openHAB instance via its REST API. It enables AI assistants like Claude and Cline to interact with your openHAB smart home system.

What the assistant can call

Once OpenHAB is connected, these are the calls the assistant has available:

  • Items — The Items tool exposed by this server
  • Things — The Things tool exposed by this server
  • Rules — The Rules tool exposed by this server
  • Scripts — When connected to Claude or Cline in VSCode, you can use natural language to control and manage your openHAB system, making home automation more
  • Prerequisites — The Prerequisites tool exposed by this server

Setting it up

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client.

Configuration and credentials

You will need 2 environment variables: OPENHAB_URL, OPENHAB_API_TOKEN. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

  • Python 3.7+

Choosing this one

This sits in the developer tooling group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. OpenHAB's toolset — Items, Things, Rules and 2 more — is a fair guide to whether it matches your workflow. It is maintained by tdeckers; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against OpenHAB's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Before you rely on it

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the openhab mcp server does with a few real requests.

Available tools

ToolWhat it does
ItemsThe Items tool exposed by this server.
ThingsThe Things tool exposed by this server.
RulesThe Rules tool exposed by this server.
ScriptsWhen connected to Claude or Cline in VSCode, you can use natural language to control and manage your openHAB system, making home automation more accessible and intuitive.
PrerequisitesThe Prerequisites tool exposed by this server.

Configuration

  • Python 3.7+
VariableDescriptionRequired
OPENHAB_URLEndpoint or connection string the server talks to.Yes
OPENHAB_API_TOKENCredential the server authenticates with.Yes

Example prompts to try

  • Use OpenHAB to Items.
  • Use OpenHAB to Things.
  • Use OpenHAB to Rules.

Frequently asked questions

Python 3.7+ is required for local development, but the recommended deployment uses the prebuilt container image with Podman or Docker.