Skip to content
MCP server

Opencage Geocoding MCP

Geocoding tools for AI assistants: convert addresses to coordinates and back via OpenCage

Runs locallyStatus and history
Install
Pricing
Open source
Platforms
CLI, API, macOS
Runs
Locally
Version
1.0.3
Listing updated
today

Similar MCP servers

About Opencage Geocoding MCP

Opencage Geocoding MCP is an open-source MCP server for maps and travel. It runs locally on your machine and is started by your AI client.

The README says this server connects an AI client to the OpenCage geocoding API, so a model can turn place names into latitude and longitude and turn coordinates into readable addresses. Forward and reverse lookups return location details such as timezone and currency when the query is specific enough.

A third tool reports API usage and rate limits for the account tied to the key. The package is distributed through npm and runs over stdio, and it needs an OpenCage API key set in the environment. The README points out that it suits small, ad hoc lookups; for large batches it recommends OpenCage's command-line tools or having the model write a script against the API.

It is aimed at people who already use an MCP-capable client such as Claude Desktop and want geographic lookups inside a conversation.

Install

Run in a terminal

claude mcp add opencage-geocoding-mcp --env YOUR_API_KEY='<YOUR_API_KEY>' -- npx -y @opencage/mcp-opencage-server

Add to claude_desktop_config.json

{
  "mcpServers": {
    "opencage-geocoding-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@opencage/mcp-opencage-server"
      ],
      "env": {
        "YOUR_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "opencage-geocoding-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@opencage/mcp-opencage-server"
      ],
      "env": {
        "YOUR_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}

Add to .vscode/mcp.json

{
  "servers": {
    "opencage-geocoding-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@opencage/mcp-opencage-server"
      ],
      "env": {
        "YOUR_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "opencage-geocoding-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@opencage/mcp-opencage-server"
      ],
      "env": {
        "YOUR_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "opencage-geocoding-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@opencage/mcp-opencage-server"
      ],
      "env": {
        "YOUR_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}

Using several servers? Build one config file with the MCP config generator.

Configuration

  • YOUR_API_KEYYour API key for the serviceRequired

Tools this server provides (3)

Taken from the project documentation; the running server may differ.

geocode-forward
Convert an address or place name to coordinates and information about that location.
geocode-reverse
Convert coordinates to an address and information about that location.
get-opencage-info
Check current API usage and rate limits.

What it does

Forward geocoding
Converts an address or place name into coordinates, with optional country, bounds, language and result limit filters.
Reverse geocoding
Converts latitude and longitude into a formatted address and location annotations.
API usage check
A tool that reports remaining requests and rate limit information for the account.
Geocoding assistant prompt
Includes a prompt template that offers guidance on using the geocoding tools.

Good for

  • Look up coordinates for a place name while drafting a conversation or report
  • Identify which region or province a set of coordinates falls in
  • Check remaining OpenCage API quota before running a batch of lookups

Pricing

Open source

Server is open source; the OpenCage API itself requires an account and key.

Opencage Geocoding MCP FAQ

What API key is needed?

An OpenCage geocoding API key, set as OPENCAGE_API_KEY. The README says a free-trial key is available from the OpenCage website.

Is it suited to large data sets?

The README says it is meant for small amounts of geocoding. For CSV files or database-scale work it recommends OpenCage's command-line tools or a script that calls the API directly.

What does the server require to run?

Node.js version 20 or higher, plus npm install and a build step when run from source.

Is Opencage Geocoding MCP free?

Yes. Opencage Geocoding MCP is open source, so you can use and self-host it for free.

How do I add Opencage Geocoding MCP to Claude Code?

Run this command in your terminal: claude mcp add opencage-geocoding-mcp --env YOUR_API_KEY='<YOUR_API_KEY>' -- npx -y @opencage/mcp-opencage-server

What are the best alternatives to Opencage Geocoding MCP?

The closest alternatives to Opencage Geocoding MCP are Opencages, Geoapify MCP by usefulapi, MapTiler MCP by usefulapi, Geohash and Census Geocoder.

Where this comes from

  • Description: written from the project's README and its MCP Registry entry.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers