GridPin offline geocoder

io.github.gridpin由 GitHub 账号 gridpin 发布v0.5.0更新于 Nov 7, 2026

Offline geocoding and reverse geocoding from one local file per country. No API key, no rate limit.

已验证STDIO仅桌面位置与生活文件与存储

概览

AI 生成的概览

离线地理编码与逆地理编码 MCP 服务器,读取本地按国家划分的数据文件,无需 API 密钥,也没有速率限制。

可以做什么
  • 列出覆盖的国家、数据文件大小以及哪些已下载
  • 一次性下载某个国家的数据文件,并用 SHA-256 校验(唯一的联网步骤)
  • 将地址文本地理编码为带经纬度、精度和置信度的排序候选结果
  • 将坐标逆地理编码为最近的已索引地址,并给出以米计的距离
  • 每次调用可批量地理编码同一国家最多 1000 个地址,按输入顺序返回
适用场景
适合助手需要把地址转成坐标或把坐标转成地址、又不希望把查询发给第三方地理编码 API 的场景,且所需国家在覆盖范围内(v0.7.0 版本包括美国、加拿大、德国、法国、意大利、西班牙、墨西哥、荷兰、巴西、塞尔维亚)。
运行要求
以 stdio 方式在本地运行,通过 uvx 从 PyPI 包 gridpin-mcp 启动,因此需要 Python/uv 运行环境。首次使用某国家需联网下载其数据文件(32-677 MB),存放于 GRIDPIN_HOME,否则为 XDG_CACHE_HOME/gridpin,再否则为 ~/.cache/gridpin;GRIDPIN_HOME 必须设置在服务器自身的环境中,仅在 shell 中导出无效。无需账号或 API 密钥。
安装前请注意
下载数据文件会向本地磁盘写入大文件(最大 677 MB),这也是唯一的联网行为;较大的文件可能超过客户端默认的工具超时。街道或城市精度的结果只是近似值,不应视为精确。不要求任何凭据。

安装

在 SourceWeft 中

  1. 打开 控制台中的 GridPin offline geocoder,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

gridpin-mcp — offline geocoding for AI agents

An MCP server that lets an agent geocode addresses with GridPin: one memory-mapped file per country, read on your machine. No API key, no rate limit, and no query leaves the machine. The only network step is downloading a country sheet once, verified against the signed GridPin release.

Countries (release v0.8.0): United States, Canada, Germany, France, Italy, Spain, Australia, Mexico, Netherlands, Brazil, Serbia.

Add it to an agent

Claude Code:

console
$ claude mcp add gridpin -- uvx gridpin-mcp

Any client that reads an mcpServers config (Claude Desktop, Cursor, ...):

json
{ "mcpServers": { "gridpin": { "command": "uvx", "args": ["gridpin-mcp"] } } }

To keep sheets in another directory, pass GRIDPIN_HOME in the server's own environment:

json
{ "mcpServers": { "gridpin": { "command": "uvx", "args": ["gridpin-mcp"],                               "env": { "GRIDPIN_HOME": "/path/to/sheets" } } } }

Exporting it in your shell is not enough. Some MCP clients start the server with only a few environment variables (clients built on the MCP Python SDK pass HOME, LOGNAME, PATH, SHELL, TERM and USER on macOS and Linux), so GRIDPIN_HOME and XDG_CACHE_HOME from your shell never reach it and sheets go to ~/.cache/gridpin.

download_sheet fetches a whole sheet in one tool call, and the larger sheets can take longer than a client allows for one call (mcp-haystack's MCPToolset, for example, stops after 30 s by default). Raise the client's tool timeout, or download the sheet beforehand in a terminal, with the same GRIDPIN_HOME as the server; the tool then returns at once:

console
$ uvx --from gridpin-mcp gridpin-fetch fr

Step-by-step setup for agents (requirements, settings, verification): llms-install.md.

If GridPin is useful to you, a star on GitHub helps other people find it.

Tools

ToolWhat it does
list_countriescovered countries, sheet sizes, which are downloaded
download_sheetfetch one country sheet (32-677 MB) once, verify its SHA-256; the only tool that uses the network
geocodeaddress text -> ranked candidates with lat, lon, precision, confidence
reversecoordinates -> nearest indexed addresses with distance_m
batchup to 1000 addresses of one country per call, in input order

Results are the same as the GridPin CLI, Python and DuckDB return. Treat street or city precision as approximate.

Download a sheet without MCP

console
$ pip install gridpin-mcp$ gridpin-fetch fr          # prints the path, e.g. ~/.cache/gridpin/v0.5.0/france.bin
python
import gridpinfrom gridpin_mcp import sheets
path = sheets.download("fr")   # no-op when already downloadedgridpin.Geocoder(str(path)).geocode("1 rue de la Paix, Paris", 1)

Sheets go to $GRIDPIN_HOME, else $XDG_CACHE_HOME/gridpin, else ~/.cache/gridpin. Sizes and SHA-256 of every sheet are pinned in the package from the signed release attestation; a download that does not match is discarded.

License

Apache-2.0. Sheet data: see attributions.

来源:mcp/README.md,提交 831d941

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

4
  1. v0.5.0最新Nov 7, 2026
  2. v0.4.0Nov 3, 2026
  3. v0.3.0Oct 31, 2026
  4. v0.1.0Oct 15, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分