Skip to main content
Glama

map_ips

Generate a visual map showing the geographic locations of IP addresses. Input a list of IPs to receive a map report with a visualization URL for spatial analysis.

Instructions

Create a visual map of IP address locations.

Args: ips: List of IP addresses to map (up to 500,000)

Returns: Map report with visualization URL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ipsYes

Implementation Reference

  • The MCP tool handler for 'map_ips' that joins the IP list into text, calls the IPInfoClient.map_ips method, and returns the map visualization data. Also serves as registration via @mcp.tool() decorator.
    @mcp.tool() async def map_ips(ips: list[str], ctx: Context[Any, Any, Any]) -> dict[str, Any]: """Create a visual map of IP address locations. Args: ips: List of IP addresses to map (up to 500,000) Returns: Map report with visualization URL. """ client = get_client(ctx) ips_text = "\n".join(ips) try: return await client.map_ips(ips_text) except IPInfoAPIError as e: ctx.error(f"API error: {e.message}") raise
  • Helper method in IPInfoClient that makes the POST request to IPInfo API /tools/map endpoint to generate IP map visualization.
    async def map_ips(self, ips: str) -> dict[str, Any]: """Create a map of IP addresses.""" data = await self._request( "POST", "/tools/map", params={"cli": "1"}, data=ips, content_type="text/plain" ) return 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