geocode
Pack: opencages · Endpoint: https://gateway.pipeworx.io/opencages/mcp
Forward-geocode an address or place name to latitude/longitude using OpenCage (requires API key); supports country-code filtering, bounding box, and language; returns coordinates and structured address components.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
query | string | yes | |
language | string | no | |
limit | number | no | |
countrycode | string | no | Comma-sep ISO-3166-1 alpha-2 codes. |
bounds | string | no | sw_lon,sw_lat,ne_lon,ne_lat |
no_annotations | boolean | no | |
abbrv | boolean | no |
Example call
Arguments
{
"query": "Paris, France"
}
curl
curl -X POST https://gateway.pipeworx.io/opencages/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"geocode","arguments":{"query":"Paris, France"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('geocode', {
"query": "Paris, France"
});
More examples
{
"query": "1600 Pennsylvania Avenue",
"countrycode": "US",
"limit": 5
}
Response shape
| Field | Type | Description |
|---|---|---|
results | array | Array of geocoding results |
status | object | API response status |
total_results | integer | Total number of results found |
rate | object | Rate limit information |
Full JSON Schema
{
"type": "object",
"description": "Response from OpenCage forward geocoding API",
"properties": {
"results": {
"type": "array",
"description": "Array of geocoding results",
"items": {
"type": "object",
"properties": {
"geometry": {
"type": "object",
"description": "Geographic coordinates",
"properties": {
"lat": {
"type": "number",
"description": "Latitude"
},
"lng": {
"type": "number",
"description": "Longitude"
}
}
},
"formatted": {
"type": "string",
"description": "Formatted address string"
},
"components": {
"type": "object",
"description": "Address components breakdown"
},
"annotations": {
"type": "object",
"description": "Additional annotations (if no_annotations not set)"
},
"confidence": {
"type": "integer",
"description": "Confidence score 0-10"
},
"bounds": {
"type": "object",
"description": "Bounding box coordinates"
}
}
}
},
"status": {
"type": "object",
"description": "API response status",
"properties": {
"code": {
"type": "integer",
"description": "HTTP status code"
},
"message": {
"type": "string",
"description": "Status message"
}
}
},
"total_results": {
"type": "integer",
"description": "Total number of results found"
},
"rate": {
"type": "object",
"description": "Rate limit information",
"properties": {
"limit": {
"type": "integer",
"description": "Request limit"
},
"remaining": {
"type": "integer",
"description": "Remaining requests"
},
"reset": {
"type": "integer",
"description": "Reset timestamp"
}
}
}
}
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"opencages": {
"url": "https://gateway.pipeworx.io/opencages/mcp"
}
}
}
See Getting Started for client-specific install steps.