Skip to main content
Glama

get_privacy_info

Detect if an IP address is associated with privacy services like VPNs, proxies, Tor, relays, or hosting providers to assess connection authenticity.

Instructions

Detect privacy services (VPN, proxy, Tor, etc.) for an IP address.

Args: ip: IP address to check

Returns: Privacy detection results including VPN, proxy, Tor, relay, and hosting status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ipYes

Implementation Reference

  • MCP tool handler function for 'get_privacy_info'. Automatically registered via @mcp.tool() decorator. Gets IPInfoClient instance and calls its get_privacy method, handling errors via context.
    @mcp.tool() async def get_privacy_info(ip: str, ctx: Context[Any, Any, Any]) -> PrivacyResponse: """Detect privacy services (VPN, proxy, Tor, etc.) for an IP address. Args: ip: IP address to check Returns: Privacy detection results including VPN, proxy, Tor, relay, and hosting status. """ client = get_client(ctx) try: return await client.get_privacy(ip) except IPInfoAPIError as e: ctx.error(f"API error: {e.message}") raise
  • Pydantic BaseModel defining the output schema for the privacy information response, used for validation and serialization.
    class PrivacyResponse(BaseModel): vpn: bool = Field(..., description="VPN detected") proxy: bool = Field(..., description="Proxy detected") tor: bool = Field(..., description="Tor detected") hosting: bool = Field(..., description="Hosting provider detected") relay: bool = Field(..., description="Relay detected") service: str = Field(..., description="Service name if detected")
  • Supporting method in IPInfoClient class that makes the HTTP GET request to the IPInfo /privacy endpoint and constructs the PrivacyResponse from the API data.
    async def get_privacy(self, ip: str) -> PrivacyResponse: """Get privacy information for an IP.""" data = await self._request("GET", f"/{ip}/privacy") return PrivacyResponse(**data)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/NimbleBrainInc/mcp-ipinfo'

If you have feedback or need assistance with the MCP directory API, please join our Discord server