OpenCage Geocoding MCP Server

by OpenCageData

19 stars
454 downloads
Not rated
GitHub

About

MCP server for querying the OpenCage geocoding API from within LLMs

Details

Author
OpenCageData
GitHub stars
19
Downloads
454
Categories
Media, API

- Forward geocoding: address/place name to coordinates
- Reverse geocoding: coordinates to address
- API usage and rate‑limit monitoring
- Language, bounding‑box, and country filters
- Max results control (1–100, default 10)

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name OpenCage Geocoding MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install Node.js 20+, obtain an OpenCage API key, clone the repository, run npm install, set the OPENCAGE_API_KEY environment variable, and build with npm run build. Add the server configuration to your Claude Desktop config file (claude_desktop_config.json) with the node command pointing to the built index.js and the API key in the env field.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "opencage geocoding mcp server": {
            "opencage-geocoding": {
                "command": "node",
                "args": [
                    "/ABSOLUTE/PATH/TO/opencage-geocoding-mcp/build/index.js"
                ],
                "env": {
                    "OPENCAGE_API_KEY": "your_opencage_geocoding_api_key_here"
                }
            }
        }
    }
}

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"
        }
    }
}

OpenCage Geocoding MCP Server

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.

Features

- Forward Geocoding: Convert addresses or place names to coordinates (latitude/longitude)
- Reverse Geocoding: Convert coordinates to addresses
- API Status Monitoring: Check your API usage and rate limits (assuming your penCage account has hard limits).

Prerequisites

1. Node.js (version 20 or higher)
2. OpenCage geocoding API Key: Sign up on the OpenCage website to get a free-trial geocoding API key

Installation

0. 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.

1. Clone the repository. Change into the repository directory

```bash

git clone git@github.com:OpenCageData/opencage-geocoding-mcp.git

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.