Skip to content

Opt-in MCP rediscovery of a host whose IP changed - #86

Merged
ehoeve786 merged 1 commit into
mainfrom
feat/mcp-rediscover-optin
Nov 6, 2026
Merged

ehoeve786 merged 1 commit into
mainfrom
feat/mcp-rediscover-optin

Conversation

@ehoeve786

Copy link
Copy Markdown
Owner

MCP connects passed allowRediscover = false, so a host on a phone hotspot (new random subnet per session) became unreachable to agents until the owner reconnected from the app.

  • New allowMcpRediscover per connection, off by default; toggle "Find host if its IP changed" in the connection editor (enabled only when MCP exec or read is on)
  • When on, MCP uses the existing pinned-host-key rediscovery (fails closed on ambiguity, credentials only after the key matches) and saves the new address
  • Pool stores the updated record, so the next call reuses the session instead of reconnecting
  • connect_failed hint points at the toggle when it's off

Generated by Claude Code

The app rediscovers a moved host (same pinned host key on the phone's own
networks), but MCP connects never did, so a device on a phone hotspot was
unreachable to agents after each hotspot restart. Adds a per-connection
"Find host if its IP changed" toggle, off by default; when on, MCP connects
use the same pinned-key rediscovery and save the new address. The pooled
session keeps the updated record so the next call reuses it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CiTeuLynZ1g6ie1LPaMmMU
@ehoeve786
ehoeve786 merged commit 9d82f04 into main Nov 6, 2026
6 checks passed
@ehoeve786
ehoeve786 deleted the feat/mcp-rediscover-optin branch November 6, 2026 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant