Back to MCP Catalog

WhereAmI MCP Server

Location ServicesPython
Get your current location details based on IP address
Available Tools

get_location

Generates a detailed Markdown table of your current geolocation data including IP, country, region, city, coordinates, timezone, ISP and ASN

WhereAmI is a lightweight service that provides detailed geolocation information based on your current IP address. Powered by ipapi.co, it offers both specific location data points through resources and comprehensive location reports through tools. With WhereAmI, you can easily access information such as your current city, country, coordinates, timezone, and ISP details. The service is designed to be minimal with few dependencies while providing robust error handling for API and network issues.

Overview

WhereAmI is a location service that tells you exactly where you are based on your IP address. It provides both granular access to specific location data points and comprehensive location reports.

Installation

Prerequisites

  • Python 3.10 or higher
  • pip package manager

Setup Options

Option 1: Clone and Run Directly

  1. Clone the repository:
git clone https://github.com/kukapay/whereami-mcp.git
cd whereami-mcp
  1. Install dependencies:
pip install mcp httpx
  1. Run the server:
python main.py

Option 2: Install as MCP Service

You can install WhereAmI as an MCP service using:

mcp install whereami_mcp.py --name "WhereAmI"

Option 3: Development Mode

For development purposes, you can run:

mcp dev whereami_mcp.py

Configuration

Add the following to your MCP client configuration:

"mcpServers": {
  "whereami": {
    "command": "python",
    "args": [
      "PATH_TO_REPOSITORY/main.py"
    ]
  }
}

Replace PATH_TO_REPOSITORY with the actual path to the cloned repository.

Usage

Accessing Location Data

You can access specific location data using the location:// resource followed by the data type you want:

  • @location://ip - Returns your IP address
  • @location://country - Returns your country
  • @location://country_code - Returns your country code
  • @location://region - Returns your region/state
  • @location://city - Returns your city
  • @location://latitude - Returns your latitude
  • @location://longitude - Returns your longitude
  • @location://timezone - Returns your timezone
  • @location://isp - Returns your Internet Service Provider
  • @location://asn - Returns your Autonomous System Number

Examples

You can use these resources in your prompts:

  • "My current IP address is @location://ip"
  • "I'm currently in @location://city, @location://country"
  • "My timezone is @location://timezone"

Getting a Full Location Report

To get a comprehensive location report, you can:

  1. Use the get_location() tool directly
  2. Ask "Where am I?" which triggers the predefined prompt

The report will be displayed as a formatted Markdown table containing all available location data.

Related MCPs

Google Maps
Location ServicesTypeScript

Access Google Maps API functionality for geocoding, place search, directions, and more

GeoPy Geocoding
Location ServicesPython

Geocoding service for converting addresses to coordinates and vice versa

IP Geolocation
Location ServicesPython

Get detailed geolocation information about IP addresses

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.