Package com.axelor.ai.mcp
Class McpEgressGuard
java.lang.Object
com.axelor.ai.mcp.McpEgressGuard
Validates an MCP server URL before any outbound connection: HTTPS only, host on the administrator
allowlist, and not resolving to a private/loopback/link-local address. Address classification is
shared with the HTTP tool executor via
OutboundAddresses; the allowlist and the HTTPS
requirement are what MCP adds on top.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA validated URL paired with the address checked during DNS resolution. -
Method Summary
Modifier and TypeMethodDescriptionstatic URIcheckAllowlisted(String url, Set<String> allowedHosts) Validates the scheme and allowlist without performing DNS resolution.static McpEgressGuard.PinnedresolveAndValidate(String url, Set<String> allowedHosts) Likevalidate(java.lang.String, java.util.Set<java.lang.String>), but also returns the address to pin the real connection to.static URI
-
Method Details
-
validate
-
resolveAndValidate
Likevalidate(java.lang.String, java.util.Set<java.lang.String>), but also returns the address to pin the real connection to. -
checkAllowlisted
Validates the scheme and allowlist without performing DNS resolution.
-