google-maps-transit
Requires enabling Google Cloud APIs (Routes API and Places API) and setting up an API key via the Google Cloud Console.
Provides tools for transit routing, place search and details, and commute comparison using Google Maps APIs.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@google-maps-transittransit directions from Union Square to JFK Airport"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
maps-mcp
A Model Context Protocol server for Google Maps — routing, place discovery, and commute comparison over stdio.
Tools
get_transit_commute
Route between two addresses (or neighborhoods). Supports transit (default), driving, walking, bicycling, two_wheeler. Multi-leg trips via intermediates (A→B→C). Returns up to 3 alternative routes, each with:
mode,duration_minutes,distance_km,summary,steps_counttransit:
segments(line + vehicle type),transfers,walking_minutes,first_departure,last_arrivaldriving / two_wheeler:
duration_in_traffic_minutes(traffic-aware),toll_roads
search_places
Find restaurants, hotels, attractions, parks, gas stations, etc. using free-text queries. Optionally bias by location (near), filter by place type (type), and filter to currently-open places (open_now). Returns up to 20 results with name, address, rating, price level, open/closed status, and a id for follow-up.
get_place_details
Full details for a place from search_places: phone, website, per-day opening hours, editorial summary, and up to 5 user reviews. Takes a place_id.
compare_commutes
Rank 2–5 candidate origins against a shared destination by travel time. Fans out in parallel and returns results sorted fastest → slowest. Per-origin failures surface inline rather than aborting the whole comparison.
Related MCP server: MCP Google Map Server
Google Cloud setup
In Google Cloud Console, pick or create a project and enable these APIs (APIs & Services → Library):
Routes API — for
get_transit_commuteandcompare_commutesPlaces API (New) — for
search_placesandget_place_details
Then Credentials → Create credentials → API key. Restrict the key to those two APIs. Put the value in .env:
echo 'GOOGLE_MAPS_API_KEY=your-key-here' > .envSetup & running
npm install
npm run build
npm start # or: npx tsx src/index.ts (dev, no build needed)Make target | What it does |
|
|
| Compile TypeScript → |
| Run server (dev / compiled) |
| Unit + in-memory e2e tests |
| Live API test (needs key) |
| One real API request |
| Build/run Docker image |
Connecting a client (e.g. Cursor / Claude Desktop)
{
"mcpServers": {
"maps-mcp": {
"command": "node",
"args": ["/absolute/path/to/maps-mcp/dist/index.js"],
"env": { "GOOGLE_MAPS_API_KEY": "your-key-here" }
}
}
}For dev without building: "command": "npx", "args": ["tsx", "/absolute/path/to/maps-mcp/src/index.ts"].
Notes
MCP server name:
google-maps-transitdrivingandtwo_wheeleruseTRAFFIC_AWARErouting (Routes API v2)Up to
MAX_ROUTES = 3alternatives returned; Google may return fewerMissing
GOOGLE_MAPS_API_KEYsurfaces as a clear tool error
Available Tools
4 toolscompare_commutescompare_commutesARead-only
Compares commute times from multiple candidate origins to a single shared destination using real-time Google Maps data.
Perfect for questions like:
• "Which of these 3 apartments has the best commute to my office?"
• "I'm considering moving to Brooklyn, Queens, or Jersey City — which is fastest to Midtown?"
• "Compare driving vs. transit isn't needed — just rank these addresses by commute time."
Accepts 2–5 origin addresses. Returns them ranked fastest → slowest, each with the best
available route (duration, distance, transit lines, traffic-aware driving time, etc.).
Failed lookups for individual origins are surfaced as errors in-line rather than aborting the whole comparison.| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Transport mode for all comparisons. Default: transit. | |
| origins | Yes | List of 2–5 candidate origin addresses to compare, e.g. ['123 Main St, Brooklyn, NY', '456 Elm Ave, Queens, NY']. | |
| avoid_tolls | No | When true, instructs Google Maps to avoid toll roads where possible. Applies to driving and two_wheeler modes. | |
| destination | Yes | The shared destination address all origins will be compared against. | |
| departure_time | No | ISO 8601 departure datetime shared across all comparisons. Defaults to 1 minute from now. |
Output Schema
| Name | Required | Description |
|---|---|---|
| mode | Yes | |
| results | Yes | Origins ranked by fastest commute time (failed lookups appear last with rank: null) |
| destination | Yes | The shared destination address |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and openWorldHint=true, so the agent knows this is a safe read operation that may interact with external systems. The description adds useful behavioral context: it accepts 2–5 origins, returns them ranked fastest to slowest with best available route details (duration, distance, transit lines, traffic-aware driving time), and handles individual lookup failures gracefully by surfacing errors in-line rather than aborting the whole comparison. This goes beyond the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the main purpose, followed by example questions and behavioral notes. While the example section is useful, it could be slightly more concise. However, it remains focused and avoids unnecessary repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description is complete for an agent to call the tool correctly: it explains the input range (2–5 origins), output format (ranked list with route details), error handling, and use cases. An output schema exists, so return values need not be detailed, but the description still provides enough behavioral context to be self-sufficient. Minor gap: no explicit mention of rate limits or authentication needs, which are unlikely for a read-only comparison tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so all parameters (mode, origins, avoid_tolls, destination, departure_time) are already documented in the schema. The description adds no additional parameter syntax or format details beyond what the schema provides, such as address formatting or departure time format. When schema coverage is high, a 3 is the baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb (compares) and resource (commute times), and precisely scopes the operation: multiple candidate origins to a single shared destination using real-time Google Maps data. It distinguishes itself from the sibling get_transit_commute by handling multiple origins and ranking them, rather than a point-to-point lookup.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear context through example questions, showing exactly when to use it (ranking apartments by commute, comparing neighborhoods). It also clarifies what the tool does NOT do: 'Compare driving vs. transit isn't needed — just rank these addresses by commute time.' However, it doesn't explicitly name the sibling get_transit_commute or state when to use that alternative.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_place_detailsget_place_detailsARead-only
Returns detailed information about a specific place: phone number, website URL, full opening hours for each day of the week, a short editorial summary, and up to 5 user reviews.
Always requires a place ID obtained from a prior search_places call.
Use this as a follow-up when the user wants full details about one of the search results, e.g.
• "What are the opening hours for that first restaurant?"
• "Does it have a website I can check?"
• "Show me the reviews for the top result."| Name | Required | Description | Default |
|---|---|---|---|
| place_id | Yes | The place ID returned by search_places (typically starts with 'ChIJ…') |
Output Schema
| Name | Required | Description |
|---|---|---|
| id | Yes | Unique place ID |
| name | Yes | Place display name |
| hours | Yes | Weekday opening-hours descriptions, e.g. ['Monday: 9:00 AM – 5:00 PM', 'Tuesday: 9:00 AM – 5:00 PM', …] |
| phone | Yes | National phone number; null if unavailable |
| types | Yes | Google Place type tags |
| rating | Yes | Average star rating (1.0–5.0); null if no ratings |
| address | Yes | Formatted address |
| reviews | Yes | Up to 5 most relevant user reviews |
| summary | Yes | Short editorial summary of the place; null if unavailable |
| website | Yes | Website URL; null if unavailable |
| open_now | Yes | Whether the place is currently open; null if unknown |
| price_level | Yes | Relative price: FREE | INEXPENSIVE | MODERATE | EXPENSIVE | VERY_EXPENSIVE |
| user_rating_count | Yes | Total number of user reviews |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered, but the description adds real value by scoping the returned data (notably the hard cap of 'up to 5 user reviews' and full weekly hours rather than a summary). It does not mention rate limits, quota costs, or whether fields like hours can be missing for some places, leaving a small gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with the payload, then the hard prerequisite, then illustrative intents. Every sentence earns its place and the bulleted examples aid selection without bloat.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-required-param read tool with full schema coverage and an existing output schema, the description supplies everything needed: the prerequisite chain, the returned content, and when to reach for it. No missing decision-relevant information.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and the single parameter is already documented with its source and format ('ChIJ…') in the schema itself. The description's instruction to source the ID from a prior search_places call largely restates the schema, adding only mild emphasis; baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (returns) and resource (details about a specific place), then enumerates the concrete payload: phone, website, full weekly opening hours, editorial summary, and up to 5 reviews. This clearly separates it from search_places, which returns result lists rather than one place's detail.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states the prerequisite ('Always requires a place ID obtained from a prior search_places call') and frames the tool as a follow-up to search_places, with three concrete user-intent examples that select this tool over its siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_transit_commuteget_transit_commuteA
Returns commute routes between two addresses using real-time Google Maps data. Use this when the user asks about commute, travel time, or exact travel times between two addresses. Supports transit, driving, walking, bicycling, and two_wheeler modes. Supports multi-leg trips via the intermediates parameter (e.g. A→B→C). Returns up to 3 alternative routes, each with duration in minutes, transit lines used, number of transfers, and walking time.
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | The mode of transportation to use. If not provided, the default mode will be transit. | |
| origin | Yes | The origin address or neighbourhood (e.g. '123 Main St, Anytown, USA') | |
| avoid_tolls | No | When true, instructs Google Maps to avoid toll roads where possible. Applies to driving and two_wheeler modes. | |
| destination | Yes | The destination address or neighbourhood (e.g. '456 Main St, Anytown, USA') | |
| intermediates | No | Optional ordered list of intermediate stops between origin and destination, e.g. ['Stop B', 'Stop C']. Use this for multi-leg trips like A→B→C. | |
| departure_time | No | ISO 8601 datetime for departure (e.g. '2026-04-02T17:00:00-05:00'). If provided, uses Google Maps predicted/historical traffic for that future time. If omitted, uses the current time with live real-time traffic data. Omit for current conditions, provide for future trip planning. |
Output Schema
| Name | Required | Description |
|---|---|---|
| routes | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden and does well: it discloses real-time vs predicted traffic behavior, the default mode, multi-leg support, and a concrete return shape (up to 3 alternatives with duration, lines, transfers, walking time). It omits auth/permission requirements and rate limits, which is a minor gap rather than a critical one.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with purpose, then usage, then capabilities and return values — a logical order. It is slightly padded ('commute, travel time, or exact travel times' is near-redundant), but every line still contributes information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return-value detail is not strictly required, yet the description adds useful shape information anyway. Together with the fully documented schema, an agent has enough to invoke the tool correctly; only sibling disambiguation and auth expectations are unaddressed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents mode defaults, avoid_tolls scope, intermediates, and departure_time semantics — the description mostly restates these. The A→B→C example adds a little clarity but no new semantics beyond what the schema supplies, so the baseline of 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('returns commute routes between two addresses') and names the underlying data source and supported modes. It is clear what the tool does, but it never distinguishes itself from the sibling compare_commutes, which an agent could plausibly reach for on the same query.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives explicit trigger conditions ('user asks about commute, travel time, or exact travel times between two addresses'), which is solid when-to-use guidance. It offers no when-not-to-use and does not name compare_commutes as the alternative for multi-address comparison, leaving that routing decision to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_placessearch_placesARead-only
Searches for places — restaurants, cafés, hotels, attractions, shops, parks, and more — using real-time Google Maps data.
Use this when the user asks things like:
• "Find coffee shops near the Eiffel Tower"
• "Best sushi restaurants in downtown Seattle"
• "Dog-friendly parks in Austin, TX"
• "Museums open right now in London"
• "Gas stations along Highway 1"
Returns up to 20 results with name, address, star rating, price level, open/closed status, and type tags.
To get phone number, website, opening hours, and user reviews for a specific result, pass its id to get_place_details.| Name | Required | Description | Default |
|---|---|---|---|
| near | No | Optional location context appended to the query, e.g. 'Golden Gate Bridge, San Francisco' or 'Paris, France'. Use this to bias results toward a specific area. | |
| type | No | Optional Google Place type filter. Common values: restaurant, cafe, bar, bakery, hotel, lodging, tourist_attraction, museum, art_gallery, park, zoo, amusement_park, shopping_mall, grocery_or_supermarket, gas_station, hospital, pharmacy, gym, movie_theater, night_club, library. See Google Place Types for the full list. | |
| query | Yes | What to search for, e.g. 'coffee shop', 'Italian restaurant', 'museum', 'dog-friendly park'. | |
| open_now | No | If true, only return places that are currently open. | |
| max_results | No | Maximum number of results to return (1–20). Default: 10. |
Output Schema
| Name | Required | Description |
|---|---|---|
| places | Yes | |
| query_used | Yes | The final text query sent to the Places API |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The annotations already declare readOnlyHint=true and openWorldHint=true, so safety is covered. The description adds useful behavioral context beyond that: real-time Google Maps data, a maximum of 20 returned results, the result fields provided, and the handoff condition to get_place_details. It does not cover rate limits or auth requirements, so it is strong but not exhaustive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the core action, then immediately gives concrete trigger examples, then summarizes output and the routing alternative. Every section is useful and there is no filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so the description does not need to explain return values in full, yet it still summarizes the result shape and the detail-retrieval follow-up. For a read-only discovery tool with complete parameter documentation, nothing essential is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description provides example query strings and notes the return count, but it does not materially extend the meaning of near, type, open_now, or max_results beyond what the schema already documents.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource ('Searches for places') and enumerates the kinds of places covered. It clearly distinguishes this discovery tool from the sibling get_place_details by explaining that details require passing a result id to that sibling.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives explicit example user queries that should trigger this tool, says when to use it, and points to get_place_details for deeper information about a specific result. The when-to-use and alternative routing are both explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v1.0.0- First observed
compare_commutes - First observed
get_place_details - First observed
get_transit_commute - First observed
search_places
TDQS
Scored across 4 tools
search_places and get_place_details are cleanly separated as search vs. detail lookup, and the commute tools have distinct scopes (point-to-point vs. multi-origin ranking). The only mild overlap is between get_transit_commute and compare_commutes, both of which compute routes, though the descriptions make the boundary fairly clear.
All four tools follow a consistent snake_case verb_noun pattern: get_transit_commute, search_places, get_place_details, compare_commutes. The convention is predictable and self-explanatory.
Four tools is slightly lean for a maps server covering both routing and place discovery, but each tool earns its place and there is no redundancy. It is well-scoped, just on the minimal side.
The surface covers commute/routing (including multi-leg and comparison ranking) and a full place search-plus-detail lifecycle. Minor gaps exist—no standalone distance matrix, geocoding, or turn-by-turn directions—but core agent workflows are supported.
Maintenance
Related MCP Connectors
Google Maps MCP Pack — geocoding, places, directions, distance matrix, elevation.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server for Google search results via SERP API
- geoOAuthco.thinair
Geocoding, truck routing, traffic, weather, and place search via MCP — 11 hosted tools.
Related MCP Servers
- -licenseNot gradedqualityAmaintenanceMCP Server for the Google Maps API.11,868 npm90,196MIT
- AlicenseBqualityAmaintenanceA Model Context Protocol server that provides Google Maps API integration, allowing users to search locations, get place details, geocode addresses, calculate distances, obtain directions, and retrieve elevation data through LLM processing capabilities.7504 npm450MIT
- FlicenseNot gradedqualityDmaintenanceComprehensive MCP server for Google Maps APIs, enabling geocoding, place search and details, distance matrix, elevation, and directions through natural language.6-
- FlicenseNot gradedqualityBmaintenanceA general-purpose Google Maps MCP server that provides geocoding, place search, directions, distance matrices, and time zone lookup over the Model Context Protocol.-