Skip to main content
Glama
Street View MCP

Street View MCP

by vlad-ds

스트리트 뷰 MCP

AI 모델이 스트리트 뷰 이미지를 가져와 표시하고 가상 투어를 생성할 수 있도록 하는 Google Street View API용 MCP(모델-클라이언트-프로토콜) 서버입니다.

Claude Desktop과 함께 사용

Claude Desktop에서 Street View MCP를 사용하려면:

  1. uv 설치되어 있는지 확인하세요: UV 설치 가이드

  2. 이 저장소를 복제하세요:

    지엑스피1

  3. 종속성 설치:

    uv pip install -e ".[dev]"
  4. Google Maps API 키 받기(아래 지침 참조)

  5. Claude Desktop claude_desktop_config.json 파일에 다음을 추가하세요.

"street_view": {
  "command": "uv",
  "args": [
    "run",
    "--directory",
    "/path/to/street-view-mcp",  // Replace with your actual path
    "mcp",
    "run",
    "src/street_view_mcp/server.py"
  ],
  "env": {
    "API_KEY": "your_google_maps_api_key_here"  // Add your API key here
  }
}

구성 후, Claude Desktop에서 "/street_view"를 입력하기만 하면 Street View MCP를 사용할 수 있습니다.

Related MCP server: MCP Google Map Server

개요

Street View MCP는 AI 모델에 다음과 같은 간단한 인터페이스를 제공합니다.

  1. 주소, 좌표 또는 파노라마 ID로 스트리트 뷰 이미지 가져오기

  2. 로컬 파일에 이미지 저장

  3. 기본 뷰어에서 저장된 이미지 열기

  4. 여러 개의 Street View 이미지를 가상 투어로 컴파일하는 HTML 페이지를 만듭니다.

요구 사항

  • 파이썬 3.9 이상

  • Street View API가 활성화된 Google Maps API 키

  • fastmcp 패키지

  • uv 패키지 관리자(추천)

설치

# Clone the repository
git clone https://github.com/vlad-ds/street-view-mcp.git
cd street-view-mcp

# Create and activate a virtual environment with uv (recommended)
uv venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install dependencies
uv pip install -e ".[dev]"

API 키 설정

Street View MCP에는 Street View API가 활성화된 Google Maps API 키가 필요합니다.

  1. Google Cloud Console을 방문하세요

  2. 새 프로젝트를 만들거나 기존 프로젝트를 선택하세요

  3. API 라이브러리에서 "Street View Static API"를 활성화하세요.

  4. 자격 증명 페이지에서 API 키를 만듭니다.

  5. API 키를 환경 변수로 설정합니다.

# Set temporarily in your shell:
export API_KEY=your_api_key_here

# Or create a .env file in the project root:
echo "API_KEY=your_api_key_here" > .env

용법

MCP 서버 시작

python -m street_view_mcp.main --host 127.0.0.1 --port 8000

AI 모델은 지정된 호스트와 포트에서 서버를 사용할 수 있습니다.

CLI 도구로 사용

# Fetch Street View image by address
python -m street_view_mcp.street_view --address "Empire State Building, NY" --output output/empire_state.jpg

# Fetch Street View image by latitude/longitude
python -m street_view_mcp.street_view --latlong "40.748817,-73.985428" --output output/coords.jpg --heading 180

# Fetch Street View image by panorama ID
python -m street_view_mcp.street_view --pano PANO_ID --output output/panorama.jpg

MCP 도구

Street View MCP는 AI 모델에 대해 다음과 같은 도구를 제공합니다.

get_street_view

위치, 좌표 또는 파노라마 ID를 기반으로 스트리트 뷰 이미지를 가져와 파일에 저장합니다.

{
  "filename": "empire_state.jpg",
  "location": "Empire State Building, NY",
  "size": "600x400",
  "heading": 90,
  "pitch": 10
}

매개변수:

  • filename (필수): 이미지를 저장할 이름(이미 존재하면 안 됨)

  • location (선택 사항): 이미지를 가져올 주소

  • lat_lng (선택 사항): 쉼표로 구분된 좌표(예: "40.748817,-73.985428")

  • pano_id (선택 사항): 특정 파노라마 ID

  • size (선택 사항): 이미지 크기는 "너비x높이"입니다(기본값: "600x400")

  • heading (선택 사항): 카메라 방향(도 단위, 0~360, 기본값: 0)

  • pitch (선택 사항): 카메라 피치(-90~90도, 기본값: 0)

  • fov (선택 사항): 시야각(도 단위, 10~120, 기본값: 90)

  • radius (선택 사항): 검색 반경(미터)(기본값: 50)

  • source (선택 사항): 이미지 출처("기본값" 또는 "실외", 기본값: "기본값")

참고: location , lat_lng 또는 pano_id 중 하나만 제공해야 합니다.

get_metadata

스트리트 뷰 파노라마에 대한 메타데이터를 가져옵니다.

{
  "location": "Empire State Building, NY"
}

매개변수:

  • get_street_view 와 동일한 위치 매개변수

  • 상태, 저작권, 날짜, 파노라마 ID 및 좌표가 포함된 JSON 메타데이터를 반환합니다.

open_image_locally

기본 애플리케이션에서 저장된 Street View 이미지를 엽니다.

{
  "filename": "empire_state.jpg"
}

매개변수:

  • filename (필수): 열려는 이미지의 파일 이름(출력 디렉토리에 있어야 함)

create_html_page

여러 개의 스트리트 뷰 이미지를 가상 투어로 표시하는 HTML 페이지를 만듭니다.

{
  "filename": "nyc_tour.html",
  "title": "New York City Tour",
  "html_elements": [
    "<h1>New York City Landmarks Tour</h1>",
    "<p>Explore famous landmarks through Street View images.</p>",
    "<h2>Empire State Building</h2>",
    "<img src='../output/empire.jpg' alt='Empire State Building'>",
    "<p class='location'>350 Fifth Avenue, New York, NY</p>",
    "<p class='description'>This 102-story Art Deco skyscraper was completed in 1931.</p>"
  ]
}

매개변수:

  • html_elements (필수): HTML 콘텐츠 요소 목록

  • filename (필수): HTML 파일의 이름

  • title (선택 사항): 페이지 제목(기본값: "스트리트 뷰 투어")

중요: 이미지를 참조할 때는 항상 ../output/filename.jpg 경로를 사용하세요.

가상 투어 만들기

Street View MCP를 사용하면 HTML 페이지에서 여러 개의 Street View 이미지와 설명 텍스트를 결합하여 가상 투어를 만들 수 있습니다.

투어 생성을 위한 워크플로 예시:

  1. 다양한 위치의 이미지 가져오기:

get_street_view(filename="empire.jpg", location="Empire State Building, NY")
get_street_view(filename="times_square.jpg", location="Times Square, NY")
get_street_view(filename="central_park.jpg", location="Central Park, NY")
  1. HTML 투어 페이지를 만드세요.

create_html_page(
  filename="nyc_tour.html",
  title="New York City Tour",
  html_elements=[
    "<h1>New York City Landmarks Tour</h1>",
    "<p>Explore these famous NYC landmarks through Street View images.</p>",
    
    "<h2>Empire State Building</h2>",
    "<img src='../output/empire.jpg' alt='Empire State Building'>",
    "<p class='location'>350 Fifth Avenue, New York, NY</p>",
    "<p class='description'>An iconic 102-story Art Deco skyscraper in Midtown Manhattan.</p>",
    
    "<h2>Times Square</h2>",
    "<img src='../output/times_square.jpg' alt='Times Square'>",
    "<p class='location'>Broadway & 7th Avenue, New York, NY</p>",
    "<p class='description'>Famous for its bright lights, Broadway theaters, and as the site of the annual New Year's Eve ball drop.</p>",
    
    "<h2>Central Park</h2>",
    "<img src='../output/central_park.jpg' alt='Central Park'>",
    "<p class='location'>Central Park, New York, NY</p>",
    "<p class='description'>An urban park spanning 843 acres in the heart of Manhattan.</p>"
  ]
)

프로젝트 구조

  • street_view_mcp/

    • __init__.py : 패키지 초기화

    • main.py : MCP 서버의 진입점

    • server.py : MCP 서버 구현

    • street_view.py : 핵심 스트리트 뷰 API 클라이언트

중요 참고 사항

  • 로컬 저장소 : 이 도구는 모든 Street View 이미지와 HTML 파일을 output/ 디렉토리에 로컬로 저장합니다.

  • 자동 정리 없음 : 저장된 파일을 삭제하는 내장 메커니즘이 없습니다.

  • 수동 정리 : 디스크 공간을 관리하려면 주기적으로 output/ 디렉토리를 정리해야 합니다.

  • API 사용 : 각 이미지 요청은 Google Maps API 할당량에 포함되며 요금이 부과될 수 있습니다.

개발

테스트

pytest

특허

MIT

Available Tools

4 tools
create_html_pageA

Create an HTML page specifically for displaying Street View images with descriptive text.

This tool is designed to compile multiple Street View images into a single viewable HTML document, creating a virtual tour or location showcase. The function automatically wraps your content in a complete HTML document with:

  • DOCTYPE declaration

  • HTML, head, and body tags

  • Basic responsive styling optimized for displaying images

  • Title from the parameter

