Skip to content

Commit a2faa7c

Browse files
committed
fix(addon): fix allowed_keys allowed_tokens for addon
1 parent a950916 commit a2faa7c

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

config.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ schema:
3333
admin_username: str
3434
admin_password: password
3535
tools_folder: str
36-
mcp_proxy_sse_allowed_keys: str?
36+
allowed_keys: str?
37+
allowed_tokens: str?
3738
image: "ghcr.io/ptbsare/home-assistant-addons/{arch}-addon-mcp-proxy-server" # Version will be appended by build
3839
startup: application
3940
boot: auto

rootfs/etc/s6-overlay/s6-rc.d/mcp-proxy-server/run

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,25 @@ export ENABLE_ADMIN_UI=$(bashio::config 'enable_admin_ui')
1111
export ADMIN_USERNAME=$(bashio::config 'admin_username')
1212
export ADMIN_PASSWORD=$(bashio::config 'admin_password')
1313
export TOOLS_FOLDER=$(bashio::config 'tools_folder')
14-
export MCP_PROXY_SSE_ALLOWED_KEYS=$(bashio::config 'mcp_proxy_sse_allowed_keys')
15-
14+
export ALLOWED_KEYS=$(bashio::config 'allowed_keys')
15+
export ALLOWED_TOKENS=$(bashio::config 'allowed_tokens')
1616
bashio::log.info "Starting MCP Proxy Server..."
1717
bashio::log.info "Port: ${PORT}"
1818
bashio::log.info "Admin UI Enabled: ${ENABLE_ADMIN_UI}"
1919
if [[ "${ENABLE_ADMIN_UI}" == "true" ]]; then
2020
bashio::log.info "Admin Username: ${ADMIN_USERNAME}"
2121
fi
2222
bashio::log.info "Tools Folder: ${TOOLS_FOLDER}" # This is /share/mcp_tools by default
23-
if [[ -n "${MCP_PROXY_SSE_ALLOWED_KEYS}" ]]; then
23+
if [[ -n "${ALLOWED_KEYS}" ]]; then
2424
bashio::log.info "Allowed SSE Keys are configured."
2525
else
26-
bashio::log.info "No SSE Keys configured, SSE endpoint is open or uses internal auth."
26+
bashio::log.info "No SSE Keys configured."
27+
fi
28+
if [[ -n "${ALLOWED_TOKENS}" ]]; then
29+
bashio::log.info "Allowed SSE TOKENS are configured."
30+
else
31+
bashio::log.info "No SSE TOKENS configured."
2732
fi
28-
2933
# --- Define application paths ---
3034
# APP_BASE_DIR is the working directory set in Dockerfile, and where app files are copied.
3135
APP_BASE_DIR="/mcp-proxy-server"

0 commit comments

Comments
 (0)