Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion plugins/memory/memgw/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,12 @@ def is_available(self) -> bool:
# (Codex PR #30 review). Parse the URL and require an exact loopback host.
from urllib.parse import urlparse

host = (urlparse(url).hostname or '').lower()
try:
host = (urlparse(url).hostname or '').lower()
except ValueError:
# Malformed URL (e.g. typoed IPv6 like "http://[::1:8081/mcp") —
# treat as unavailable rather than propagating the exception.
return False
return host in ('localhost', '127.0.0.1', '::1')

def get_config_schema(self):
Expand Down
Loading