Skip to content

fix: resolve MCP endpoint path for DNS-discovered agents (v0.12.1)#46

Merged
iracic82 merged 1 commit intomainfrom
fix/mcp-endpoint-path-resolution
Mar 12, 2026
Merged

fix: resolve MCP endpoint path for DNS-discovered agents (v0.12.1)#46
iracic82 merged 1 commit intomainfrom
fix/mcp-endpoint-path-resolution

Conversation

@iracic82
Copy link
Collaborator

Summary

  • MCP endpoint path resolution — DNS SVCB records give host:port but not the sub-path where MCP JSON-RPC handlers live (e.g., /mcp). New resolve_mcp_endpoint() discovers the correct path via /.well-known/agent.json, with /mcp convention fallback. Applied automatically in call_mcp_tool() and list_mcp_tools().
  • Default A2A timeout bumped from 30s to 60s — Agents performing multi-step analysis (DNS, DNSSEC, TLS probing) need more than 30s. The old default caused Claude Desktop to timeout on first attempt.
  • Improved MCP tool descriptionslist_published_agents now clarifies it requires backend API credentials; discover_agents_via_dns clarifies it works on any public domain with no credentials.

Changes

src/dns_aid/core/invoke.py

  • New resolve_mcp_endpoint() — 3-tier path resolution: explicit path → agent.json endpoints → /mcp convention
  • call_mcp_tool() and list_mcp_tools() call resolve_mcp_endpoint() before invoking

src/dns_aid/mcp/server.py

  • send_a2a_message default timeout: 30s → 60s
  • list_published_agents docstring: clarifies credential requirement
  • discover_agents_via_dns docstring: clarifies no credentials needed

Version bump

  • pyproject.toml, __init__.py, CITATION.cff: 0.12.0 → 0.12.1
  • CHANGELOG.md: v0.12.1 entry

Test plan

  • 765 unit tests passing
  • Lint + format clean (ruff check + ruff format --check)
  • Verified live: resolve_mcp_endpoint("https://booking.highvelocitynetworking.com:443") → discovers /mcp from agent.json
  • Verified live: list_mcp_tools and call_mcp_tool with host:port-only endpoint now succeed
  • Verified live: send_a2a_message to security-analyzer succeeds with 60s default

…nts (v0.12.1)

DNS SVCB records provide host:port but not the sub-path where MCP
handlers live. Adds resolve_mcp_endpoint() that discovers the correct
path via /.well-known/agent.json with /mcp convention fallback.
Also bumps default A2A timeout to 60s and improves tool descriptions.

Signed-off-by: Igor Racic <iracic82@gmail.com>
@iracic82 iracic82 merged commit a923b24 into main Mar 12, 2026
12 checks passed
@iracic82 iracic82 deleted the fix/mcp-endpoint-path-resolution branch March 12, 2026 14:47
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