WhereAmI (IP Geolocation)

by kukapay

1 stars
Not rated
GitHub

About

Provides geolocation data based on user IP addresses through the ipapi.co API, returning location details like country, city, and coordinates in a formatted Markdown table.

Details

Author
kukapay
Repository
kukapay/whereami-mcp
GitHub stars
1
License
MIT License
Categories
Productivity, Design, Developer Tools, AI, Knowledge Base, Frontend
Tags
#visualization, #web

- Dynamic Resources: Fetch specific data (e.g., IP, country, city) via location://{type}.
- Detailed Tool: Generate a comprehensive location report with get_location().
- Natural Language Prompt: Ask "Where am I?" to get detailed results.
- Robust Error Handling: Gracefully manages API and network issues.
- Minimal Dependencies: Requires only mcp and httpx.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name WhereAmI (IP Geolocation)
    Command (node, npx, python, etc.) npx
    Arguments
    • Argument 1 -y
    • Argument 2 @highlight/mcp-server

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

- Direct execution:

  python whereami_mcp.py

- Development mode:
  mcp dev whereami_mcp.py

get_location()

Generates a detailed Markdown table of geolocation data including fields like IP, Country, Region, City, Latitude, Longitude, Timezone, ISP, and ASN.

where_am_i_prompt

Predefined query that triggers `get_location()` to provide a location report based on the current IP address.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "whereami (ip geolocation)": {
            "env": {},
            "args": [
                "-y",
                "@highlight/mcp-server"
            ],
            "command": "npx"
        }
    }
}

Linux

{
    "env": [],
    "args": [
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "npx"
}

Macos

{
    "env": [],
    "args": [
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "npx"
}

Windows

{
    "env": [],
    "args": [
        "/c",
        "npx",
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "cmd"
}

WhereAmI MCP Server

Python
License
Status

A lightweight mcp server that tells you exactly where you are based on your current IP, powered by ipapi.co.

Features

- Dynamic Resources: Fetch specific data (e.g., IP, country, city) via location://{type}.
- Detailed Tool: Generate a comprehensive location report with get_location().
- Natural Language Prompt: Ask "Where am I?" to get detailed results.
- Robust Error Handling: Gracefully manages API and network issues.
- Minimal Dependencies: Requires only mcp and httpx.

Installation

Prerequisites

- Python 3.10+ - pip

Setup

1. Clone the repository:
   git clone https://github.com/kukapay/whereami-mcp.git
   cd whereami-mcp
   
2. Install dependencies:
   pip install mcp httpx
   
3. (Optional) Install as an MCP service:
   mcp install whereami_mcp.py --name "WhereAmI"
   

Usage

Running the Server

- Direct execution:
  python whereami_mcp.py
  
- Development mode:
  mcp dev whereami_mcp.py
  

Components

Resource: location://{type}

Returns a specific location detail based on {type}. - Supported Types: ip, country, country_code, region, city, latitude, longitude, timezone, isp, asn - Examples: - @location://ip"8.8.8.8" - @location://city"Mountain View" - @location://country"United States"

Tool: get_location()

Generates a detailed Markdown table of geolocation data. - Fields: - IP - Country - Country Code - Region - City - Latitude - Longitude - Timezone - ISP - ASN - Sample Output:
  | Field          | Value             |
  |----------------|-------------------|
  | IP            | 8.8.8.8           |
  | Country       | United States     |
  | Country Code  | US                |
  | Region        | California        |
  | City          | Mountain View     |
  | Latitude      | 37.4223           |
  | Longitude     | -122.0848         |
  | Timezone      | America/Los_Angeles |
  | ISP           | GOOGLE            |
  | ASN           | AS15169           |
  

Prompt: where_am_i_prompt

Predefined query: "Please tell me where I am based on my current IP address." Triggers get_location().

Examples in Claude Desktop

1. Install the server:
   mcp install whereami_mcp.py --name "WhereAmI"
   
2. Query data: - "My IP is @location://ip" - "I’m in @location://city, @location://country" 3. Get full report: - "Where am I?" - get_location()

License

MIT License. See LICENSE for details.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.