Skip to main content
Glama
README.md
# dirigera-mcp

An MCP server for the IKEA DIRIGERA smart home hub. It talks to the hub on your
local network through a Python client generated from [dirigera-openapi].

## Setup

Get a token, and press the action button on the bottom of the hub when asked:

```sh
uv run dirigera-mcp pair 192.168.1.100
```

The token is valid for ten years and gives full access to the hub, so treat it
like a password. Add the server to Claude Code:

```sh
claude mcp add dirigera \
  --env DIRIGERA_HOST=192.168.1.100 \
  --env DIRIGERA_TOKEN="$TOKEN" \
  -- uv run --directory /path/to/dirigera-mcp dirigera-mcp
```

### Use an existing token

Set `DIRIGERA_TOKEN` to the token, or point `--config` at a file like the one
made by dirigera-rs or dirigera-tui:

```toml
ip-address = "192.168.1.100" # or host
token = "..."
```

```sh
claude mcp add dirigera -- uv run --directory /path/to/dirigera-mcp \
  dirigera-mcp --config /path/to/config.toml
```

With `--config`, the host and token in the environment are ignored.

Started in a terminal, such as with `just run`, the server prints the matching
`claude mcp add` command.

| Variable           | Required           | Description                             |
| ------------------ | ------------------ | --------------------------------------- |
| `DIRIGERA_HOST`    | Without `--config` | IP address or hostname of the hub       |
| `DIRIGERA_TOKEN`   | Without `--config` | Token from `dirigera-mcp pair`          |
| `DIRIGERA_CA_CERT` | No                 | PEM file with the CA or hub certificate |

The hub's certificate is signed by a private IKEA CA. Without `DIRIGERA_CA_CERT`
it isn't verified, so someone on your network could impersonate the hub.

## Tools

- **Read:** `list_devices`, `get_device`, `list_rooms`, `list_device_sets`,
  `list_scenes`, `get_scene`, `get_hub_status`, `get_activity_log`
- **Control:** `control_device`, `control_room`, `control_device_set`,
  `identify_device`, `trigger_scene`, `undo_scene`
- **Organize:** `rename_device`, `create_room`, `move_devices_to_room`

Deleting things, editing scenes, users, firmware, and the Matter, Thread and
HomeKit settings are left out on purpose. Pairing codes, serial numbers and
coordinates are removed from device and hub details.

The hub accepts changes before they have happened, so a successful call means
accepted rather than done.

## Development

```sh
just update-spec # download the latest published spec
just generate    # regenerate src/dirigera_mcp/client, never edit it by hand
just run         # run the server, takes the same arguments
just format      # format and fix lint errors
just check       # check formatting, lint, types and tests
```

[dirigera-openapi]: https://github.com/bombsimon/dirigera-openapi

TDQS

B3/5.0

Scored across 17 tools

Disambiguation4/5

Each tool targets a distinct resource and action, and most boundaries are clear (get_device vs list_devices, trigger_scene vs undo_scene). The only mild overlap is among control_device, control_room, and control_device_set, which all say 'control every device of one type' but differ by container (device/room/set); descriptions resolve this adequately.

Naming Consistency5/5

All 17 tools follow a consistent snake_case verb_noun pattern (get_*, list_*, control_*, create_*, move_*, trigger_*, undo_*, rename_*, identify_*). No camelCase or vague standalone verbs appear.

Tool Count4/5

17 tools is slightly above the ideal 3-15 range but reasonable for a smart-home hub covering devices, rooms, device sets, scenes, and hub status. Each tool maps to a concrete operation with little redundancy.

Completeness3/5

Read and control coverage is strong (devices, rooms, sets, scenes, activity log, hub status), but lifecycle gaps exist: create_room has no delete_room or rename_room, and there is no create/delete scene or create/delete device set. Agents can work around some of this but room and scene CRUD is incomplete.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues