Earth-2 Elevation MCP

Local stdio MCP server for Open-Elevation single, batch, and profile lookups.

OtherJavaScriptv0.1.1

Earth-2 Elevation MCP

本地 stdio MCP 服务,把 Open-Elevation 的海拔查询接口包装成 MCP tools。

Tools

  • get_elevation: 查询单个经纬度的海拔,单位米。
  • get_elevations: 批量查询多个经纬度。
  • get_elevation_profile: 在两点之间均匀采样,生成路径海拔剖面。

Run

npm start

也可以直接运行:

node .\src\index.js

MCP 配置示例

把下面配置加到你的 MCP client 配置里,路径按本机实际目录调整:

{
  "mcpServers": {
    "earth-2-elevation": {
      "command": "node",
      "args": [
        "D:\\coding\\AI-project\\ai-mcp-factory\\src\\index.js"
      ],
      "env": {
        "OPEN_ELEVATION_BASE_URL": "https://api.open-elevation.com"
      }
    }
  }
}

Notes

Open-Elevation 的公开接口是 POST /api/v1/lookup,请求体格式如下:

{
  "locations": [
    { "latitude": 41.161758, "longitude": -8.583933 }
  ]
}

响应会按请求顺序返回 latitude、longitude、elevation。如果没有记录到该坐标的海拔,服务会返回海平面 0 米。

Installation

Source-derived launch command. Check the maintainer’s required arguments and credentials before running:

bash
npx -y earth-2-elevation-mcp

Set up in your AI client

Merge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.

json
{
  "mcpServers": {
    "io-github-gitcookman-earth-2-elevation-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "earth-2-elevation-mcp"
      ]
    }
  }
}

Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.

Claude Desktop setup reference

Package

earth-2-elevation-mcpnpm

Compatible MCP Clients

Earth-2 Elevation MCP works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.

  • Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.
  • Cursor~/.cursor/mcp.jsonRestart Cursor for changes to take effect.
  • VS Code.vscode/mcp.jsonReload VS Code window for changes to take effect.
  • Windsurf~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect.
  • Claude Code.mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.

Learn More