Skip to main content
Glama
NimbleBrainInc

IPInfo MCP Server

summarize_ips

Generate statistical summaries and insights from lists of IP addresses, providing analysis reports and map visualizations for network intelligence.

Instructions

Summarize a list of IP addresses with statistics and insights.

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

Returns: Summary report with statistics and map URL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ipsYes

Implementation Reference

  • The MCP tool handler for 'summarize_ips'. Decorated with @mcp.tool() for automatic registration and schema generation from signature/docstring. Joins IP list into text and delegates to IPInfoClient.summarize_ips.
    @mcp.tool()
    async def summarize_ips(ips: list[str], ctx: Context[Any, Any, Any]) -> dict[str, Any]:
        """Summarize a list of IP addresses with statistics and insights.
    
        Args:
            ips: List of IP addresses to summarize (up to 500,000)
    
        Returns:
            Summary report with statistics and map URL.
        """
        client = get_client(ctx)
        ips_text = "\n".join(ips)
        try:
            return await client.summarize_ips(ips_text)
        except IPInfoAPIError as e:
            ctx.error(f"API error: {e.message}")
            raise
  • Supporting client method that performs the actual HTTP POST request to the IPInfo.io /tools/summarize-ips endpoint, sending the newline-separated IPs as plain text body.
    async def summarize_ips(self, ips: str) -> dict[str, Any]:
        """Summarize a list of IP addresses."""
        data = await self._request(
            "POST", "/tools/summarize-ips", params={"cli": "1"}, data=ips, content_type="text/plain"
        )
        return data
  • The @mcp.tool() decorator registers the summarize_ips function as an MCP tool, deriving input schema from args and docstring.
    @mcp.tool()

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