Opencage
OpenCage Geocoder provides a simple API for forward and reverse geocoding using open data sources.
Verdict
Common use cases
- Validate customer shipping addresses during checkout
- Map support ticket locations on a dashboard
- Enrich CRM records with lat/lng coordinates
- Reverse geocode GPS logs into readable addresses
- Convert store addresses to map markers
Integration
- Vendor
- Opencage
- Category
- developer-tools
- Auth
- API_KEY
- Tools
- 5
- Composio slug
opencage
Tools
- Forward Geocode Address
Tool to convert a human-readable address into geographic coordinates. use when you need to retrieve latitude and longitude from an address.
- Geocode to GeoJSON
Tool to geocode and return geojson. use when you need geojson featurecollection.
- Geocode with JSONP
Tool to perform geocoding and return results in geojsonp format. use when you need a javascript callback wrapped response.
- Geocode XML
Tool to perform geocoding and return results in xml format. use when you need xml-formatted geocoding responses from opencage.
- Reverse Geocode Coordinates
Tool to convert coordinates to a human-readable address. use when you have latitude and longitude and need a readable location.
Setup
Setup guide
- 11. In Switchy, open your workspace settings and navigate to the Integrations page. 2. Find Opencage in the MCP directory and click Connect. 3. You'll be prompted to paste your Opencage API key — get this from opencagedata.com/users/sign_up (free accounts available). 4. Grant the key read access to geocoding endpoints when you create it in the Opencage dashboard. 5. Paste the key into Switchy and click Authorize. 6. Open any Space and type '@Opencage forward geocode 1600 Amphitheatre Parkway, Mountain View' to test the connection. 7. If it returns coordinates, you're connected. 8. To invoke a tool, @mention Opencage in any message and describe the geocoding task — the AI will route your request to the right tool and return structured location data inline.
What teammates see: by default, memories from Opencage are scoped to the Space (PROJECT visibility) - you can mark any memory PRIVATE or share it ORG-wide.
Works well with
Top models
Compatibility data appears once enough Spaces have used this MCP together with a given model.
How Switchy teams use it
Starter prompts
Geocode Customer Address
@Opencage forward geocode the address '742 Evergreen Terrace, Springfield' and return the coordinatesOpen in a Space →
Reverse Lookup Coordinates
@Opencage reverse geocode the coordinates 37.7749, -122.4194 and tell me what address that corresponds toOpen in a Space →
Batch Geocode Addresses
@Opencage forward geocode these three addresses: '10 Downing Street, London', '1600 Pennsylvania Ave, Washington DC', 'Champs-Élysées, Paris' and return all coordinatesOpen in a Space →
Export GeoJSON for Mapping
@Opencage geocode '350 Fifth Avenue, New York' and return the result as a GeoJSON FeatureCollectionOpen in a Space →
Validate Delivery Zone
@Opencage forward geocode '123 Main St, Austin, TX' and tell me if the coordinates fall within a 10-mile radius of 30.2672, -97.7431Open in a Space →
Example outputs
Illustrative - representative of the model's voice and quality, not literal recordings.
@opencage what are the coordinates for 1600 Pennsylvania Avenue NW, Washington, DC?
Based on OpenCage's geocoding service, 1600 Pennsylvania Avenue NW resolves to approximately 38.8977° N, -77.0365° W. This location is identified as The White House in Washington, District of Columbia, United States. The confidence score for this match is 10/10, indicating high precision. The bounding box spans roughly 50 meters, covering the building's footprint. Additional metadata includes the postal code (20500) and the fact that this is a government building landmark.
This example shows forward geocoding — converting addresses to coordinates. OpenCage requires an API key with sufficient quota; free tiers typically allow 2,500 requests/day. The service returns confidence scores and bounding boxes, which help assess match quality. Results vary by address ambiguity and regional coverage.
@opencage reverse geocode 51.5074, -0.1278 and tell me what's there
The coordinates 51.5074° N, 0.1278° W point to Westminster, London, United Kingdom. OpenCage identifies this as the City of Westminster borough, specifically near the Thames riverfront. The formatted address returned is 'Westminster, London SW1A, UK.' Nearby components include the postcode district SW1A, which covers the Houses of Parliament and government buildings. The result includes timezone (Europe/London), currency (GBP), and driving-side metadata (left) for context.
This demonstrates reverse geocoding — coordinates to human-readable addresses. Precision depends on OpenCage's dataset density; urban areas return detailed components, while remote locations may only resolve to region names. The MCP returns structured address parts (city, postcode, country) alongside the formatted string, useful for parsing.
@opencage convert these three office addresses to GeoJSON so I can map them: 123 Main St Boston MA, 456 Oak Ave Austin TX, 789 Pine Rd Seattle WA
OpenCage has geocoded all three addresses and returned a GeoJSON FeatureCollection. Each address becomes a Point feature with coordinates: Boston resolves to [42.3656, -71.0589], Austin to [30.2747, -97.7403], and Seattle to [47.6205, -122.3493]. The FeatureCollection includes properties for each location's formatted address, confidence score, and address components. This GeoJSON can be directly imported into mapping libraries like Mapbox or Leaflet, or used with GIS tools for spatial analysis and visualization.
This showcases batch geocoding with structured GeoJSON output, ideal for mapping workflows. OpenCage processes each address independently; if one fails, others still return. Be mindful of rate limits when geocoding large batches — the free tier caps at 1 request/second. GeoJSON output is standards-compliant, making integration with spatial tools straightforward.
Use-case deep-dives
When Opencage beats manual address entry for support teams
A 6-person support team handling 200+ tickets a week needs to tag customer locations for regional escalation. Opencage's forward geocode tool turns messy address strings from forms into clean lat/long pairs that feed your CRM's map view. The reverse geocode tool does the opposite when customers submit GPS coordinates from mobile apps. This works best when your ticket volume justifies the API cost and you need consistent location data across channels. If you're only tagging 20 tickets a month, manual entry is cheaper. If you're routing field technicians or tracking regional issue clusters, Opencage pays for itself by eliminating address normalization busywork.
Opencage handles the geocoding layer for location-based products
A 3-engineer team building a store locator or delivery radius feature needs to convert user addresses into coordinates for distance calculations. Opencage's forward geocode tool does this without standing up your own geocoding infrastructure. The GeoJSON output option feeds directly into mapping libraries like Mapbox or Leaflet. This is the right call when you're prototyping or running a product with under 10k geocoding requests per day. Above that threshold, you'll hit rate limits or cost ceilings and should evaluate self-hosted alternatives like Nominatim. For early-stage products or internal tools where geocoding is a feature, not the core business, Opencage removes a month of setup work.
When reverse geocoding simplifies multi-site event logistics
A 4-person events team managing conferences across 12 cities uses Opencage's reverse geocode tool to turn venue GPS pins into readable addresses for attendee emails and printed materials. The XML output option integrates with their legacy event management system that doesn't parse JSON. This scenario works when you're juggling 30+ venue options per quarter and need to generate location details fast. If you're running one annual event, manual lookup is fine. If you're coordinating speakers, vendors, and attendees across time zones and need consistent address formatting in multiple systems, Opencage's reverse geocode becomes the single source of truth that prevents the 'wrong venue address in the calendar invite' disaster.
Frequently asked
What does the Opencage MCP do in Switchy?
It lets your team convert addresses into coordinates (forward geocoding) and coordinates into addresses (reverse geocoding) directly in Switchy conversations. You can ask for results in JSON, GeoJSON, JSONP, or XML depending on what your workflow needs. Useful when building location features, validating addresses, or enriching datasets with geographic data without leaving the workspace.
Do I need an Opencage account to use this MCP?
Yes. You need an Opencage API key, which you get by signing up at opencagedata.com. Opencage offers a free tier with 2,500 requests per day. Paste your API key into Switchy's connection settings and the MCP handles authentication for all team members who use it. No OAuth flow—just the key.
Can the Opencage MCP batch-geocode a list of addresses?
No. Each tool call geocodes one address or coordinate pair at a time. If you need to geocode hundreds of addresses, you're better off using Opencage's API directly with a script or their bulk upload service. The MCP is designed for ad-hoc lookups during conversations, not batch processing jobs.
Why use this MCP instead of calling Opencage's API myself?
The MCP removes the need to write code or leave Switchy. Your team can geocode addresses in natural language—no curl commands, no parsing JSON responses. It's faster for one-off questions like 'What are the coordinates for 123 Main Street?' If you're building an app that geocodes at scale, use the API directly.
Who on my team should connect the Opencage MCP?
Anyone who needs to look up coordinates or validate addresses. Typically product managers scoping location features, engineers debugging map integrations, or ops teams verifying delivery zones. The API key is shared across your workspace, so one person connects it and everyone benefits. Usage counts against your Opencage plan, not Switchy's.