Wikibear
(Swen)
August 6, 2026, 8:23am
1
Using MCP via opencode with Openhab 5.2.1 via Docker.
The AI can’t edit sitemap within UI. Is there a way that AI can edit if sitemap is in UI only without sitemap file?
Workaraound: Copy sitemap into a yaml file and let AI edit this local and copy back… That’s a littlebit bad…
digitaldan
(Dan Cunningham)
August 6, 2026, 10:29pm
2
Can you open a feature request on github? I never added a dedicated tool for sitemaps, but that seems like a reasonable thing to add. Also if you enable full API access in the MCP configuration menu in the MainUI, my guess is that gives the AI the endpoint to edit it, but a dedicated tool would be better long term.
Wikibear
(Swen)
August 7, 2026, 11:28am
3
Thanks @digitaldan
Feature Request is add… hope in the right section?
opened 11:26AM - 07 Aug 26 UTC
**Is your feature request related to a problem? Please describe.**
When using o… penHAB's MCP server with `enableFullApiAccess=true`, an AI agent can read sitemap definitions via `GET /sitemaps/{name}/definition`. However, there is no dedicated MCP tool for editing sitemaps. The agent would need to discover the REST endpoints manually via `list_api_endpoints` → `call_api` with the correct `PUT /sitemaps/{name}` payload, which is impractical for a deeply nested widget JSON structure.
Currently, users with UI-only sitemaps (no `.sitemap` file) who want AI-assisted editing must copy the sitemap to a YAML file, edit locally, and paste it back — a cumbersome workaround.
**Describe the solution you'd like**
Add a `manage_sitemap` MCP tool (similar to `manage_ui_component`) that provides CRUD operations on sitemaps by wrapping the existing REST endpoints:
- `GET /sitemaps` — list all sitemaps
- `GET /sitemaps/{name}/definition` — get the sitemap widget tree
- `PUT /sitemaps/{name}` — update a sitemap
- `DELETE /sitemaps/{name}` — delete a sitemap
Proposed tool signature:
- `get_sitemaps` — list available sitemaps
- `get_sitemap_definition` — retrieve the full sitemap definition as JSON
- `manage_sitemap` with actions: `update`, `delete`
**Describe alternatives you've considered**
- Using `call_api` with full API access works for read operations (GET) but is impractical for writes (PUT) due to the complex nested widget structure.
- Editing the `.sitemap` file directly works for file-based sitemaps but not for UI-only sitemaps stored in the JSONDB.
**Additional context**
Forum discussion: https://community.openhab.org/t/mcp-and-sitemap-editing-if-in-ui/170028
The `org.openhab.io.mcp` bundle already has `UiTools.java` for Main UI components — a similar `SitemapTools.java` would follow the same pattern.
REST endpoints already exist in the openHAB core and can be verified via:
- `GET /sitemaps` — list
- `GET /sitemaps/{name}/definition` — full definition
- `PUT /sitemaps/{name}` — update
- `DELETE /sitemaps/{name}` — delete