Mapport

io.github.CloudCorpRecords由 GitHub 账号 CloudCorpRecords 发布v0.1.0更新于 Nov 1, 2026

Geocoding, places, directions, distance, and elevation through Google Maps.

已验证STDIO仅桌面位置与生活开发者工具

概览

AI 生成的概览

本地 MCP 服务器,让助手通过 Google Maps Platform 完成地理编码、地点搜索与详情、路线、距离和海拔查询。

可以做什么
  • 把地址转换为坐标,也把坐标反查为地址
  • 按文本查询搜索地点(可限定中心点和半径),并获取联系方式、评分、营业时间等详情
  • 获取含分步指引、距离和时长的路线,并计算多组起点与终点之间的距离和时长矩阵
  • 查询一个或多个坐标的海拔高度
适用场景
当助手需要在用户本机上获取真实的地点、地址、路线或地形数据时适用,例如规划出行、解析地址或比较通行时间。
运行要求
通过 npx 或 Docker 镜像以 stdio 在本地运行;需要 Google Maps Platform API 密钥,放在 GOOGLE_MAPS_API_KEY 环境变量中,并需要访问 Google 的网络。仅支持桌面端。
安装前请注意
API 密钥会作为查询参数随每次请求发送给 Google,属于可能计费的 Google Maps Platform 凭据,应妥善限制和保护;调用会消耗 Google 配额并可能产生费用。该服务器只读取地图数据,不会修改任何内容。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Mapport,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

mapport

mapport turns plain questions about places into answers from the Google Maps Platform: an address becomes coordinates, coordinates become an address, a text query becomes a list of places, and any two points become a distance, a duration, or a step-by-step route. It also reports how high a point sits above sea level. One binary serves both a command-line interface for scripts and a stdio MCP server for agents, and both faces share the same request logic.

A Google Maps Platform API key is required. Put it in the GOOGLE_MAPS_API_KEY environment variable; it is sent to Google as the key query parameter on every request and never appears in output. When the variable is missing, every call fails with an error that names it, before any request is made.

Install

bash
npx @reneturcios/mapport geocode "1600 Amphitheatre Parkway"

Or run the container image:

bash
docker run -i -e GOOGLE_MAPS_API_KEY ghcr.io/cloudcorprecords/mapport

The container defaults to the MCP server (see below). Pass CLI arguments to use it as a CLI instead.

CLI

bash
export GOOGLE_MAPS_API_KEY="your API key"
mapport geocode "1600 Amphitheatre Parkway, Mountain View"mapport reverse 37.422 -122.084mapport search "coffee near the ferry building" --lat 37.7955 --lng -122.3937 --radius 1500mapport details ChIJ2eUgeAK6j4ARbn5u_wAGqWAmapport distance "San Francisco" "Oakland" --to "Berkeley" --mode drivingmapport elevation 37.422,-122.084 40.0,-70.0mapport directions "San Francisco" "San Jose" --mode transit
mapport --version

Each command prints the upstream JSON payload. Exit codes: 0 on success, 1 when a call fails (including a missing GOOGLE_MAPS_API_KEY or an API error), 2 for usage errors.

MCP server

One bin serves both faces. The mcp subcommand starts a stdio MCP server:

bash
npx -y @reneturcios/mapport mcp

MCP client configuration:

json
{  "mcpServers": {    "mapport": {      "command": "npx",      "args": ["-y", "@reneturcios/mapport", "mcp"],      "env": { "GOOGLE_MAPS_API_KEY": "your API key" }    }  }}

Tools

ToolInputWhat it returns
maps_geocodeaddress (string, required)Matching locations with coordinates, formatted address, and place ID.
maps_reverse_geocodelatitude (number, required), longitude (number, required)The nearest address for the coordinates, with its components.
maps_search_placesquery (string, required), location (object, optional), radius (number, optional)Places matching the query, with names, addresses, and locations.
maps_place_detailsplace_id (string, required)Full details for one place: contact info, rating, reviews, and opening hours.
maps_distance_matrixorigins (string[], required), destinations (string[], required), mode (string, optional)A matrix of distances and travel durations.
maps_elevationlocations (array of {latitude, longitude}, required)Elevation in metres for each location.
maps_directionsorigin (string, required), destination (string, required), mode (string, optional)Routes with legs, steps, distance, and duration.

Google reports most API failures inside an HTTP 200 payload, in a top-level status field. mapport surfaces any status other than OK or ZERO_RESULTS as a tool error naming the status and Google's own message; ZERO_RESULTS is returned as an honest empty answer.

Development

bash
npm installnpm run build   # tsc -> dist/npm test        # node test runner over test/*.test.ts, no network (fake fetch fixtures)npm run dev     # run the CLI from source via tsx

License

MIT — see LICENSE.

来源:README.md,提交 d2e2fbf

工具

7

maps_geocode

Convert a street address into geographic coordinates, a formatted address, and a place ID.

输入参数address必填

maps_reverse_geocode

Convert geographic coordinates into the nearest human-readable address.

输入参数latitude必填longitude必填

maps_search_places

Search for places matching a text query, optionally centred on a location within a radius.

输入参数query必填radiuslocation

maps_place_details

Fetch detailed information about one place, including contact details, ratings, and opening hours.

输入参数place_id必填

maps_distance_matrix

Calculate travel distances and durations between sets of origins and destinations.

输入参数modeorigins必填destinations必填

maps_elevation

Look up the elevation above sea level for one or more geographic coordinates.

输入参数locations必填

maps_directions

Get route directions between an origin and a destination, with steps, distance, and duration.

输入参数modeorigin必填destination必填

版本历史

1
  1. v0.1.0最新Oct 31, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分