WhereAmI MCP Server
A lightweight mcp server that tells you exactly where you are.
kukapay
README
WhereAmI MCP Server
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
mcpandhttpx.
Installation
Prerequisites
- Python 3.10+
pip
Setup
- Clone the repository:
git clone https://github.com/kukapay/whereami-mcp.git cd whereami-mcp - Install dependencies:
pip install mcp httpx - (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
- Install the server:
mcp install whereami_mcp.py --name "WhereAmI" - Query data:
- "My IP is
@location://ip" - "I’m in
@location://city,@location://country"
- "My IP is
- Get full report:
- "Where am I?"
get_location()
License
MIT License. See LICENSE for details.
Recommended Servers
Nefino MCP Server
Provides large language models with access to news and information about renewable energy projects in Germany, allowing filtering by location, topic (solar, wind, hydrogen), and date range.
Smart Photo Journal MCP Server
This MCP server aids users in searching and analyzing their photo library by location, labels, and people, offering functionalities like photo analysis and fuzzy matching for enhanced photo management.
flightradar24-mcp-server
A Claude Desktop MCP server that helps you track flights in real-time using Flightradar24 data. Perfect for aviation enthusiasts, travel planners, or anyone curious about flights overhead!
Strava MCP Server
A Model Context Protocol server that enables language models to interact with Strava data, including activities, athlete statistics, routes, achievements, and social features.
Emergency Medicare Planner MCP Server
Integrates with Google Maps to locate and evaluate medical facilities in emergency situations, helping users find appropriate hospitals and clinics based on medical needs, emergency level, and facility capabilities.
mcp-brave-search
brave search
KNMI Weather MCP
A FastMCP server that provides real-time weather data from KNMI weather stations, allowing users to access temperature, humidity, wind speed, and other weather metrics for any location in the Netherlands through natural language queries.
MCP Weather Server
Provides hourly weather forecasts using the AccuWeather API, enabling users to access current weather conditions and detailed 12-hour forecasts tailored to specific locations.
mapbox-mcp-server
MCP Server for the Mapbox API.
Travel Planner MCP Server
Enables LLMs to perform travel-related tasks by interacting with Google Maps and travel planning services including location search, place details, and travel time calculations.