GridPin is an offline geocoding project whose MCP directory provides a geocoding server for AI agents. The core idea is "put a country in a file": each country corresponds to a memory-mapped file that is read on the user's local machine to perform forward or reverse geocoding. It requires no API keys, has no rate limits, and query data never leaves the local machine. The only network step is the initial download of a country's data sheet, and the downloaded content is verified against signed GridPin release versions.
Key capabilities
- Forward geocoding and reverse geocoding.
- Multiple usage modes: Python, CLI, DuckDB, and an MCP server.
- The MCP server enables agents to geocode addresses, with results consistent with those returned by the GridPin CLI, Python, and DuckDB.
- Support for self-built places sheets: for example campuses, sites, warehouses, etc., which can be built with gridpin build --places places.csv own.bin; when GRIDPIN_OWN_SHEET points to that sheet, it is queried before the country data sheets, and answers from that sheet are marked with own_sheet (requires GridPin engine 0.9 or later).
Usage
- Add the MCP server to any client that reads the mcpServers configuration, such as Claude Desktop, Cursor, etc.
- To store data sheets in a different directory, pass GRIDPIN_HOME in the server's own environment variables. Exporting it only in the shell is not enough: some MCP clients pass only a small set of environment variables when starting the server (clients based on the MCP Python SDK pass HOME, LOGNAME, PATH, SHELL, TERM, and USER on macOS and Linux), so GRIDPIN_HOME and XDG_CACHE_HOME in the shell will not reach the server, and data sheets will land in ~/.cache/gridpin.
- download_sheet can download an entire data sheet in a single tool call; larger data sheets may exceed the duration allowed for a single call by the client (for example, mcp-haystack's MCPToolset stops after 30 seconds by default). You can increase the client's tool timeout, or beforehand in the terminalDownload the data tables using the same GRIDPIN_HOME as the server, after which the tool returns immediately.
- Data tables can also be downloaded directly without using MCP: the data tables are stored in $GRIDPIN_HOME, otherwise $XDG_CACHE_HOME/gridpin, otherwise ~/.cache/gridpin. The size and SHA-256 of each data table are fixed in the package according to the signed release manifest; downloads that do not match are discarded.
- Step-by-step setup for agents (requirements, setup, verification) is documented in llms-install.md.
Use cases
- AI agent workflows that need to perform address geocoding locally, with no API key and no rate limits.
- Address lookup scenarios that require the data not to leave the local machine.
- Scenarios that need to combine self-built location tables (campuses, sites, warehouses, etc.) for priority matching.
Limitations and notes
- The countries covered by the current release v0.11.0 are: Australia, Belgium, Brazil, Canada, France, Germany, Italy, Mexico, Netherlands, New Zealand, Poland, Serbia, Spain, United States; data for other countries is not yet provided.
- Street- or city-level accuracy should be treated as approximate.
- On first use, the data table for the corresponding country must be downloaded; large-file downloads may be subject to the client tool's timeout limits.
- The project is licensed under Apache-2.0; attribution information for the data table data can be found in attributions.