IM

iceener/maps-streamable-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

22 stars 4 forks 质量 51 趋势 18

MCP服务器用于与Google地图交互(Places API和Routes API)。用TypeScript、Node和 Hono.dev 编写

概览

该服务器是谷歌地图的远程模型上下文协议(MCP)服务器。它负责查找地点、提供地点详情并规划路线。它使用谷歌地图平台地点API(新)和路线API。 服务器运行于。它基于MCP服务器模板2.1版本和官方MCP TypeScript SDK 2.3.0构建。使用协议版本2026-07-28。也接受使用2025协议版本的客户端。 服务器是为知道用户位置的代理准备的,例如在手表或手机上。客户端给出当前位置,模型可以: - 按类型或名称查找用户附近的地点。- 阅读营业时间、评分、评价、联系信息和地点照片。- 获取步行、驾车、骑行或交通路线。- 比较多个目的地的距离。 每个工具都给出模型和结构化数据的文本。工具描述会提供所有输入和输出。所有工具只读取数据。

概述(AI 翻译)

该服务器是谷歌地图的远程模型上下文协议(MCP)服务器。它负责查找地点、提供地点详情并规划路线。它使用谷歌地图平台地点API(新)和路线API。

该服务器运行于 Cloudflare Workers 和 Bun 上。它基于 MCP 服务器模板 2.1 版本和官方 MCP TypeScript SDK 2.3.0 构建。使用协议版本 2026-07-28。也接受使用 2025 协议版本的客户端。

服务器是为知道用户位置的代理准备的,例如在手表或手机上。客户端给出当前位置,模型可以:

  • 按类型或名称查找用户附近的地点。
  • 阅读营业时间、评分、评价、联系方式和地点照片。
  • 获取步行、驾车、骑行或公共交通的路线指引。
  • 比较多个目的地的距离。

工具

工具 功能
search_places 查找靠近某地点的地方。使用query时,进行文本搜索(“寿司”、“星巴克”)。使用types时,查找这些类型的地方(“咖啡馆”、“药房”)。对于两者都不存在,则搜索半径内的所有地点。
get_place 提供来自place_id的地点细节。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Google Maps MCP Server

This server is a remote Model Context Protocol (MCP) server for Google Maps. It finds places, gives place details, and plans routes. It uses the Google Maps Platform Places API (New) and Routes API.

The server runs on Cloudflare Workers and on Bun. It is built on the MCP server template, version 2.1, and the official MCP TypeScript SDK 2.3.0. It uses protocol version 2026-07-28. It also accepts clients that use the 2025 protocol versions.

The server is for agents that know the location of the user, for example on a watch or a phone. The client gives the current position, and the model can:

  • Find places near the user, by type or by name.
  • Read the opening hours, ratings, reviews, contact data, and photos of a place.
  • Get walking, driving, cycling, or transit directions.
  • Compare the distance to several destinations.

Tools

Tool Function
search_places Finds places near a location. With query, it does a text search (“sushi”, “Starbucks”). With types, it finds places of those types (“cafe”, “pharmacy”). With neither, it finds all places in the radius.
get_place Gives the details of a place from a place_id. Select the data with fields: basic, contact, hours, reviews, photos.
get_route With one destination, gives a route, and turn-by-turn steps if you ask for them. With two or more destinations (25 maximum), compares the time and distance to each, and names the closest.

Each tool gives text for the model and structured data. The tool descriptions give all inputs and outputs. All tools only read data.

Examples of requests:

  • “Coffee near me”: search_places with types: ["cafe"] and open_now: true.
  • “Is the pharmacy on Main Street open?”: search_places, then get_place with fields: ["hours"].
  • “Which is closer, A or B?”: get_route with both places as destinations.

Photo results contain public image URLs that Google makes for each request. They never contain the API key.

Connect a client

The server URL is the deployed Worker’s MCP_PUBLIC_URL, for example https://google-maps..workers.dev/mcp. Use the Streamable HTTP transport, and send the shared token in the Authorization header.

Client Procedure
Alice Add an MCP server. Set the URL, the type streamable-http, and the header Authorization: Bearer .
Claude Code Run claude mcp add --transport http google-maps --header "Authorization: Bearer ".
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →