Skip to content

fix(mcp): derive names for IP literal hosts - #70

Merged
ralyodio merged 1 commit into
moshcoder:mainfrom
aiirvizionz:clientkit/strict-mcp-host-labels
Jul 30, 2026
Merged

fix(mcp): derive names for IP literal hosts#70
ralyodio merged 1 commit into
moshcoder:mainfrom
aiirvizionz:clientkit/strict-mcp-host-labels

Conversation

@aiirvizionz

Copy link
Copy Markdown
Contributor

Summary

  • Detect IP literal MCP server hosts before applying domain-label trimming
  • Derive stable names like ip-127-0-0-1 for local MCP URLs instead of 0
  • Add regression coverage for IPv4 and IPv6 loopback URLs

Why

deriveName() treated every hostname as a dotted domain. For http://127.0.0.1:3000/sse, dropping the final label and choosing the last remaining label produced 0, which is not a useful MCP server name.

Validation

  • node --test test\mcp.test.mjs

@ralyodio
ralyodio merged commit 4814bdb into moshcoder:main Jul 30, 2026
3 checks passed
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.

2 participants