MCP origins allowlist needs tailnet FQDN configurable per-host #27

Open
opened 2026-05-23 20:55:24 +00:00 by coilysiren · 0 comments
Owner

Originally filed by @coilysiren on 2026-05-19T08:38:02Z - https://github.com/coilysiren/repo-recall/issues/202

When repo-recall serves over tailscale serve on kai-server, requests to /mcp come in with Host: kai-server.tail09a41b.ts.net, which the pmcp DNS-rebinding allowlist rejects with: Forbidden: Host header not in allowed origins. The router reads REPO_RECALL_MCP_ORIGINS as a comma-separated extras list, but the brew formula's service block does not set it, so a fresh brew services start on kai-server boots an MCP endpoint that cannot talk to its own tailnet host. Per AGENTS the tailnet FQDN is opaque and lives in SSM at /coilysiren/kai-server/tailnet-fqdn, so the formula cannot just hardcode it. Right shape is probably a systemd drop-in on kai-server that sets REPO_RECALL_MCP_ORIGINS from SSM before the brew-generated service starts. Workaround until a real fix: brew services edit repo-recall and add the env var by hand. Surfaced during the post-cleanup restoration of three-mode operation on 2026-05-19.

_Originally filed by @coilysiren on 2026-05-19T08:38:02Z - [https://github.com/coilysiren/repo-recall/issues/202](https://github.com/coilysiren/repo-recall/issues/202)_ When repo-recall serves over tailscale serve on kai-server, requests to /mcp come in with Host: kai-server.tail09a41b.ts.net, which the pmcp DNS-rebinding allowlist rejects with: Forbidden: Host header not in allowed origins. The router reads REPO_RECALL_MCP_ORIGINS as a comma-separated extras list, but the brew formula's service block does not set it, so a fresh brew services start on kai-server boots an MCP endpoint that cannot talk to its own tailnet host. Per AGENTS the tailnet FQDN is opaque and lives in SSM at /coilysiren/kai-server/tailnet-fqdn, so the formula cannot just hardcode it. Right shape is probably a systemd drop-in on kai-server that sets REPO_RECALL_MCP_ORIGINS from SSM before the brew-generated service starts. Workaround until a real fix: brew services edit repo-recall and add the env var by hand. Surfaced during the post-cleanup restoration of three-mode operation on 2026-05-19.
coilysiren added
P3
and removed
P2
labels 2026-05-31 07:01:16 +00:00
Sign in to join this conversation.
No labels
P0
P1
P2
P3
P4
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
coilyco-flight-deck/repo-recall#27
No description provided.