IP Geolocation MCP Server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
IPINFO_API_TOKENYesAPI token for the ipinfo.io service. Sign up at https://ipinfo.io/signup for a free account.

Schema

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Tools

Functions exposed to the LLM to take actions

NameDescription
get_ip_details

Get information about an IP address.

Use this tool to:

  • Determine the user's geographic location to coarse granularity
  • Get information about the user's internet service provider
  • Get information about a specific IP address

Args: ip (str | None): The IP address to look up. If None, returns information about the requesting client's IP address. ctx (Context): The MCP request context.

Returns: IPDetails: Object containing information about the IP address, including geographic location, network operator, and more.

Note: This tool requires an IPInfo API Token specified via the IPINFO_API_TOKEN environment variable for full functionality.