Skip to content

Commit 01c1b88

Browse files
Merge branch 'master' into master
2 parents 3c9f368 + 630839d commit 01c1b88

27 files changed

Lines changed: 2153 additions & 2149 deletions

.github/workflows/renovate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
uses: actions/checkout@v6
3232

3333
- name: Self-hosted Renovate
34-
uses: renovatebot/github-action@v44.2.6
34+
uses: renovatebot/github-action@v46.0.1
3535
with:
3636
configurationFile: renovate.json
3737
token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ docs/review/
8080
docs/development/
8181
.local/
8282
local/
83+
worktree/
8384
/.claude/settings.local.json
8485
fastmcp/
8586

AGENTS.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,82 @@
22

33
Guidance for Claude Code when working with this repository.
44

5+
## Repository Structure
6+
7+
This repository uses a worktree-based development workflow.
8+
9+
**Documentation Setup:**
10+
- This file is `AGENTS.md` (the canonical source)
11+
- `CLAUDE.md` is a symlink pointing to `AGENTS.md`
12+
- Read either file - they're the same content
13+
- Commit changes to `AGENTS.md`, the symlink will automatically reflect them
14+
15+
**Directory Structure:**
16+
```
17+
/home/julien/github/ha-mcp/ # Main repository (checkout master here)
18+
├── AGENTS.md # This file (canonical source)
19+
├── CLAUDE.md -> AGENTS.md # Symlink for convenience
20+
├── worktree/ # Git worktrees (gitignored)
21+
│ ├── issue-42/ # Feature branch worktree
22+
│ └── fix-something/ # Fix branch worktree
23+
├── local/ # Scratch work (gitignored)
24+
└── .claude/agents/ # Custom agent workflows
25+
```
26+
27+
**Why use `worktree/` subdirectory:**
28+
- Keeps worktrees organized in one place
29+
- Gitignored (won't pollute `git status`)
30+
- All worktrees automatically inherit `.claude/agents/` workflows
31+
- Easy cleanup: `git worktree prune` removes stale references
32+
33+
## Worktree Workflow
34+
35+
### Creating Worktrees
36+
37+
**ALWAYS create worktrees in the `worktree/` subdirectory**, not at the repository root.
38+
39+
```bash
40+
# Correct - worktrees go in worktree/ subdirectory
41+
cd /home/julien/github/ha-mcp
42+
git worktree add worktree/issue-42 -b issue-42
43+
git worktree add worktree/feat-new-feature -b feat/new-feature
44+
45+
# Wrong - don't create worktrees at repo root
46+
git worktree add issue-42 -b issue-42 # ❌ Creates orphaned worktree
47+
git worktree add ../issue-42 -b issue-42 # ❌ Outside repo, no .claude/agents/
48+
```
49+
50+
**Working in a worktree:**
51+
```bash
52+
# Navigate to your worktree
53+
cd worktree/issue-42
54+
55+
# Work normally - you have full access to .claude/agents/
56+
git status
57+
git commit -m "feat: implement feature"
58+
git push
59+
60+
# When done, return to main repo and clean up
61+
cd /home/julien/github/ha-mcp
62+
git worktree remove worktree/issue-42
63+
```
64+
65+
**Cleaning up stale worktrees:**
66+
```bash
67+
# If worktree directories were deleted but git still tracks them
68+
git worktree prune
69+
```
70+
71+
### Agent Workflows
72+
73+
Custom agent workflows are located in `.claude/agents/`:
74+
75+
| Agent | File | Model | Purpose |
76+
|-------|------|-------|---------|
77+
| **issue-analysis** | `issue-analysis.md` | Opus | Deep issue analysis - comprehensive codebase exploration, implementation planning, architectural assessment, complexity evaluation. Complements automated Gemini triage with human-directed deep analysis. |
78+
| **issue-to-pr-resolver** | `issue-to-pr-resolver.md` | Sonnet | End-to-end issue implementation: pre-flight checks → worktree creation → implementation with tests → pre-PR checkpoint → PR creation → iterative CI/review resolution until merge-ready. |
79+
| **pr-checker** | `pr-checker.md` | Sonnet | Review and manage existing PRs - check comments, CI status, resolve review threads, monitor until all checks pass. |
80+
581
## Project Overview
682

783
**Home Assistant MCP Server** - A production MCP server enabling AI assistants to control Home Assistant smart homes. Provides 80+ tools for entity control, automations, device management, and more.
@@ -513,6 +589,9 @@ return create_error_response(
513589
{"success": False, "error": {...}} # Failure
514590
```
515591

592+
### Tool Consolidation
593+
When a tool's functionality is fully covered by another tool, **remove** the redundant tool rather than deprecating it. Fewer tools reduces cognitive load for AI agents and improves decision-making. Do not add deprecation notices or shims — just delete the tool and update any docstring references to point to the replacement.
594+
516595
## Tool Waiting Behavior
517596

518597
**Principle**: MCP tools should wait for operations to complete before returning, not just acknowledge API success.

CHANGELOG.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,46 @@
33
<!-- version list -->
44

55

6-
## v1.0.0 (2026-02-03)
6+
## v6.5.0 (2026-02-03)
7+
8+
### Added
9+
10+
- Remove encryption from OAuth tokens for truly stateless implementation
11+
([#534](https://github.com/homeassistant-ai/ha-mcp/pull/534))
12+
- **oauth**: Auto-persist encryption key and auto-detect url
13+
([#532](https://github.com/homeassistant-ai/ha-mcp/pull/532))
14+
15+
### Changed
16+
17+
- Add agent skills section to README
18+
([#541](https://github.com/homeassistant-ai/ha-mcp/pull/541))
19+
20+
### Fixed
21+
22+
- Add workaround for ChatGPT's non-standard /token/.well-known/openid-configuration request
23+
([#533](https://github.com/homeassistant-ai/ha-mcp/pull/533))
24+
- **oauth**: Add OpenID Configuration endpoint for ChatGPT compatibility
25+
([#531](https://github.com/homeassistant-ai/ha-mcp/pull/531))
26+
- **traces**: Support flat trace structure in ha_get_automation_traces
27+
([#529](https://github.com/homeassistant-ai/ha-mcp/pull/529))
28+
- Fix YAML frontmatter parsing in agent files
29+
([#519](https://github.com/homeassistant-ai/ha-mcp/pull/519))
30+
31+
---
32+
<details>
33+
<summary>Internal Changes</summary>
34+
35+
36+
### Chores
37+
38+
- **config**: Migrate config renovate.json
39+
([#509](https://github.com/homeassistant-ai/ha-mcp/pull/509))
40+
- Add Anthropic's MCP builder skill via plugin marketplace
41+
([#520](https://github.com/homeassistant-ai/ha-mcp/pull/520))
42+
</details>
43+
44+
45+
## v6.4.0 (2026-01-27)
746

847
### Added
948

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Python 3.13 - Security support until 2029-10
44
# uv version pinned - Dependabot will create PRs for updates
55

6-
FROM ghcr.io/astral-sh/uv:0.9.26-python3.13-bookworm-slim
6+
FROM ghcr.io/astral-sh/uv:0.9.28-python3.13-bookworm-slim
77

88
LABEL org.opencontainers.image.title="Home Assistant MCP Server" \
99
org.opencontainers.image.description="AI assistant integration for Home Assistant via Model Context Protocol" \

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,14 @@ Spend less time configuring, more time enjoying your smart home.
141141

142142
---
143143

144+
## 🧠 Better Results with Agent Skills
145+
146+
This server gives your AI agent tools to control Home Assistant. For better configurations, pair it with [Home Assistant Agent Skills](https://github.com/homeassistant-ai/skills) — domain knowledge that teaches the agent Home Assistant best practices.
147+
148+
An MCP server can create automations, helpers, and dashboards, but it has no opinion on *how* to structure them. Without domain knowledge, agents tend to over-rely on templates, pick the wrong helper type, or produce automations that are hard to maintain. The skills fill that gap: native constructs over Jinja2 workarounds, correct helper selection, safe refactoring workflows, and proper use of automation modes.
149+
150+
---
151+
144152
## 🧪 Dev Channel
145153

146154
Want early access to new features and fixes? Dev releases (`.devN`) are published on every push to master.

docs/OAUTH.md

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,36 +21,39 @@ OAuth authentication allows users to enter their Home Assistant credentials via
2121

2222
## Setup
2323

24-
### 1. Start OAuth Server
24+
### 1. Expose with HTTPS
25+
26+
```bash
27+
# Quick tunnel for testing
28+
cloudflared tunnel --url http://localhost:8086
29+
```
30+
31+
For production, set up a [persistent Cloudflare Tunnel](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/).
32+
33+
### 2. Start OAuth Server
2534

2635
**Docker:**
2736
```bash
2837
docker run -d --name ha-mcp-oauth \
2938
-p 8086:8086 \
39+
-e MCP_BASE_URL=https://your-tunnel.trycloudflare.com \
3040
ghcr.io/homeassistant-ai/ha-mcp:latest \
3141
ha-mcp-oauth
3242
```
3343

3444
**uvx:**
3545
```bash
46+
export MCP_BASE_URL=https://your-tunnel.trycloudflare.com
3647
uvx ha-mcp@latest ha-mcp-oauth
3748
```
3849

39-
### 2. Environment Variables (All Optional!)
50+
### 3. Environment Variables
4051

4152
| Variable | Description | Default |
4253
|----------|-------------|---------|
54+
| `MCP_BASE_URL` | **Required.** Public URL where this server is accessible | None |
4355
| `MCP_PORT` | Server port | `8086` |
44-
| `MCP_BASE_URL` | Public URL (auto-detected if not set) | Detected from request headers |
45-
46-
### 3. Expose with HTTPS
47-
48-
```bash
49-
# Quick tunnel for testing
50-
cloudflared tunnel --url http://localhost:8086
51-
```
52-
53-
For production, set up a [persistent Cloudflare Tunnel](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/).
56+
| `MCP_SECRET_PATH` | MCP endpoint path | `/mcp` |
5457

5558
### 4. Connect in Claude.ai
5659

@@ -75,7 +78,7 @@ Make sure you're using the correct URL in Claude.ai:
7578
❌ Wrong: https://your-tunnel.com
7679
```
7780

78-
The server auto-detects its base URL from incoming requests, so you don't need to configure anything - just use `your-tunnel/mcp` in Claude.ai.
81+
The `/mcp` path is required - this is where the MCP server endpoints are mounted.
7982

8083
### "Invalid credentials" on consent form
8184

@@ -91,14 +94,7 @@ Verify your Long-Lived Access Token:
9194

9295
### Do tokens persist across server restarts?
9396

94-
**Yes!** The encryption key is automatically saved to `~/.ha-mcp/oauth_key` and reused on restart.
95-
96-
**For multi-instance deployments**, copy the key file to other servers:
97-
```bash
98-
scp ~/.ha-mcp/oauth_key server2:~/.ha-mcp/
99-
```
100-
101-
Or use the `OAUTH_ENCRYPTION_KEY` environment variable to share the same key across all instances.
97+
**Yes!** Access tokens are stateless and self-contained - they work across server restarts and multi-instance deployments without any configuration.
10298

10399
### Can I use OAuth with Home Assistant OS?
104100

homeassistant-addon/CHANGELOG.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,46 @@
33
<!-- version list -->
44

55

6-
## v1.0.0 (2026-02-03)
6+
## v6.5.0 (2026-02-03)
7+
8+
### Added
9+
10+
- Remove encryption from OAuth tokens for truly stateless implementation
11+
([#534](https://github.com/homeassistant-ai/ha-mcp/pull/534))
12+
- **oauth**: Auto-persist encryption key and auto-detect url
13+
([#532](https://github.com/homeassistant-ai/ha-mcp/pull/532))
14+
15+
### Changed
16+
17+
- Add agent skills section to README
18+
([#541](https://github.com/homeassistant-ai/ha-mcp/pull/541))
19+
20+
### Fixed
21+
22+
- Add workaround for ChatGPT's non-standard /token/.well-known/openid-configuration request
23+
([#533](https://github.com/homeassistant-ai/ha-mcp/pull/533))
24+
- **oauth**: Add OpenID Configuration endpoint for ChatGPT compatibility
25+
([#531](https://github.com/homeassistant-ai/ha-mcp/pull/531))
26+
- **traces**: Support flat trace structure in ha_get_automation_traces
27+
([#529](https://github.com/homeassistant-ai/ha-mcp/pull/529))
28+
- Fix YAML frontmatter parsing in agent files
29+
([#519](https://github.com/homeassistant-ai/ha-mcp/pull/519))
30+
31+
---
32+
<details>
33+
<summary>Internal Changes</summary>
34+
35+
36+
### Chores
37+
38+
- **config**: Migrate config renovate.json
39+
([#509](https://github.com/homeassistant-ai/ha-mcp/pull/509))
40+
- Add Anthropic's MCP builder skill via plugin marketplace
41+
([#520](https://github.com/homeassistant-ai/ha-mcp/pull/520))
42+
</details>
43+
44+
45+
## v6.4.0 (2026-01-27)
746

847
### Added
948

homeassistant-addon/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: "Home Assistant MCP Server"
22
description: "AI assistant integration for Home Assistant via Model Context Protocol (MCP)"
3-
version: "1.0.0"
3+
version: "6.5.0"
44
slug: "ha_mcp"
55
url: "https://github.com/homeassistant-ai/ha-mcp"
66
arch:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "ha-mcp"
7-
version = "1.0.0"
7+
version = "6.5.0"
88
description = "Home Assistant MCP Server - Complete control of Home Assistant through MCP"
99
readme = "README.md"
1010
requires-python = ">=3.13,<3.14"

0 commit comments

Comments
 (0)