whereami-mcp
A lightweight mcp server that tells you exactly where you are.
Documentation
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 `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-mcp2. Install dependencies:
pip install mcp httpx3. (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.pyComponents
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:
3. Get full report:
License
MIT License. See LICENSE for details.
Frequently asked questions
What is whereami-mcp?
whereami-mcp is A lightweight mcp server that tells you exactly where you are.
How do I install whereami-mcp?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is whereami-mcp open source?
Yes — it is hosted on GitHub at https://github.com/kukapay/whereami-mcp and has 3 stars.
Related MCP tools
Damn Vulnerable MCP Server Python-based implementation. Trusted by 1200+ developers. Trusted by 1200+ developers. Trusted by 1200+ developers.
A Model Context Protocol (MCP) server that enables secure interaction with MySQL databases Python-based implementation. Trusted by 900+ developers.
Query MCP enables end-to-end management of Supabase via chat interface: read & write query executions, management API support, automatic migration versioning...
Model Context Protocol with Neo4j Python-based implementation. Trusted by 700+ developers. Trusted by 700+ developers. Trusted by 700+ developers.
An MCP server that provides control over Android devices via adb Python-based implementation. Trusted by 500+ developers.
A Model Context Protocol (MCP) server for PostgreSQL databases with enhanced capabilities for AI agents. Python-based implementation.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP