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

NameTypeRequiredDescription
_apiKeystringyesGeoNames username
latnumberyesLatitude (e.g., 48.8566)
lngnumberyesLongitude (e.g., 2.3522)
radiusnumbernoSearch 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

FieldTypeDescription
latitudenumberQuery latitude coordinate
longitudenumberQuery longitude coordinate
radius_kmnumberSearch radius in kilometers
countnumberNumber of nearby places found
nearbyarray
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.

Regenerated from source · build May 9, 2026