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。

  • 许可证不适用

    托管服务按其提供方的条款使用,因此这里不要求许可证。此检查项不计入百分比。