Skip to main content

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:

$ claude mcp add gridpin -- uvx gridpin-mcp

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

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

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

{ "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:

$ 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

Tool What it does
list_countries covered countries, sheet sizes, which are downloaded
download_sheet fetch one country sheet (32-677 MB) once, verify its SHA-256; the only tool that uses the network
geocode address text -> ranked candidates with lat, lon, precision, confidence
reverse coordinates -> nearest indexed addresses with distance_m
batch up 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

$ pip install gridpin-mcp
$ gridpin-fetch fr          # prints the path, e.g. ~/.cache/gridpin/v0.5.0/france.bin
import gridpin
from gridpin_mcp import sheets

path = sheets.download("fr")   # no-op when already downloaded
gridpin.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.

Metadata

Release files for gridpin-mcp 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gridpin-mcp 0.5.0
File Size Uploaded Provenance Actions
gridpin_mcp-0.5.0.tar.gz 19.0 kB With provenance Details for gridpin_mcp-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gridpin-mcp 0.5.0
File Interpreter ABI Platform Actions
gridpin_mcp-0.5.0-py3-none-any.whl Python 3 none any Details for gridpin_mcp-0.5.0-py3-none-any.whl

Total release size: 34.9 kB

Release files / gridpin_mcp-0.5.0.tar.gz

Download URL gridpin_mcp-0.5.0.tar.gz
Size 19.0 kB
Tags Source
SHA-256 checksum
How to use checksums
88216c7a42593da6657a3d75810f2eba006b921be1f3b4cf1c34776222657d26
BLAKE2b-256 checksum
How to use checksums
70b98ef612ec990ba289b0f07f08748232f45edc31fe13fa8e5446cd2a765504
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

Release files / gridpin_mcp-0.5.0-py3-none-any.whl

Download URL gridpin_mcp-0.5.0-py3-none-any.whl
Size 15.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3e1e72cd15e58fc9510280b19c767e7d52eb8f447d83ee58039eb2fd5aa7d373
BLAKE2b-256 checksum
How to use checksums
1913571d372b9c304db22f116586121e159ca688d42f806d8263f7e56d04e7d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

Security for gridpin-mcp 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for gridpin_mcp-0.5.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page