MCP.so
Sign In
Servers

OpenCage Geocoding MCP Server

@OpenCageData

MCP server for querying the OpenCage geocoding API from within LLMs

Overview

What is OpenCage Geocoding MCP Server?

An MCP (Model Context Protocol) server that provides geocoding capabilities using the OpenCage geocoding API, allowing conversion between addresses and geographic coordinates. It is intended for small‑volume geocoding during manual LLM prompting.

How to use OpenCage Geocoding MCP Server?

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.

Key features of OpenCage Geocoding MCP Server

  • 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)

Use cases of OpenCage Geocoding MCP Server

  • Look up coordinates for a place name (e.g., “Trafalgar Square”)
  • Find an address from latitude/longitude coordinates
  • Ask about a location’s administrative division or time zone
  • Check current API call allowance and rate limits
  • Geocode a few addresses while conversing with an LLM

FAQ from OpenCage Geocoding MCP Server

What are the prerequisites?

You need Node.js 20 or higher and a free‑trial OpenCage geocoding API key from opencagedata.com.

How do I install and configure it?

Clone the repo, run npm install, set the OPENCAGE_API_KEY environment variable, then build with npm run build. Add the server configuration in Claude Desktop’s claude_desktop_config.json as shown in the README.

What tools does the server provide?

Three tools: geocode‑forward (address to coordinates), geocode‑reverse (coordinates to address), and get‑opencage‑info (API usage and rate limits).

Is this server suitable for bulk geocoding?

No. For processing larger volumes (CSV files or database records), the README recommends using OpenCage’s command‑line tools or calling the API directly from a script.

How are errors handled?

Errors are reported for invalid API keys, rate limits, network failures, invalid coordinates, and API unavailability. Troubleshooting tips include verifying the API key, checking usage with get‑opencage‑info, and ensuring internet connectivity.

Tags

More from Media & Design