ForLab Geo API

io.forlab由 forlab.io 發布官方發布者v1.0.0更新於 Nov 22, 2026

Countries, admin units, Turkey's official mahalle list, boundaries, timezones, postal codes, phones

已驗證Streamable HTTP可網頁執行位置與生活資料與分析

概覽

AI 產生的概覽

遠端地理 API,讓助理查詢國家、行政區劃、邊界、時區、郵遞區號、附近地點和電話號碼。

可以做什麼
  • 列出並讀取國家及其概況:名稱、國際冠碼、貨幣、語言、時區與層級涵蓋情形
  • 依上層或名稱前綴瀏覽行政區劃,讀取含上層路徑的地點,並取得 GeoJSON 格式的地點邊界
  • 把座標解析為包含它的各級區劃、IANA 時區(含 UTC 偏移與日光節約時間旗標)以及附近聚落
  • 查詢某地點的郵遞區號,以及某座標附近最近的郵遞區號
  • 驗證並格式化電話號碼,包括 E.164 與國內格式
  • 讀取資料集中介資料、版本、圖磚網址、來源與授權
適用情境
當助理需要可靠的地點、邊界、時區或郵遞區號資訊時適用,例如補齊地址、把地點資料放上地圖,或核對電話號碼的所屬國家與格式。
執行需求
遠端 streamable HTTP 端點 api.forlab.io,不需本機安裝。點位查詢、附近地點與附近郵遞區號需要以 Authorization Bearer 標頭送出 API 金鑰;免金鑰工具在每日免費額度內可用。需要網路連線。
安裝前請注意
Authorization 金鑰屬於機密,會隨每次請求送出。超過 200 KB 或 detail=full 的邊界結果會以 REST 連結回傳而非直接內嵌。部分功能在較舊的資料集上會回傳 503 NOT_READY。呼叫端位置由請求 IP 推估,僅為近似值。資料來自第三方,須保留其署名與授權條款。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 ForLab Geo API,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.forlab%2Fgeo/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "forlab-geo-api": {
      "type": "http",
      "url": "https://api.forlab.io/geo/mcp"
    }
  }
}

工具

13

get_meta

Dataset metadata

Dataset version, public tileset URLs, sources and licences. Works without a key within a daily free quota.

無需輸入參數。

list_countries

List countries

All countries and dependencies with their profile. Works without a key within a daily free quota.

輸入參數lang

get_country

Get country

One country: names, calling codes, currencies, languages, timezones, levels with coverage. Works without a key within a daily free quota.

輸入參數cc必填lang

list_places

Children or search

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.

輸入參數qlanglimitoffsetparentcountry

get_place

Get place

One place with its path (ancestors, country first). Works without a key within a daily free quota.

輸入參數id必填lang

get_place_boundary

Place boundary

The boundary as one GeoJSON Feature (application/geo+json, not wrapped in `data`), ready for MapLibre. properties: id, name, detail, dataset_version, attribution. 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. Needs an API key: the MCP client sends `Authorization: Bearer <key>`.

輸入參數id必填detail

find_places_at_point

Point in polygon

Every unit whose land contains the point (country, region, county; in Turkey also mahalle), most general first; match is none at sea or outside the loaded countries. Needs an API key: the MCP client sends `Authorization: Bearer <key>`.

輸入參數lat必填lon必填

get_timezone

Timezone

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. Needs an API key: the MCP client sends `Authorization: Bearer <key>`.

輸入參數lat必填lon必填

find_nearby_places

Nearby places

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. Needs an API key: the MCP client sends `Authorization: Bearer <key>`.

輸入參數lat必填lon必填langlimitradius

lookup_postal_code

Postal code lookup

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. Needs an API key: the MCP client sends `Authorization: Bearer <key>`.

輸入參數code必填limitoffsetcountry必填

find_nearby_postal_codes

Nearby postal codes

The postal codes nearest to a point (GeoNames), nearest first, with distance in km. 503 NOT_READY on a dataset built before the feature. Needs an API key: the MCP client sends `Authorization: Bearer <key>`.

輸入參數lat必填lon必填limitradius

validate_phone_number

Phone number

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.

輸入參數number必填country

get_caller_location

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.

無需輸入參數。

版本歷史

1
  1. v1.0.0最新Nov 22, 2026

評分

已滿足適用檢查項的 83%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分

    請宣告包含 README 的 GitHub 儲存庫,或在 OAuth 受保護資源後設資料中提供 resource_documentation。

  • 授權條款不適用

    託管服務按其提供方的條款使用,因此這裡不要求授權條款。此檢查項不計入百分比。