Search GeoNames places, walk admin hierarchies, reverse geocode, get postal codes and country info via MCP. STDIO or Streamable HTTP.
接入配置
选择客户端,复制配置,再按项目文档补齐环境变量。
本地运行
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>"
}
}
}
}远程托管
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"
}
}
}需要的环境变量
GEONAMES_USERNAME
把占位值换成你自己的密钥;不要把密钥提交到代码仓库。