MCP server for OpenCage geocoding API
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"io-github-opencagedata-opencage-geocoding-mcp": {
"command": "<see-readme>",
"args": []
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
An MCP (Model Context Protocol) server that provides geocoding capabilities using the OpenCage geocoding API. This server allows you to convert between addresses and geographic coordinates.
No automated test available for this server. Check the GitHub README for setup instructions.
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
Click any tool to inspect its schema.
geocoding-assistantA helpful assistant for geocoding tasks. Provides guidance on using the geocoding tools effectively
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in maps
A Model Context Protocol (MCP) server providing TomTom's location services, search, routing, and traffic data to AI agents.
Real-time BART departures, trip planning, fares, stations, and advisories.
MCP server for the VesselAPI — maritime vessel tracking, port events, emissions, and navigation data
Fair meeting point discovery for AI agents with isochrone-based travel time fairness
MCP Security Weekly
Get CVE alerts and security updates for io.github.OpenCageData/opencage-geocoding-mcp and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
An MCP (Model Context Protocol) server that provides geocoding capabilities using the OpenCage geocoding API. This server allows you to convert between addresses and geographic coordinates.
PLEASE NOTE: the examples shown here are based on an integration with claude.ai's desktop client. MCP as a concept is supported by other services, but may require a slightly different configuration.
Is MCP the right tool?
This MCP is the right tool for small amounts of geocoding, for example while manually prompting an LLM.
If however, you want to process larger volumes of data, for example CSV files full of address or coordinates, or connecting to database full of data, it is almost certainly both faster and more affordable to use our command line tools, or have the LLM write a script to call our API directly.
We offer a markdown-formatted opencage-geocoding-api SKILL file to train your AI on best practices for working with our geocoding API.
Clone the repository. Change into the repository directory
git clone git@github.com:OpenCageData/opencage-geocoding-mcp.git
# or
git clone https://github.com/OpenCageData/opencage-geocoding-mcp.git
cd opencage-geocoding-mcp
npm install
This is enough to get the MCP working with Claude Desktop (see below)
If you want to develop the MCP and plan to query the MCP from the command line you will also need to:
export OPENCAGE_API_KEY="your_opencage_geocoding_api_key_here"
npm run build
Add this configuration to your Claude Desktop config file
On a Mac the config file should be (~/Library/Application Support/Claude/claude_desktop_config.json), but you can also navigate to the file via the menu: Settings > Developer > Edit Config
{
"mcpServers": {
"opencage-geocoding": {
"command": "node",
"args": ["/ABSOLUTE/PATH/TO/opencage-geocoding-mcp/build/index.js"],
"env": {
"OPENCAGE_API_KEY": "your_opencage_geocoding_api_key_here"
}
}
}
}
Note: the first time you run a command you will need to give Claude permission

Convert an address or place name to coordinates and information about that location.
Parameters:
query (required): The address or place name to geocodecountrycode (optional): Restrict to country (ISO 3166-1 alpha-2 code)bounds (optional): Bounding box (min_lon,min_lat,max_lon,max_lat)language (optional): Language for results (e.g., 'en', 'de', 'fr')limit (optional): Max results (1-100, default 10)no_annotations (optional): Exclude location annotationsExample prompts
Prompt: "What are the coordinates of Trafalgar Square, London?"
Result: coordinates, timezone, local currency, etc
Prompt: "Where is Les Vans, France? Which Department is it in?"
Result: coordinates, and correct answer that Les Vans is in the Ardèche department
Prompt: "In welchem Bundesland liegt Weimar?"
Result: coordinates, and correct answer that Weimar is in Thüringen
`
... [View full README on GitHub](https://github.com/OpenCageData/opencage-geocoding-mcp#readme)