Purpose: whereami-mcp is a lightweight MCP (Model Context Protocol) server used to determine the user's location based on the current IP address, with geolocation data provided by ipapi.co. It is suitable for use as a location information tool in MCP-enabled clients (such as Claude Desktop).
Main capabilities:
- Dynamic resource: retrieve specific location data through location://{type}; supported types include ip, country, country_code, region, city, latitude, longitude, timezone, isp, asn. For example, @location://ip returns the IP, @location://city returns the city, and @location://country returns the country.
- Detailed tool: call get_location() to generate a detailed Markdown table location report, with fields including IP, Country, Country Code, Region, City, Latitude, Longitude, Timezone, ISP, ASN.
- Natural language prompt: you can ask “Where am I?” to get detailed results; this prompt triggers get_location().
- Error handling: provides basic graceful handling for API and network issues.
- Minimal dependencies: only mcp and httpx are required.
Usage: Clone the repository and install dependencies: git clone https://github.com/kukapay/whereami-mcp.git cd whereami-mcp pip install mcp httpx Optionally install as an MCP service: mcp install whereami_mcp.py --name "WhereAmI" Run the server: Run directly: python whereami_mcp.py Development mode: mcp dev whereami_mcp.py After installing the server in Claude Desktop, you can query data, for example “My IP is @location://ip”, “I’m in @location://city, @location://country”, or get a complete report via “Where am I?”.
Use cases: scenarios where you need to quickly obtain IP-based geolocation information, individual location fields, or a complete location report in an MCP client.
Limitations: the project materials do not specify location accuracy, request rate limits, or ipapi.co's pricing or quota situation, nor do they provide location methods other than IP-based geolocation; actual availability depends on the ipapi.co service and the network environment. The license is MIT.