GeoSphere MCP Server
# π GeoSphere MCP Server
> **Real-world geo-intelligence for AI agents** β weather, geocoding, live flights, package tracking, currencies, earthquakes, and space data. Zero API keys required to get started.
[](https://www.python.org/)
[](https://modelcontextprotocol.io/)
[](LICENSE)
[](#tools)
---
## What is this?
GeoSphere is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that gives AI agents access to 16 real-world tools across 7 categories β all backed by **free, public APIs** with no sign-up or API keys required.
Drop it into Kiro, Claude Code, GitHub Copilot, Cursor, Windsurf, or any MCP-compatible client and your AI gains real-world awareness: *"What's the weather in Tokyo?", "Track this UPS package", "What flights are over New York right now?", "Is December 25th a holiday in Germany?"*
---
## Tools (16 total)
### πΊοΈ Geocoding β *OpenStreetMap Nominatim*
| Tool | Description |
|------|-------------|
| `geocode` | Address or place name β latitude & longitude |
| `reverse_geocode` | Latitude & longitude β full street address |
### π IP Location β *ip-api.com*
| Tool | Description |
|------|-------------|
| `get_ip_location` | IP address β city, country, timezone, ISP, ASN |
### π€οΈ Weather & Environment β *Open-Meteo*
| Tool | Description |
|------|-------------|
| `get_weather` | Current conditions + 7-day forecast for any location |
| `get_weather_history` | Historical daily weather, back to 1940 |
| `get_air_quality` | AQI, PM2.5, PM10, CO, NOβ, ozone, UV index |
### βοΈ Solar Data β *SunriseSunset.io*
| Tool | Description |
|------|-------------|
| `get_sunrise_sunset` | Sunrise, sunset, golden hour, twilight times for any date & location |
### π Countries β *RestCountries*
| Tool | Description |
|------|-------------|
| `get_country_info` | Population, capital, currencies, languages, borders, flag, calling code |
### π
Public Holidays β *Nager.Date*
| Tool | Description |
|------|-------------|
| `get_public_holidays` | All public holidays for 200+ countries, any year |
| `is_public_holiday` | Check if a specific date is a holiday in a country |
### π± Currency β *Frankfurter (ECB rates)*
| Tool | Description |
|------|-------------|
| `convert_currency` | Convert between 200+ currencies using official central bank rates |
| `get_exchange_rates` | All exchange rates for a base currency (live or historical) |
### π Earthquakes β *USGS*
| Tool | Description |
|------|-------------|
| `get_earthquakes` | Recent earthquakes globally or by radius β magnitude, depth, tsunami alerts |
### βοΈ Flights β *OpenSky Network*
| Tool | Description |
|------|-------------|
| `track_flights_by_area` | Live aircraft in a geographic bounding box |
| `track_flight_by_callsign` | Track a specific flight by callsign or ICAO24 code |
### π¦ Package Tracking β *Carrier Detection*
| Tool | Description |
|------|-------------|
| `track_package` | Detect carrier (USPS/FedEx/UPS/DHL/Amazon) + tracking URLs |
| `identify_carrier` | Identify which carrier a tracking number belongs to |
### πΈ Space β *Open Notify*
| Tool | Description |
|------|-------------|
| `get_iss_location` | Real-time ISS position (+ distance from your location) |
| `get_people_in_space` | Everyone currently in space, by spacecraft |
---
## Quick Start
**Prerequisites:** Python 3.12+ and [`uv`](https://docs.astral.sh/uv/) (recommended) or `pip`.
```bash
# Clone the repo
git clone https://github.com/yourusername/geosphere-mcp-server.git
cd geosphere-mcp-server
# Install dependencies
uv sync
# Test it works
uv run mcp dev main.py
```
The MCP Inspector opens at `http://localhost:5173` β you can call any tool interactively.
---
## Add to Your AI Client
### π· Kiro (VS Code Extension)
Edit `.kiro/settings/mcp.json` in your workspace, or the global `~/.kiro/settings/mcp.json`:
```json
{
"mcpServers": {
"geosphere": {
"command": "uv",
"args": [
"run",
"--directory",
"/absolute/path/to/geosphere-mcp-server",
"main.py"
]
}
}
}
```
Then use it in Kiro: *"What's the air quality in Delhi right now?"*
---
### π£ Claude Code (Anthropic CLI)
```bash
claude mcp add geosphere -- uv run --directory /absolute/path/to/geosphere-mcp-server main.py
```
Or add manually to `~/.claude/claude_desktop_config.json` (Claude Desktop):
```json
{
"mcpServers": {
"geosphere": {
"command": "uv",
"args": [
"run",
"--directory",
"/absolute/path/to/geosphere-mcp-server",
"main.py"
]
}
}
}
```
---
### π΅ GitHub Copilot (VS Code)
Open VS Code settings (`Cmd+,`) β search **MCP** β click **Edit in settings.json**, then add:
```json
{
"mcp": {
"servers": {
"geosphere": {
"type": "stdio",
"command": "uv",
"args": [
"run",
"--directory",
"/absolute/path/to/geosphere-mcp-server",
"main.py"
]
}
}
}
}
```
Then open Copilot Chat, switch to **Agent mode**, and ask: *"What's the weather forecast for San Francisco this week?"*
---
### π Cursor
Open Cursor Settings β **MCP** β **Add new MCP server**:
```json
{
"mcpServers": {
"geosphere": {
"command": "uv",
"args": [
"run",
"--directory",
"/absolute/path/to/geosphere-mcp-server",
"main.py"
]
}
}
}
```
---
### π’ Windsurf (Codeium)
Edit `~/.codeium/windsurf/mcp_config.json`:
```json
{
"mcpServers": {
"geosphere": {
"command": "uv",
"args": [
"run",
"--directory",
"/absolute/path/to/geosphere-mcp-server",
"main.py"
]
}
}
}
```
---
### π€ Any MCP-Compatible Client (Generic)
The server speaks **stdio transport** (standard MCP). Pass these to any client:
| Field | Value |
|-------|-------|
| **Command** | `uv` |
| **Args** | `["run", "--directory", "/path/to/geosphere-mcp-server", "main.py"]` |
| **Transport** | `stdio` |
---
### π Use as a Python Library (programmatic)
```python
import asyncio
import httpx
# Example: call the geocode logic directly
async def main():
async with httpx.AsyncClient() as client:
resp = await client.get(
"https://nominatim.openstreetmap.org/search",
params={"q": "Tokyo, Japan", "format": "json", "limit": 1},
headers={"User-Agent": "my-app/1.0"},
)
print(resp.json())
asyncio.run(main())
```
---
## Example Prompts
Once connected to your AI client, try these:
```
What's the weather in Mumbai this week?
Reverse geocode 48.8584, 2.2945
What flights are currently over the UK?
Track package 1Z9999W99999999999
Is January 1st a holiday in Japan?
Convert 500 USD to EUR
Show me earthquakes above magnitude 5 in the last 7 days
What's the air quality in Beijing right now?
Where is the ISS right now?
Who is currently in space?
Tell me about Germany β population, capital, currencies, borders
What's my IP location?
```
---
## API Sources & Limits
| Tool Group | API | Rate Limits | Key Required |
|------------|-----|-------------|-------------|
| Geocoding | [Nominatim (OSM)](https://nominatim.org/) | 1 req/sec | β No |
| IP Location | [ip-api.com](https://ip-api.com/) | 45 req/min | β No |
| Weather / AQI / History | [Open-Meteo](https://open-meteo.com/) | 10,000/day | β No |
| Sunrise/Sunset | [SunriseSunset.io](https://sunrisesunset.io/api/) | Generous | β No |
| Countries | [RestCountries](https://restcountries.com/) | Unlimited | β No |
| Public Holidays | [Nager.Date](https://nagerholidays.com/) | Generous | β No |
| Currency | [Frankfurter](https://frankfurter.dev/) | Generous | β No |
| Earthquakes | [USGS](https://earthquake.usgs.gov/) | Unlimited | β No |
| Flights | [OpenSky Network](https://opensky-network.org/) | ~400 req/day anonymous | β No |
| Package Tracking | Carrier detection + links | Unlimited (no live status) | β No |
| Space | [Open Notify](http://open-notify.org/) | Unlimited | β No |
> **Package tracking note:** The `track_package` tool detects the carrier and returns direct official tracking links. Live programmatic status requires a free key from [17track.net](https://api.17track.net) (100 free/month).
>
> **Flight tracking note:** OpenSky anonymous access works best from residential/office IPs. Datacenter IPs may be blocked.
---
## Project Structure
```
geosphere-mcp-server/
βββ main.py # Entry point
βββ pyproject.toml # Package metadata & dependencies
βββ README.md
βββ LICENSE
βββ geosphere/
βββ __init__.py
βββ server.py # FastMCP server wiring
βββ tools/
βββ __init__.py
βββ geocoding.py # geocode, reverse_geocode
βββ ip_location.py # get_ip_location
βββ weather.py # get_weather, get_weather_history, get_air_quality
βββ sun.py # get_sunrise_sunset
βββ country.py # get_country_info
βββ holidays.py # get_public_holidays, is_public_holiday
βββ currency.py # convert_currency, get_exchange_rates
βββ earthquakes.py # get_earthquakes
βββ flights.py # track_flights_by_area, track_flight_by_callsign
βββ packages.py # track_package, identify_carrier
βββ space.py # get_iss_location, get_people_in_space
```
---
## Tech Stack
| Component | Technology |
|-----------|-----------|
| Language | Python 3.12+ |
| MCP SDK | [`mcp[cli]`](https://pypi.org/project/mcp/) 2.3.0 β official Anthropic SDK |
| HTTP Client | [`httpx`](https://www.python-httpx.org/) β async, production-grade |
| Validation | [`pydantic`](https://docs.pydantic.dev/) β runtime type safety |
| Package Manager | [`uv`](https://docs.astral.sh/uv/) β fast, modern Python tooling |
| Transport | stdio (MCP standard) |
---
## Contributing
Pull requests are welcome. To add a new tool:
1. Create a file in `geosphere/tools/your_tool.py`
2. Define a `register(mcp: FastMCP) -> None` function
3. Add `@mcp.tool()` decorated async functions inside it
4. Import and call `your_tool.register(mcp)` in `geosphere/server.py`
---
## License
MIT Β© 2025 β see [LICENSE](LICENSE)
---
*Built with the [Model Context Protocol](https://modelcontextprotocol.io/) SDK by Anthropic.*
TDQS
Scored across 19 tools
Most tools target a distinct resource: geocode/reverse_geocode, get_weather/get_weather_history, and track_flights_by_area/track_flight_by_callsign are cleanly separated by input shape and result. Two pairs blur slightly: get_public_holidays vs is_public_holiday, and track_package vs identify_carrier (track_package already returns carrier detection plus links, making identify_carrier a strict subset). Descriptions do enough to steer an agent away from misselection.
Nearly every tool follows a clear verb_noun snake_case pattern (get_weather, get_earthquakes, track_flight_by_callsign, convert_currency, is_public_holiday). The only deviations are the bare-verb 'geocode' and 'reverse_geocode', which are idiomatic for the domain and still obviously paired. No mixed casing or chaotic verb styles.
At 19 tools this sits in the heavy band for a single server, and the surface stretches beyond geography into currency conversion, package tracking, and space objects. Individual tools are non-trivial and earn their place, but the volume plus domain sprawl makes the set feel broader than one coherent scope.
Coverage is broad: bidirectional geocoding, IP geolocation, current and historical weather, air quality, solar data, country info, holidays, exchange rates, earthquakes, live flight tracking, and ISS tracking, with no obvious dead ends. Gaps are minor and workaroundable, e.g. no point-to-point distance/elevation tool and no explicit timezone conversion despite timezone fields appearing in results.