ForLab Geo API
Countries, admin units, Turkey's official mahalle list, boundaries, timezones, postal codes, phones
Should I use this
Quality & Safety
Based on automated analysis of tool definitions and protocol compliance.
Context Cost
This is the approximate number of tokens consumed each time the server's tools are loaded into a model's context. Higher counts reduce the attention available for other tasks.
Install
One-Click Install
Add this to your `claude_desktop_config.json` file:
{
"mcpServers": {
"geo": {
"url": "https://api.forlab.io/geo/mcp"
}
}
}Remote endpoints
https://api.forlab.io/geo/mcpstreamable-httpWhat it can do
Tool inventory
Tools (13)
π’get_meta
Dataset version, public tileset URLs, sources and licences. Works without a key within a daily free quota.
Input Schema
{
"type": "object",
"properties": {},
"additionalProperties": false
}π’list_countries(lang)
All countries and dependencies with their profile. Works without a key within a daily free quota.
Input Schema
{
"type": "object",
"properties": {
"lang": {
"type": "string",
"description": "Comma-separated BCP 47 tags (max 5), e.g. en,de. Adds `names`; null means we do not have that language.",
"examples": [
"tr,en"
]
}
},
"additionalProperties": false
}π’get_country(cc, lang)
One country: names, calling codes, currencies, languages, timezones, levels with coverage. Works without a key within a daily free quota.
Input Schema
{
"type": "object",
"properties": {
"cc": {
"type": "string",
"pattern": "^[A-Za-z]{2}$",
"description": "ISO 3166-1 alpha-2 country code, e.g. TR.",
"examples": [
"TR"
]
},
"lang": {
"type": "string",
"description": "Comma-separated BCP 47 tags (max 5), e.g. en,de. Adds `names`; null means we do not have that language.",
"examples": [
"tr,en"
]
}
},
"required": [
"cc"
],
"additionalProperties": false
}π’list_places(parent, q, country, lang, limit, ...)
Children of a place (`parent`) or a name prefix search (`q`); exactly one of the two. Works without a key within a daily free quota.
Input Schema
{
"type": "object",
"properties": {
"parent": {
"type": "string",
"description": "Country, region (il), county (ilΓ§e) ID. An ilΓ§e lists its official mahalle and kΓΆy (TΓΔ°K); places off that list are not children.",
"examples": [
"TR-35"
]
},
"q": {
"type": "string",
"maxLength": 100,
"description": "Name prefix (e.g. kuΕa); case, diacritics and Turkish i/Δ± are ignored"
},
"country": {
"type": "string",
"pattern": "^[A-Za-z]{2}$",
"description": "Only with q, e.g. TR"
},
"lang": {
"type": "string",
"description": "Comma-separated BCP 47 tags (max 5), e.g. en,de. Adds `names`; null means we do not have that language.",
"examples": [
"tr,en"
]
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 1000,
"description": "Default 1000 for parent, 20 (max 100) for q",
"examples": [
10
]
},
"offset": {
"type": "integer",
"minimum": 0,
"description": "Number of results to skip for pagination, starting at 0.",
"examples": [
0
]
}
},
"additionalProperties": false
}π’get_place(id, lang)
One place with its path (ancestors, country first). A level-3 unit of an official list (Italy's ISTAT comuni, Britain's ONS wards, France's INSEE communes, Germany's Destatis Gemeinden, the U.S. Census Bureau's county subdivisions) also has `official`: `{scheme, code, release, district}`, its list, its code in it (Codice Catastale, ward code, INSEE commune code, AGS, ANSICODE), the list's edition and, for a ward, its local authority district name; the key is absent on every other place. Such a unit also has its official boundary, a point on it (lat, lon) and its official `population` with `population_year` (ISTAT's 1 January count; a ward's mid-year estimate, Northern Ireland's Census 2021; INSEE municipal population; Destatis population; Census ACS five-year estimates) where the build had them. Works without a key within a daily free quota.
Input Schema
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Place ID, e.g. TR-35.",
"examples": [
"TR-35"
]
},
"lang": {
"type": "string",
"description": "Comma-separated BCP 47 tags (max 5), e.g. en,de. Adds `names`; null means we do not have that language.",
"examples": [
"tr,en"
]
}
},
"required": [
"id"
],
"additionalProperties": false
}π’get_place_boundary(id, detail)
The boundary as one GeoJSON Feature (application/geo+json, not wrapped in `data`), ready for MapLibre. properties: id, name, detail, dataset_version, attribution (an Italian comune's or a British ward's: its official list and boundary credit). Sent gzip-compressed when the client accepts gzip. A reply over 200 KB, or detail=full, is not inlined: the result is its REST URL and size, to download outside the chat. Works without a key within a smaller daily free quota (100 calls per network).
Input Schema
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Place ID, e.g. TR-35.",
"examples": [
"TR-35"
]
},
"detail": {
"enum": [
"overview",
"standard"
],
"default": "overview",
"description": "overview is for country and region maps, standard for a city view, full is the source geometry",
"examples": [
"overview"
]
}
},
"required": [
"id"
],
"additionalProperties": false
}π’find_places_at_point(lat, lon)
Every unit whose land contains the point (country, region, county; in Turkey also mahalle, in Italy the comune, in Britain the ward, in France the commune, in Germany the Gemeinde, in the United States the county subdivision where a boundary is available), most general first; match is none at sea or outside the loaded countries. Works without a key within a smaller daily free quota (100 calls per network).
Input Schema
{
"type": "object",
"properties": {
"lat": {
"type": "number",
"minimum": -90,
"maximum": 90,
"description": "Latitude in decimal degrees, from -90 to 90.",
"examples": [
38.4237
]
},
"lon": {
"type": "number",
"minimum": -180,
"maximum": 180,
"description": "Longitude in decimal degrees, from -180 to 180.",
"examples": [
27.1428
]
}
},
"required": [
"lat",
"lon"
],
"additionalProperties": false
}π’get_timezone(lat, lon)
IANA timezone of a point (timezone-boundary-builder polygons: land and territorial waters) with the current UTC offset, DST flag and local time; match is none on the open sea. `dst` is true when the zone's clocks are advanced at that instant: its offset is the larger of the two it shows in that year (1 January and 1 July); a zone with one offset all year is never DST (Morocco: +01:00 and the +00:00 of Ramadan are both `dst: false`). When zones share an edge or overlap, `ambiguous` is true, `timezone` and the other fields are the first zone by name and `candidates` lists all of them (each with its own offset, dst and local time). 503 NOT_READY on a dataset built before the feature. Works without a key within a smaller daily free quota (100 calls per network).
Input Schema
{
"type": "object",
"properties": {
"lat": {
"type": "number",
"minimum": -90,
"maximum": 90,
"description": "Latitude in decimal degrees, from -90 to 90.",
"examples": [
38.4237
]
},
"lon": {
"type": "number",
"minimum": -180,
"maximum": 180,
"description": "Longitude in decimal degrees, from -180 to 180.",
"examples": [
27.1428
]
}
},
"required": [
"lat",
"lon"
],
"additionalProperties": false
}π’find_nearby_places(lat, lon, limit, radius, lang)
The nearest populated places (GeoNames cities500: 500 inhabitants or more, or a seat of government) with distance in km, population and path, nearest first. 503 NOT_READY on a dataset built before the feature. Works without a key within a smaller daily free quota (100 calls per network).
Input Schema
{
"type": "object",
"properties": {
"lat": {
"type": "number",
"minimum": -90,
"maximum": 90,
"description": "Latitude in decimal degrees, from -90 to 90.",
"examples": [
38.4237
]
},
"lon": {
"type": "number",
"minimum": -180,
"maximum": 180,
"description": "Longitude in decimal degrees, from -180 to 180.",
"examples": [
27.1428
]
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"description": "Default 10",
"examples": [
10
]
},
"radius": {
"type": "integer",
"minimum": 1,
"maximum": 500,
"description": "Kilometres, default 100; places farther away are not returned",
"examples": [
50
]
},
"lang": {
"type": "string",
"description": "Comma-separated BCP 47 tags (max 5), e.g. en,de. Adds `names`; null means we do not have that language.",
"examples": [
"tr,en"
]
}
},
"required": [
"lat",
"lon"
],
"additionalProperties": false
}π’lookup_postal_code(country, code, limit, offset)
The places of a postal code (GeoNames); case, spaces and hyphens in the code are ignored. `partial` is true for the countries GeoNames gives only in part (CA, NL, GB: first part; CL, CN, AR: first digits; IE, MT: first letters; BR: major codes). 503 NOT_READY on a dataset built before the feature. Works without a key within a smaller daily free quota (100 calls per network).
Input Schema
{
"type": "object",
"properties": {
"country": {
"type": "string",
"pattern": "^[A-Za-z]{2}$",
"description": "ISO 3166-1 alpha-2 country code, e.g. TR.",
"examples": [
"TR"
]
},
"code": {
"type": "string",
"maxLength": 20,
"description": "Postal code to look up, up to 20 characters.",
"examples": [
"35030"
]
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 1000,
"description": "Default 100",
"examples": [
10
]
},
"offset": {
"type": "integer",
"minimum": 0,
"maximum": 10000,
"description": "Number of results to skip for pagination, from 0 to 10000.",
"examples": [
0
]
}
},
"required": [
"country",
"code"
],
"additionalProperties": false
}π’find_nearby_postal_codes(lat, lon, limit, radius)
The postal codes nearest to a point (GeoNames), nearest first, with distance in km. 503 NOT_READY on a dataset built before the feature. Works without a key within a smaller daily free quota (100 calls per network).
Input Schema
{
"type": "object",
"properties": {
"lat": {
"type": "number",
"minimum": -90,
"maximum": 90,
"description": "Latitude in decimal degrees, from -90 to 90.",
"examples": [
38.4237
]
},
"lon": {
"type": "number",
"minimum": -180,
"maximum": 180,
"description": "Longitude in decimal degrees, from -180 to 180.",
"examples": [
27.1428
]
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"description": "Default 10",
"examples": [
10
]
},
"radius": {
"type": "integer",
"minimum": 1,
"maximum": 500,
"description": "Kilometres, default 50",
"examples": [
50
]
}
},
"required": [
"lat",
"lon"
],
"additionalProperties": false
}π’validate_phone_number(number, country)
Validate and format a phone number. A valid number also has `e164`, `national`, `international`, `country`, `type` and, from libphonenumber's numbering-plan data in English: `carrier`, the operator the number range was first allocated to (numbering-plan data, not a live HLR lookup: a ported number may now be with another operator; null for landlines and where unknown); `timezones`, IANA zone ids ([] when unknown; a number with no geographic tie, such as most mobiles, gets its country's zones); `location`, the area of a geographic number (a city or region, e.g. "San Francisco, CA"), else the country, null when unknown. An invalid number has only `valid` and `possible`; one that does not parse, `valid` and `reason`. Works without a key within a daily free quota.
Input Schema
{
"type": "object",
"properties": {
"number": {
"type": "string",
"maxLength": 40,
"description": "E.164 with a leading +, or national with country; in a URL query send the + as %2B",
"examples": [
"+905321234567"
]
},
"country": {
"type": "string",
"pattern": "^[A-Za-z]{2}$",
"description": "Default region for numbers without a + prefix",
"examples": [
"TR"
]
}
},
"required": [
"number"
],
"additionalProperties": false
}π’get_caller_location
The caller's own location, from Cloudflare's IP geolocation (edge only: the Worker at api.forlab.io/geo answers it, the Python service does not). Only the address the request comes from is looked up, never one you send. The location is approximate, city level at best, and a value Cloudflare does not know is null. `country` is the country's place in this dataset (same shape as /v1/contains), null when the dataset lacks it. Replies carry `Cache-Control: private, no-store`. Works without a key within a daily free quota.
Input Schema
{
"type": "object",
"properties": {},
"additionalProperties": false
}Community
Evidence