home / mcp / whereami mcp server
A lightweight mcp server that tells you exactly where you are.
Configuration
View docs{
"mcpServers": {
"kukapay-whereami-mcp": {
"command": "python",
"args": [
"whereami_mcp.py"
]
}
}
}WhereAmI MCP Server is a lightweight Python-based service that determines your current location from your IP address using ipapi.co. It exposes a simple MCP interface to fetch specific location details and generate a comprehensive location report, making it easy to integrate location-aware behavior into your MCP workflows.
You interact with WhereAmI through an MCP client to fetch exact location details or to generate a full geolocation report. Use the location resource to read individual fields, or invoke the location-report tool to get a complete Markdown table with key data such as IP, country, city, latitude, longitude, timezone, ISP, and ASN. You can trigger a detailed report by asking for a full location report when you query with the predefined prompt.
Prerequisites you need before installing are Python 3.10 or newer and pip.
Step 1: Install the MCP client and HTTP utilities.
pip install mcp httpxStep 2: Install WhereAmI as an MCP service (optional). This registers the server under MCP with a friendly name.
mcp install whereami_mcp.py --name "WhereAmI"Step 3: Run the server directly for development or testing.
python whereami_mcp.pyStep 4: For development workflows, you can start the MCP server in development mode.
mcp dev whereami_mcp.pyIf you plan to run the server locally, ensure your environment can reach ipapi.co, as location resolution relies on that service for IP-based data.
WhereAmI exposes two main interfaces for MCP clients:
Resource: location://{type} reads a specific piece of location data. Supported types include ip, country, country_code, region, city, latitude, longitude, timezone, isp, and asn.
Tool: get_location() produces a detailed Markdown table with the following fields: IP, Country, Country Code, Region, City, Latitude, Longitude, Timezone, ISP, ASN.
Prompt: where_am_i_prompt is a predefined query that triggers get_location() to return a full report.
The server handles API or network errors gracefully. If the location data cannot be retrieved due to connectivity issues, you will receive a clear error message indicating the problem and potential remediation steps.
Limit exposure of local endpoints when running in shared environments. Prefer secure channels and avoid exposing the MCP server to untrusted networks without appropriate access controls.
Resource to fetch a specific piece of location data. Use the type parameter to request items like ip, country, city, latitude, longitude, or isp.
Tool that generates a comprehensive Markdown table with geolocation data including IP, country, region, city, coordinates, timezone, ISP, and ASN.
Predefined prompt that triggers get_location() to produce a full location report.