Args: html_elements: List of content HTML elements (just the body content, no need for HTML structure) filename: Name of the HTML file to create (without directory path) title: Title for the HTML page

Returns: Dict: A status message indicating success or failure

Raises: ValueError: If the filename already exists or is invalid

Note: - You only need to provide the CONTENT elements (no need for html, head, body tags) - IMPORTANT: When including Street View images, you MUST use the path "../output/": <img src="../output/empire.jpg" alt="Empire State Building"> - The "../" prefix is REQUIRED because HTML files are in html/ directory while images are in output/ directory (both at the same level)

Example usage: ``` # Create a virtual Street View tour with multiple locations html_elements = [ "New York City Landmarks Tour", "Explore famous landmarks through Street View images.",

    "<h2>Empire State Building</h2>",
    "<img src='../output/empire.jpg' alt='Empire State Building'>",
    "<p class='location'>350 Fifth Avenue, New York, NY</p>",
    "<p class='description'>This 102-story Art Deco skyscraper in Midtown Manhattan was completed in 1931.</p>",
    
    "<h2>Times Square</h2>",
    "<img src='../output/timessquare.jpg' alt='Times Square'>",
    "<p class='location'>Broadway & 7th Avenue, New York, NY</p>", 
    "<p class='description'>Famous for its bright lights, Broadway theaters, and as the site of the annual New Year's Eve ball drop.</p>"
]
```

HTML Boilerplate (automatically added): <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>{title}</title> <style> body { font-family: Arial, sans-serif; line-height: 1.6; max-width: 800px; margin: 0 auto; padding: 20px; color: #333; } img { max-width: 100%; height: auto; border-radius: 5px; margin: 20px 0; } h1, h2, h3 { color: #2c3e50; } </style> </head> <body> <!-- Your content elements are inserted here --> </body> </html>

Inputs: html_elements (required), filename (required), title.

get_metadataB

Fetch metadata about a Street View panorama.

Args: location: The address to check for Street View imagery lat_lng: Comma-separated latitude and longitude (e.g., "40.748817,-73.985428") pano_id: Specific panorama ID to fetch metadata for radius: Search radius in meters when using location or coordinates source: Limit Street View searches to selected sources ("default" or "outdoor")

Returns: Dict: Panorama metadata including status, copyright, date, pano_id, lat, lng

Inputs: location, lat_lng, pano_id, radius, +1 more.

get_street_viewA

Fetch a Street View image based on location, coordinates, or panorama ID and save to file.

Args: filename: Required filename to save the image (must not already exist in output directory) location: The address to get Street View image for (e.g., "Empire State Building, NY") lat_lng: Comma-separated latitude and longitude (e.g., "40.748817,-73.985428") pano_id: Specific panorama ID to fetch size: Image dimensions as "widthxheight" (e.g., "600x400") heading: Camera heading in degrees (0-360) pitch: Camera pitch in degrees (-90 to 90) fov: Field of view in degrees (zoom level, 10-120) radius: Search radius in meters when using location or coordinates source: Limit Street View searches to selected sources ("default" or "outdoor")

Returns: Image: The Street View image

Raises: ValueError: If filename already exists in output directory

Inputs: filename (required), location, lat_lng, pano_id, +6 more.

open_image_locallyB

Open a saved Street View image in the default application.

Args: filename: The filename of the image to open (must exist in output directory)

Returns: Dict: A status message indicating success or failure

Raises: ValueError: If the file doesn't exist in the output directory

Inputs: filename (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool has a distinct, non-overlapping purpose: get_metadata retrieves panorama data, get_street_view fetches and saves images, create_html_page compiles images into HTML documents, and open_image_locally opens saved images. The boundaries are clear with no ambiguity between tools.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern: get_metadata, get_street_view, create_html_page, open_image_locally. The naming is uniform and predictable, using clear action verbs followed by descriptive nouns.

    Tool Count5/5

    With 4 tools, this server is well-scoped for Street View functionality. Each tool serves a specific, necessary role in the workflow: metadata retrieval, image acquisition, HTML compilation, and local viewing. No tool feels redundant or missing for the domain.

    Completeness4/5

    The toolset covers the core Street View workflow comprehensively: fetching metadata, acquiring images, creating HTML tours, and viewing images locally. A minor gap exists in lacking direct image manipulation or advanced HTML customization tools, but the basic lifecycle is fully covered without dead ends.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      B
      maintenance
      A 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.
      7
      1,738 npm
      505
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      An AI-powered server that helps users discover and book restaurants based on location, cuisine preferences, mood, and event type, with integration to Google Maps Places API for accurate recommendations.
      5
      16
      MIT
    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      A server that enables AI assistants to control a browser through tools, allowing them to perform web automation tasks like navigation, typing, clicking, and taking screenshots.
      Apache 2.0