GnistAI GnistAI
Log in

GeoNames

Geographical database — place names, coordinates, populations, and administrative divisions.

Overview   |   MCP Docs   |   API Docs   |   OpenAPI   |   Playground   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 7 tools tools 7 7 Geography

Data source: GeoNames.org

MCP MCP Protocol

Endpoint https://context.gnist.ai/mcp/geonames/
claude_desktop_config.json
{
  "mcpServers": {
    "gnist-geonames": {
      "url": "https://context.gnist.ai/mcp/geonames/",
      "headers": {
        "Gnist-API-Key": "YOUR_API_KEY"
      }
    }
  }
}
Shell
curl -X POST "https://context.gnist.ai/mcp/geonames/" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "search_cities", "arguments": {"query": "example"}}}'

API REST API

API Root https://context.gnist.ai/rest/geonames/

7 endpoints available:

Shell
curl "https://context.gnist.ai/rest/geonames/search_cities?query=example" \
  -H "Gnist-API-Key: YOUR_API_KEY"
Python
import httpx

resp = httpx.get(
    "https://context.gnist.ai/rest/geonames/search_cities",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    params={
        "query": "example"
},
)
print(resp.json())

OpenAPI Spec  ·  Full API Docs

CLI Command Line

Command gc geonames

CLI documentation will be available when the GnistAI SDK is published.

Install
pip install gnistai

Available Tools (7)

search_cities
Search for cities by name.
ParameterTypeRequiredDescription
querystringrequired
country_codeanyoptional
limitintegeroptional (default: 10)
get_city
Get a city by its GeoNames ID.
ParameterTypeRequiredDescription
geonameidintegerrequired
get_countries
List all countries.
get_country
Get a country by its ISO-3166 code.
ParameterTypeRequiredDescription
iso_codestringrequired
search_timezones
Search for timezones by ID or filter by country.
ParameterTypeRequiredDescription
queryanyoptional
country_codeanyoptional
limitintegeroptional (default: 10)
get_timezone
Get a timezone by its IANA timezone ID.
ParameterTypeRequiredDescription
timezone_idstringrequired
report_feedback
Report a bug, feature request, or general feedback for this data source.
ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: "general")

Related