
Geocoding
io.github.danishashko由 GitHub 帳號 danishashko 發布v1.0.2更新於 Oct 24, 2026
Forward and reverse geocoding, place search, and distance via OpenStreetMap Nominatim. No key.
概覽
透過 OpenStreetMap Nominatim 將地名與地址轉成座標或反向轉換、搜尋地點,並計算直線距離。
- 可以做什麼
- 提供四個工具:geocode(把地址、地點或地標轉成依相關度排序的座標)、reverse_geocode(把經緯度轉成地址)、search_places(依描述尋找興趣點),以及 distance_between(計算兩個具名地點之間的大圓距離)。每個工具預設回傳易讀的 markdown,也可要求結構化 JSON;geocode 與 search_places 支援可選的國家篩選。
- 適用情境
- 適合助手需要真實座標或地址而非憑空猜測的情況,例如定位地標、辨識某個經緯度所在的位置、尋找附近地點,或估算兩座城市之間的距離。
- 執行需求
- 以 stdio 在本機執行,通常用 npx 從 npm 套件 geocode-mcp 啟動。需要 Node.js 16+ 與 Python 3.10+(首次啟動時包裝器會建立 Python 環境)。不需要 API 金鑰。應把環境變數 GEOCODE_USER_AGENT 設為帶有聯絡資訊的描述性 User-Agent。需要連線至 OpenStreetMap 的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Geocoding,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Geocoding MCP Server 🗺️
[npm version] [npm downloads] [Python] [License: MIT]
Turn place names and addresses into coordinates (and back) for Claude Desktop and any MCP-compatible client, powered by OpenStreetMap Nominatim. Forward & reverse geocoding, place/POI search, and distance between locations — all from natural language. No API key required.
npm package:
geocode-mcp· GitHub repo:danishashko/geocode-mcp.
🎯 What You Get
- 📍 Geocode — address/place/landmark → latitude & longitude
- 🔄 Reverse geocode — coordinates → human-readable address
- 🔎 Place search — find POIs/places by description
- 📏 Distance — straight-line distance between two named places
Geocoding is something LLMs can't reliably do on their own — this gives Claude real, current coordinates from OpenStreetMap. Every tool returns human-readable markdown by default, or structured JSON on request (response_format: "json"). Lightweight (Python standard library + mcp only), no API key.
🚀 Quick Start
Add this to your Claude Desktop config and restart Claude:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
OpenStreetMap asks every client to send a descriptive User-Agent with contact info. Set GEOCODE_USER_AGENT to your own name/email (a default is provided so it works out of the box). On first launch the npx wrapper creates an isolated Python environment and installs the dependency (one-time, ~a minute). You need Python 3.10+ and Node.js 16+.
Prefer a global install?
🔧 Available Tools
Every tool also accepts response_format ("markdown", the default, or "json"). country_codes is an optional comma-separated ISO 3166-1 alpha-2 filter (e.g. us or us,ca).
💬 Example Prompts
Once the server is connected, just ask Claude:
- "What are the coordinates of the Eiffel Tower?"
- "What's at latitude 40.7484, longitude -73.9857?"
- "Find bookstores in Paris."
- "How far is it from London to Edinburgh in miles?"
- "Geocode '1600 Pennsylvania Avenue' — US only."
🐛 Troubleshooting
"OpenStreetMap is rate-limiting requests" Nominatim's public server allows ~1 request/second. This server self-throttles, but if you still hit it, wait a moment.
"No locations found"
Try a more specific or differently-worded query, or add a country_codes filter to disambiguate.
"Command not found" / "Python not found"
Ensure Python 3.10+ and Node.js 16+ are installed and on your PATH. On macOS/Linux, try python3.
Tools not showing up in Claude
- Confirm the config file is valid JSON (no trailing commas).
- Fully quit and reopen Claude Desktop.
Using a different model or provider (LiteLLM, OpenRouter, NVIDIA NIM, a local model)
This server never talks to a model. Your client starts it as a local process and
speaks JSON-RPC over stdin/stdout, so changing ANTHROPIC_BASE_URL or swapping the
model behind your client has no effect on it. If tools stop firing after a switch
like that, check two things: the model has to support function calling, and a proxy
configured to drop unsupported parameters can silently strip your tool definitions,
which produces no error at all. Run /mcp in your client (or claude mcp list) to
confirm the server is connected before suspecting the server.
🛠️ Manual Installation (Alternative)
If you would rather run the Python file directly instead of via npx:
1. Download the server and install the dependency
(or pip3 on macOS/Linux)
2. Point Claude Desktop at it
On Windows use "command": "python" and a path like "C:\\path\\to\\geocode_mcp.py".
3. Restart Claude Desktop.
🔒 Privacy & Usage Policy
- Uses OpenStreetMap's free Nominatim API — public, no key.
- Requests go straight from your machine to OpenStreetMap. Nothing is stored or proxied.
- Per the Nominatim Usage Policy, the server sends a descriptive
User-Agentand self-throttles to ~1 request/second. Please don't use it for bulk/heavy workloads against the public server. - Data © OpenStreetMap contributors, available under the ODbL.
📝 Notes
distance_betweenreturns straight-line (great-circle) distance, not driving/route distance.- Results are ranked by relevance/importance; use
country_codesto narrow ambiguous names (e.g. "Springfield"). - Reverse geocoding near water or remote areas may return no address.
📋 Changelog
See CHANGELOG.md for the full version history.
📚 Resources
⚖️ Legal Disclaimer
This tool uses the OpenStreetMap Nominatim API but is not affiliated with or endorsed by the OpenStreetMap Foundation. Geocoding data © OpenStreetMap contributors, licensed under the Open Database License. Use is subject to the Nominatim Usage Policy.
👤 Author
Daniel Shashko
- GitHub: @danishashko
- LinkedIn: daniel-shashko
- npm: danielshashko
📄 License
MIT © Daniel Shashko
來源:README.md,提交 8b7d1e5
工具
0版本歷史
1- v1.0.2最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分