Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 48,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Forward and reverse geocoding, place search, and distance via OpenStreetMap Nominatim. No key.

README.md

Geocoding MCP Server 🗺️

![npm version](https://www.npmjs.com/package/geocode-mcp) ![npm downloads](https://www.npmjs.com/package/geocode-mcp) ![Python](https://www.python.org/downloads/) ![License: MIT](https://opensource.org/licenses/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
{
  "mcpServers": {
    "geocode": {
      "command": "npx",
      "args": ["-y", "geocode-mcp"],
      "env": {
        "GEOCODE_USER_AGENT": "your-app-name your@email.com"
      }
    }
  }
}

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?

npm install -g geocode-mcp
{
  "mcpServers": {
    "geocode": {
      "command": "geocode-mcp",
      "env": { "GEOCODE_USER_AGENT": "your-app-name your@email.com" }
    }
  }
}

🔧 Available Tools

| Tool | What it returns | Parameters | |------|-----------------|------------| | geocode | Ranked coordinate matches for an address/place/landmark | query, limit, country_codes | | reverse_geocode | The address at a given latitude/longitude | latitude, longitude | | search_places | Places/POIs matching a description, with coordinates | query, limit, country_codes | | distance_between | Straight-line distance between two named places | origin, destination, unit |

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

  1. Confirm the config file is valid JSON (no trailing commas).
  2. Fully quit and reopen Claude Desktop.

🛠️ Manual Installation (Alternative)

If you would rather run the Python file directly instead of via npx:

1. Download the server and install the dependency

pip install mcp

(or pip3 on macOS/Linux)

2. Point Claude Desktop at it

{
  "mcpServers": {
    "geocode": {
      "command": "python3",
      "args": ["/absolute/path/to/geocode_mcp.py"],
      "env": { "GEOCODE_USER_AGENT": "your-app-name your@email.com" }
    }
  }
}

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-Agent and 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_between returns straight-line (great-circle) distance, not driving/route distance.
  • Results are ranked by relevance/importance; use country_codes to 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

📄 License

MIT © Daniel Shashko

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Search servers.