geocode-mcp
Provides geocoding and reverse geocoding using OpenStreetMap's Nominatim API, allowing AI agents to convert addresses to coordinates, coordinates to addresses, search for places, and calculate distances between locations.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@geocode-mcpWhat are the coordinates of the Eiffel Tower?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Geocoding MCP Server πΊοΈ
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.
Related MCP server: Geo MCP Worker
π Quick Start
Add this to your Claude Desktop config and restart Claude:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%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 |
| Ranked coordinate matches for an address/place/landmark |
|
| The address at a given latitude/longitude |
|
| Places/POIs matching a description, with coordinates |
|
| Straight-line distance between two named places |
|
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.
π οΈ 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-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
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityCmaintenanceAn MCP server providing geocoding and place discovery services via Nominatim and OpenStreetMap. It enables users to perform forward and reverse geocoding, extract bounding boxes, and find nearby places or administrative hierarchies.Last updated10Apache 2.0
- Alicense-qualityBmaintenanceFree geospatial MCP server for AI agents, providing geocoding, reverse geocoding, POI search, and route planning using OpenStreetMap data via Nominatim, Overpass, and OSRM.Last updated1GPL 3.0
- AlicenseAqualityCmaintenanceMCP server for geocoding and place discovery using OpenStreetMap data via Nominatim. Supports forward/reverse geocoding, bounding boxes, nearby places, batch geocoding, route waypoints, and administrative boundaries.Last updated10Apache 2.0
- Alicense-qualityDmaintenanceAn MCP server for forward geocoding via the Nominatim API (OpenStreetMap) with no API key required.Last updated8MIT
Related MCP Connectors
Nominatim MCP β wraps OpenStreetMap Nominatim geocoding API (free, no auth)
Geospatial MCP server for earthquake, tsunami, volcano, disaster, and FX data queries.
Geo-based flight search MCP server. Find more flights between any two places on earth
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/danishashko/geocode-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server