Skip to main content
Glama

IP Geolocation MCP Server

from datetime import datetime, timedelta from .models import IPDetails class IPInfoCache: """ A cache for IPInfo API responses. """ def __init__(self, ttl_seconds: int = 3600): self.cache = {} self.ttl_seconds = ttl_seconds def get(self, ip: str) -> IPDetails | None: if ip in self.cache: data, timestamp = self.cache[ip] if datetime.now() - timestamp < timedelta(seconds=self.ttl_seconds): return data return None def set(self, ip: str, data: IPDetails): self.cache[ip] = (data, datetime.now())

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/briandconnelly/mcp-server-ipinfo'

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