Three official packages ship with Geomelon: a zero-dependency TypeScript client, an MCP server that exposes the API as AI tools, and an n8n community node for visual workflow automation.


TypeScript Client

Package: geomelon
Source: github.com/930m310n/typescript

A typed, zero-dependency client for the Geomelon RapidAPI gateway. Works in Node.js 18+ and any environment with native fetch.

Install

npm install geomelon

Usage

import { GeomelonClient } from "geomelon";

const client = new GeomelonClient({ apiKey: "YOUR_RAPIDAPI_KEY" });

// Search cities with localized names
const cities = await client.cities.search({
  name: "Paris",
  preferredLanguages: "fr,en",
  limit: 10,
});

// Filter countries by name prefix
const countries = await client.countries.list({
  name: "Fra",
  preferredLanguages: "fr",
});

// Nearest cities to a point
const nearby = await client.cities.byCoordinatesClosest({
  lat: 48.8566,
  lon: 2.3522,
  preferredLanguages: "fr,en",
});

Sub-clients

Client Methods
client.cities search, get, translations, settlementTypes, distance, byCoordinatesClosest, byCoordinatesLargest
client.countries list, get, translations, regions
client.regions list, get, translations
client.languages list, get

Dual module build

The package ships both CommonJS and ESM builds. Use whichever your bundler or runtime prefers — the exports field in package.json handles resolution automatically.


MCP Server

Package: geomelon-mcp

An MCP (Model Context Protocol) server that exposes Geomelon as a set of tools for AI assistants and agents. Supports both stdio and remote HTTP transports.

Install

npm install -g geomelon-mcp

Or run directly:

npx geomelon-mcp --apiKey YOUR_RAPIDAPI_KEY

Available tools

Tool Description
search_cities Search cities by name, country, population range
get_city Full details for a city UUID
get_city_translations All name translations for a city
get_city_settlement_types Settlement-type classifications for a city
cities_by_coordinates_closest Cities nearest to coordinates
cities_by_coordinates_largest Most populous cities near coordinates
cities_distance Distance in km between two cities
list_countries List countries, filter by name or telephone code
get_country Full country details including regions
get_country_translations Name translations for a country
get_country_regions All regions belonging to a country
list_regions Regions, filtered by country
get_region Full region details
get_region_translations Name translations for a region
list_languages Languages in the database
get_language Single language by UUID

Compound tools

These tools chain multiple API calls to save round-trips when an AI agent needs combined data.

Tool Description
find_cities_near_city Given a city UUID, find nearby cities by distance or population
city_context Fetch a city with its full country and region details in one call
country_overview Fetch a country (by UUID or name), its regions, and top cities
compare_cities Fetch two cities and the distance between them in one call
search_cities_in_country Search cities using a country name instead of an ISO code

Claude Desktop config

{
  "mcpServers": {
    "geomelon": {
      "command": "npx",
      "args": ["geomelon-mcp", "--apiKey", "YOUR_RAPIDAPI_KEY"]
    }
  }
}

n8n Community Node

Package: n8n-nodes-geomelon
Source: github.com/930m310n/n8n-nodes-geomelon

An n8n community node for using Geomelon inside visual workflows. Search cities, look up countries and regions, compute distances, and resolve coordinates — all as drag-and-drop steps.

Install

In your n8n instance: Settings → Community Nodes → Install → enter n8n-nodes-geomelon.

Requires n8n v1.0+ and Node.js 18+.

Available operations

Resource Operations
City Search, Get, Get Translations, Get Settlement Types, Distance, By Coordinates (Closest), By Coordinates (Largest)
Country List, Get, Get Translations, Get Regions
Region List, Get, Get Translations
Language List, Get

Example workflow

Connect a Geomelon node set to Country → List (name = Germany) into a second node set to Country → Get Regions, then into a third set to City → Search (sort = population_desc). Each node fans out one item per result, so downstream nodes iterate naturally.