google-maps-mcp
google-maps-mcp
LLM을 위한 도구로 Google Maps Platform API를 노출하는 TypeScript 기반 Model Context Protocol (MCP) 서버입니다. AI 어시스턴트에게 실제 구조화된 지도 데이터(길찾기, 대중교통 경로, 장소 검색, 주소 검증, 사진, 고도 등)를 제공하여 훈련 데이터에서 추측하는 대신 사용할 수 있게 합니다.
Claude Desktop 및 기타 MCP 호환 클라이언트와 작동합니다.
기능
세 가지 범주의 15개 도구:
카테고리 | 도구 |
지도 | 정적 지도 이미지 URL, 임베드 URL(iframe), 고도 데이터, Street View 이미지 URL |
경로 | 턴바이턴 길안내(운전/도보/자전거/대중교통), 거리 행렬, 다중 경유지 경로 최적화 |
장소 | 지오코딩 / 역지오코딩, 장소 상세, 텍스트 검색, 주변 검색, 자동 완성, 사진, 주소 검증, 시간대 |
전송: HTTP Streamable(상태 저장 세션, SSE keep-alive) — 최신 MCP 전송 방식으로, mcp-remote 및 모든 HTTP 지원 클라이언트와 호환됩니다.
최소 의존성: 런타임 의존성은 @modelcontextprotocol/sdk와 zod 두 개뿐입니다. 모든 Google Maps 호출은 Node.js 내장 fetch를 통해 REST API를 사용하며 Google SDK가 필요 없습니다.
Related MCP server: google-maps-mcp-server
사전 요구사항
Node.js 22+ (또는 Docker)
mcp-remote — 전역으로 한 번 설치:
npm install -g mcp-remote관련 API가 활성화된 Google Maps Platform API 키 (아래 참조)
결제가 활성화된 Google Cloud 프로젝트
Google Cloud Console에서 활성화할 API
APIs & Services → Library로 이동하여 다음을 활성화하세요:
API | 사용처 |
Maps Static API |
|
Street View Static API |
|
Maps Embed API |
|
Elevation API |
|
Geocoding API |
|
Time Zone API |
|
Places API (New) |
|
Address Validation API |
|
Routes API |
|
Route Optimization API |
|
프로덕션에서는 키를 이러한 API 및 서버 IP로 제한할 수 있습니다.
빠른 시작
옵션 A — Docker로 실행 (권장)
docker run -d \
--name google-maps-mcp \
-p 127.0.0.1:3003:3003 \
-e GOOGLE_MAPS_API_KEY=your_key_here \
-e MCP_AUTH_TOKEN=your_secret_token \
ghcr.io/apurvaumredkar/google-maps-mcp:latest확인:
curl http://localhost:3003/health
# {"status":"ok","service":"google-maps-mcp"}옵션 B — npm / npx
설치 불필요 — npx로 바로 실행:
GOOGLE_MAPS_API_KEY=your_key_here \
MCP_AUTH_TOKEN=your_secret_token \
npx mcp-server-google-maps
# google-maps-mcp listening on port 3003또는 전역으로 설치:
npm install -g mcp-server-google-maps
GOOGLE_MAPS_API_KEY=your_key_here MCP_AUTH_TOKEN=your_secret_token mcp-server-google-maps기본 포트(3003)를 변경하려면 PORT=를 설정하세요.
옵션 C — 소스에서 빌드
git clone https://github.com/apurvaumredkar/google-maps-mcp.git
cd google-maps-mcp
npm install
npm run build.env 파일을 생성하거나(또는 환경 변수를 내보내고):
GOOGLE_MAPS_API_KEY=your_key_here
MCP_AUTH_TOKEN=your_secret_token
# Optional — only needed for routes_optimize:
GOOGLE_CLOUD_PROJECT_ID=your_project_id서버 시작:
GOOGLE_MAPS_API_KEY=... MCP_AUTH_TOKEN=... npm start
# google-maps-mcp listening on port 3003옵션 D — Docker Compose (자체 호스팅 스택)
docker-compose.yml에 추가:
services:
google-maps-mcp:
build: .
container_name: google-maps-mcp
restart: unless-stopped
ports:
- "127.0.0.1:3003:3003"
environment:
- GOOGLE_MAPS_API_KEY=${GOOGLE_MAPS_API_KEY}
- MCP_AUTH_TOKEN=${MCP_AUTH_TOKEN}
- GOOGLE_CLOUD_PROJECT_ID=${GOOGLE_CLOUD_PROJECT_ID:-}환경 변수
변수 | 필수 | 설명 |
| 예 | Google Maps Platform API 키 |
| 아니요 | 클라이언트가 |
| 아니요 | HTTP 포트 (기본값: |
| 아니요 |
|
클라이언트 연결
이 서버는 모든 MCP 호환 클라이언트와 함께 작동합니다 — Claude Desktop, LM Studio, Cursor 또는 Model Context Protocol을 지원하는 기타 도구. 클라이언트마다 구성 형식은 다를 수 있지만 엔드포인트와 인증은 동일합니다.
서버는 단일 엔드포인트를 제공합니다: POST/GET http://localhost:3003/mcp
MCP_AUTH_TOKEN이 설정된 경우 모든 요청에 다음 헤더를 포함해야 합니다:
X-Api-Key: <MCP_AUTH_TOKEN>MCP_AUTH_TOKEN이 설정되지 않은 경우 헤더가 필요 없습니다(로컬 전용 사용에 적합).
Claude Desktop (예시)
~/Library/Application Support/Claude/claude_desktop_config.json(macOS) 또는 %APPDATA%\Claude\claude_desktop_config.json(Windows)을 편집하세요:
{
"mcpServers": {
"google-maps": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:3003/mcp",
"--header",
"X-Api-Key: your_secret_token"
]
}
}
}도구 참조
지도
maps_static_map — 정적 지도 이미지
정적 지도의 직접 이미지 URL을 반환합니다.
매개변수 | 유형 | 기본값 | 설명 |
| string | 필수 | 주소 또는 |
| integer |
| 확대/축소 레벨 0–21 |
| string |
| 이미지 크기(픽셀 단위 WxH) |
| enum |
|
|
| string | — | 마커 사양(예: |
| string | — | 경로를 그리기 위한 경로 사양 |
| enum |
|
|
| enum |
|
|
| string | — | 라벨의 BCP 47 언어 코드 |
| string | — | ISO 3166-1 alpha-2 지역 코드 |
maps_embed_url — 지도 임베드 URL
iframe에 사용할 수 있는 임베드 URL을 반환합니다.
매개변수 | 유형 | 설명 | |
| enum |
| |
| string | 장소/검색 쿼리(place, search 모드) | |
| string | view/streetview 모드의 | |
| integer | 확대/축소 레벨 | |
| string | directions 모드용 | |
| string | 세로 막대( | )로 구분된 경유지 |
| enum |
|
maps_elevation — 고도 데이터
해발 고도(미터)를 반환합니다.
매개변수 | 유형 | 설명 | |
| string | 세로 막대( | )로 구분된 |
| string | 세로 막대( | )로 구분된 |
| integer | 경로를 따라 샘플 수 (2–512) |
maps_street_view — Street View 이미지
Street View 파노라마 이미지의 직접 URL을 반환합니다.
매개변수 | 유형 | 기본값 | 설명 |
| string | — | 주소 또는 |
| string | — | 특정 파노라마 ID(위치 대체) |
| string |
| 이미지 크기 WxH |
| number | — | 카메라 방향 0–360° |
| number | — | 카메라 기울기 -90° ~ 90° |
| number |
| 시야각 10–120° |
| enum | — | 실내 파노라마를 제외하려면 |
매개변수 | 유형 | 기본값 | 설명 |
| string | required | 주소 또는 |
| string | required | 주소 또는 |
| enum |
|
|
| enum[] | — | 대중교통을 특정 차량 유형으로 필터링: |
| string[] | — | 출발지와 목적지 사이의 경유지( |
| string | — | 교통 상황을 반영한 경로 탐색을 위한 ISO 8601 날짜/시간 |
| boolean |
| 유료 도로 회피( |
| boolean |
| 고속도로 회피( |
| boolean |
| 페리 회피( |
| enum |
|
|
| boolean |
| 최대 3개의 대안 경로 반환 |
routes_matrix — 경로 거리 행렬
여러 출발지와 목적지 간의 이동 시간/거리를 동시에 계산합니다.
매개변수 | 유형 | 기본값 | 설명 |
| string[] | required | 최대 25개의 주소 또는 |
| string[] | required | 최대 25개의 주소 또는 |
| enum |
|
|
| string | — | ISO 8601 날짜/시간 |
| enum |
|
|
routes_optimize — 다중 경유지 경로 최적화
총 이동 거리를 최소화하도록 경유지 순서를 최적화합니다. GOOGLE_CLOUD_PROJECT_ID가 필요합니다.
매개변수 | 유형 | 설명 |
| string | 시작 위치 — **반드시 |
| string | 종료 위치(기본값은 시작 위치) |
| object[] |
|
| enum |
|
장소
places_geocode — 지오코딩 / 역지오코딩
주소 ↔ 좌표 변환.
매개변수 | 유형 | 설명 |
| string | 지오코딩할 주소 |
| string | 역지오코딩용 |
| string | ISO 3166-1 alpha-2 지역 편향 |
| string | 구성요소 필터 예: |
places_details — 장소 상세 정보
Google Place ID로 장소의 전체 상세 정보를 가져옵니다.
매개변수 | 유형 | 설명 |
| string | Google Place ID |
| string | 쉼표로 구분된 필드 마스크(합리적인 기본값 있음) |
| string | 응답 언어 |
places_text_search — 텍스트로 장소 검색
자연어 쿼리와 일치하는 장소를 찾습니다.
매개변수 | 유형 | 설명 |
| string | 예: |
| number | 이 위치를 기준으로 결과 편향 |
| number | 편향 원 반경 |
| integer | 1–20, 기본값 10 |
| number | 최소 평균 별점(0–5) |
| boolean | 현재 영업 중인 장소만 |
| string | 장소 유형으로 필터링 예: |
| enum[] |
|
places_nearby_search — 주변 장소 검색
좌표 반경 내의 주변 장소를 찾습니다.
매개변수 | 유형 | 설명 |
| number | 검색 중심 |
| number | 미터 단위 검색 반경(최대 50,000) |
| string[] | 장소 유형 필터 |
| string[] | 제외할 장소 유형 |
| integer | 1–20, 기본값 10 |
| enum |
|
places_autocomplete — 장소 자동 완성
부분 입력으로 장소 이름을 예측합니다.
매개변수 | 유형 | 설명 |
| string | 완성할 부분 텍스트 |
| number | 이 위치 기준 편향 |
| string[] | 유형 필터 |
| string[] | ISO 3166-1 alpha-2 국가 필터 |
| boolean | 쿼리 예측도 반환 |
places_photos — 장소 사진
장소의 사진 URL을 가져옵니다.
매개변수 | 유형 | 기본값 | 설명 |
| string | required | Google Place ID |
| integer |
| 반환할 최대 사진 수(1–10) |
| integer |
| 최대 사진 너비(픽셀) |
| integer |
| 최대 사진 높이(픽셀) |
places_address_validation — 주소 검증
우편 주소를 검증하고 표준화합니다.
매개변수 | 유형 | 설명 |
| string[] | 주소 줄 |
| string | ISO 3166-1 alpha-2 국가 코드 |
| string | 시/군 |
| string | 주/도 |
| string | 우편번호 |
| boolean | USPS CASS 검증(미국만) |
places_timezone — 시간대 가져오기
모든 좌표에 대한 IANA 시간대 및 UTC/DST 오프셋을 가져옵니다.
매개변수 | 유형 | 설명 |
| number | 위치 |
| integer | DST 계산용 Unix 타임스탬프(기본값은 현재 시간) |
| string | 응답 언어 |
아키텍처
src/
├── index.ts # Raw Node.js HTTP server, auth, stateful session management
├── server.ts # McpServer instantiation + tool registration
├── maps-client.ts # Typed fetch wrappers for all Google Maps REST APIs
└── tools/
├── maps.ts # 4 tools: static map, embed, elevation, street view
├── routes.ts # 3 tools: compute route, matrix, optimize
└── places.ts # 8 tools: geocode, details, text search, nearby, autocomplete,
# photos, address validation, timezone주요 설계 결정:
Express 대신 원시
node:http— MCP SDK 내부의 Hono 기반 요청 처리와의 올바른 상호 운용을 위해 필요. Express는 요청 본문 스트림을 미리 소비하여StreamableHTTPServerTransport를 깨뜨립니다.상태 저장 세션 맵 —
mcp-remote와 SSE keep-alive는 요청 간에 세션이 유지되어야 합니다. 세션은Mcp-Session-Id헤더를 키로 사용하며 전송 종료 시 정리됩니다.본문 읽기 전 인증 —
X-Api-Key검사는 본문 스트림을 건드리기 전에 헤더에서 수행되므로 거부된 요청은 깔끔하게 소진됩니다.Google API 인증 분리 — 레거시 REST API(Static Maps, Geocoding, Elevation, Timezone, Street View)는
?key=쿼리 매개변수를 사용하고, 신규 API(Places v1, Routes v2, Address Validation)는X-Goog-Api-Key헤더를 사용합니다.
개발
npm run dev # TypeScript watch mode (tsc --watch)
npm run build # Compile to dist/
npm start # Run compiled server변경 사항 반영 후 Docker 이미지 다시 빌드
docker compose build google-maps-mcp
docker compose up -d google-maps-mcpMCP 엔드포인트 테스트
# Health check (no auth required)
curl http://localhost:3003/health
# MCP initialize (auth required)
TOKEN=your_secret_token
curl -s -X POST http://localhost:3003/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "X-Api-Key: $TOKEN" \
-d '{"jsonrpc":"2.0","method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1"}},"id":1}'
# List tools (use session ID from Mcp-Session-Id response header)
SESSION=<Mcp-Session-Id from above>
curl -s -X POST http://localhost:3003/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "X-Api-Key: $TOKEN" \
-H "Mcp-Session-Id: $SESSION" \
-d '{"jsonrpc":"2.0","method":"tools/list","id":2}'Windows/WSL 주의사항:
.env파일에 Windows CRLF 줄 바꿈이 있는 경우tr -d '\r'로 값을 추출하세요:TOKEN=$(grep MCP_AUTH_TOKEN .env | cut -d= -f2 | tr -d '\r')
변경 로그
v1.0.4
routes_compute: TRANSIT 모드에 대한 사전 검증 추가 —intermediates또는 경로 수정자(avoid_tolls,avoid_highways,avoid_ferries)를 전달하면 Google API의 불명확한 400 오류 대신 명확하고 실행 가능한 오류를 반환합니다.
v1.0.3
routes_compute: 차량 유형(BUS,SUBWAY,TRAIN,LIGHT_RAIL,RAIL)별로 대중교통 경로를 필터링하는transit_allowed_modes매개변수 추가.
v1.0.2
지도, 경로, 장소 카테고리에 걸친 15개 도구로 최초 공개 릴리스.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- 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.71,992428MIT
- AlicenseAqualityDmaintenanceProduction-ready MCP server for Google Maps Platform APIs, providing 11 tools for directions, places, geocoding, traffic, and road data to empower AI agents with location intelligence.114Apache 2.0
- AlicenseAqualityDmaintenanceA TypeScript-based MCP server that integrates with Swagger/OpenAPI specifications to expose API endpoints as tools for Large Language Models (LLMs), enabling natural language interaction with any OpenAPI-compliant API.49MIT
- FlicenseNot gradedqualityDmaintenanceComprehensive MCP server for Google Maps APIs, enabling geocoding, place search and details, distance matrix, elevation, and directions through natural language.6
Related MCP Connectors
Live Google Maps business search, review, and photo data for AI agents over MCP.
Google Maps MCP Pack — geocoding, places, directions, distance matrix, elevation.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/apurvaumredkar/google-maps-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server