get_nearby
Pack: geonames · Endpoint: https://gateway.pipeworx.io/geonames/mcp
Find places near a given latitude/longitude. Returns nearby cities, landmarks, and features sorted by distance. Example: get_nearby(48.8566, 2.3522) for places near Paris.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
_apiKey | string | yes | GeoNames username |
lat | number | yes | Latitude (e.g., 48.8566) |
lng | number | yes | Longitude (e.g., 2.3522) |
radius | number | no | Search radius in km (default: 10, max: 300) |
Example call
Arguments
{
"_apiKey": "your-geonames-api-key",
"lat": 48.8566,
"lng": 2.3522
}
curl
curl -X POST https://gateway.pipeworx.io/geonames/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_nearby","arguments":{"_apiKey":"your-geonames-api-key","lat":48.8566,"lng":2.3522}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('get_nearby', {
"_apiKey": "your-geonames-api-key",
"lat": 48.8566,
"lng": 2.3522
});
More examples
{
"_apiKey": "your-geonames-api-key",
"lat": 40.7128,
"lng": -74.006,
"radius": 50
}
Response shape
Always returns: latitude, longitude, radius_km, count, nearby
| Field | Type | Description |
|---|---|---|
latitude | number | Query latitude coordinate |
longitude | number | Query longitude coordinate |
radius_km | number | Search radius in kilometers |
count | number | Number of nearby places found |
nearby | array |
Full JSON Schema
{
"type": "object",
"properties": {
"latitude": {
"type": "number",
"description": "Query latitude coordinate"
},
"longitude": {
"type": "number",
"description": "Query longitude coordinate"
},
"radius_km": {
"type": "number",
"description": "Search radius in kilometers"
},
"count": {
"type": "number",
"description": "Number of nearby places found"
},
"nearby": {
"type": "array",
"items": {
"type": "object",
"properties": {
"geoname_id": {
"type": [
"number",
"null"
],
"description": "Unique GeoNames identifier"
},
"name": {
"type": [
"string",
"null"
],
"description": "Place name"
},
"toponym_name": {
"type": [
"string",
"null"
],
"description": "Toponym name variant"
},
"country_code": {
"type": [
"string",
"null"
],
"description": "ISO country code"
},
"country_name": {
"type": [
"string",
"null"
],
"description": "Full country name"
},
"admin_region": {
"type": [
"string",
"null"
],
"description": "Administrative region/state name"
},
"admin_code": {
"type": [
"string",
"null"
],
"description": "Administrative region code"
},
"latitude": {
"type": [
"number",
"null"
],
"description": "Latitude coordinate"
},
"longitude": {
"type": [
"number",
"null"
],
"description": "Longitude coordinate"
},
"population": {
"type": [
"number",
"null"
],
"description": "Population figure"
},
"feature_class": {
"type": [
"string",
"null"
],
"description": "Feature classification"
},
"feature_code": {
"type": [
"string",
"null"
],
"description": "Feature code/type"
},
"distance_km": {
"type": [
"number"
],
"description": "Distance in kilometers from query point"
}
}
}
}
},
"required": [
"latitude",
"longitude",
"radius_km",
"count",
"nearby"
]
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"geonames": {
"url": "https://gateway.pipeworx.io/geonames/mcp"
}
}
}
See Getting Started for client-specific install steps.