Search GeoNames places, walk admin hierarchies, reverse geocode, get postal codes and country info via MCP. STDIO or Streamable HTTP.
Setup
Choose your client, copy the config, then fill in any required environment variables.
Local
claude mcp add geonames --env GEONAMES_USERNAME='<GEONAMES_USERNAME>' -- npx -y @cyanheads/geonames-mcp-server~/.codex/config.toml
[mcp_servers.geonames]
command = "npx"
args = ["-y", "@cyanheads/geonames-mcp-server"]
env = { GEONAMES_USERNAME = "<GEONAMES_USERNAME>" }
# codex mcp add geonames --env GEONAMES_USERNAME='<GEONAMES_USERNAME>' -- npx -y @cyanheads/geonames-mcp-server~/.cursor/mcp.json
{
"mcpServers": {
"geonames": {
"command": "npx",
"args": [
"-y",
"@cyanheads/geonames-mcp-server"
],
"env": {
"GEONAMES_USERNAME": "<GEONAMES_USERNAME>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"geonames": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@cyanheads/geonames-mcp-server"
],
"env": {
"GEONAMES_USERNAME": "<GEONAMES_USERNAME>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"geonames": {
"command": "npx",
"args": [
"-y",
"@cyanheads/geonames-mcp-server"
],
"env": {
"GEONAMES_USERNAME": "<GEONAMES_USERNAME>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"geonames": {
"command": "npx",
"args": [
"-y",
"@cyanheads/geonames-mcp-server"
],
"env": {
"GEONAMES_USERNAME": "<GEONAMES_USERNAME>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"geonames": {
"command": "npx",
"args": [
"-y",
"@cyanheads/geonames-mcp-server"
],
"env": {
"GEONAMES_USERNAME": "<GEONAMES_USERNAME>"
}
}
}
}Remote
claude mcp add --transport http geonames https://geonames.caseyjhand.com/mcp~/.codex/config.toml
[mcp_servers.geonames]
url = "https://geonames.caseyjhand.com/mcp"
# codex mcp add geonames --url https://geonames.caseyjhand.com/mcp~/.cursor/mcp.json
{
"mcpServers": {
"geonames": {
"url": "https://geonames.caseyjhand.com/mcp"
}
}
}.vscode/mcp.json
{
"servers": {
"geonames": {
"type": "http",
"url": "https://geonames.caseyjhand.com/mcp"
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"geonames": {
"httpUrl": "https://geonames.caseyjhand.com/mcp"
}
}
}claude_desktop_config.json · Customize › Connectors › Add custom connector
{
"mcpServers": {
"geonames": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://geonames.caseyjhand.com/mcp"
]
}
}
}.trae/mcp.json
{
"mcpServers": {
"geonames": {
"url": "https://geonames.caseyjhand.com/mcp"
}
}
}Environment variables
GEONAMES_USERNAME
Replace the placeholders with your own credentials and keep them out of version control.