Skip to main content
Glama

Street View MCP

by vlad-ds

ストリートビューMCP

AI モデルがストリートビュー画像を取得して表示し、バーチャル ツアーを作成できるようにする、Google ストリート ビュー API 用のモデル クライアント プロトコル (MCP) サーバー。

Claude Desktopでの使用

Claude Desktop で Street View MCP を使用するには:

  1. uvがインストールされていることを確認してください: UVインストールガイド
  2. このリポジトリをクローンします:
    git clone https://github.com/vlad-ds/street-view-mcp.git cd street-view-mcp
  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 } }

設定後、「/street_view」と入力するだけで、Claude Desktop で Street View MCP を使用できるようになります。

概要

Street View MCP は、AI モデルに次の機能を提供するシンプルなインターフェースを提供します。

  1. 住所、座標、パノラマ ID でストリートビュー画像を取得します
  2. 画像をローカルファイルに保存する
  3. 保存した画像をデフォルトのビューアで開く
  4. 複数のストリートビュー画像をバーチャルツアーにまとめた HTML ページを作成する

要件

  • Python 3.9以上
  • ストリートビュー API が有効になっている Google マップ 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キーの設定

ストリート ビュー MCP には、ストリート ビュー API が有効になっている Google マップ API キーが必要です。

  1. Google Cloud Consoleにアクセスする
  2. 新しいプロジェクトを作成するか、既存のプロジェクトを選択してください
  3. APIライブラリで「ストリートビュー静的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ツール

ストリートビュー 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 (オプション):画像ソース(「default」または「outdoor」、デフォルト:「default」)

注意: locationlat_lngpano_idのいずれか 1 つを指定する必要があります。

get_metadata

ストリートビューのパノラマに関するメタデータを取得します。

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

パラメータ:

  • get_street_viewと同じ場所パラメータ
  • ステータス、著作権、日付、パノラマID、座標を含むJSONメタデータを返します。

open_image_locally

保存したストリートビュー画像をデフォルトのアプリケーションで開きます。

{ "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を使用してください。

バーチャルツアーの作成

ストリート ビュー MCP を使用すると、HTML ページ内の複数のストリート ビュー画像と説明テキストを組み合わせて、バーチャル ツアーを作成できます。

ツアーを作成するためのワークフローの例:

  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 クライアント

重要な注意事項

  • ローカルストレージ: このツールは、すべてのストリートビュー画像とHTMLファイルをoutput/ディレクトリにローカルに保存します。
  • 自動クリーンアップなし:保存されたファイルを削除する組み込みメカニズムはありません
  • 手動クリーンアップ: ディスクスペースを管理するために、 output/ディレクトリを定期的にクリーンアップする必要があります。
  • API の使用: 各画像リクエストは Google Maps API の割り当てにカウントされ、料金が発生する場合があります。

発達

テスト

pytest

ライセンス

マサチューセッツ工科大学

-
security - not tested
F
license - not found
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

AI モデルが Google ストリートビュー画像を取得して表示できるようにするサーバー。ユーザーはどこからでも道路やランドマークを表示してバーチャル ツアーを作成できます。

  1. Claude Desktopでの使用
    1. 概要
      1. 要件
        1. インストール
          1. APIキーの設定
            1. 使用法
              1. MCPサーバーの起動
              2. CLIツールとして使用する
            2. MCPツール
              1. get_street_view
              2. get_metadata
              3. open_image_locally
              4. create_html_page
            3. バーチャルツアーの作成
              1. プロジェクト構造
                1. 重要な注意事項
                  1. 発達
                    1. テスト
                  2. ライセンス

                    Related MCP Servers

                    • A
                      security
                      F
                      license
                      A
                      quality
                      This server allows AI language models to interact with YouTube content through a standardized interface, providing features such as video and channel information retrieval, transcript management, and playlist operations.
                      Last updated -
                      7
                      130
                      294
                      TypeScript
                      • Linux
                      • Apple
                    • -
                      security
                      A
                      license
                      -
                      quality
                      A server that provides AI-powered image generation, modification, and processing capabilities through the Model Context Protocol, leveraging Google Gemini models and other image services.
                      Last updated -
                      12
                      Python
                      MIT License
                      • Linux
                      • Apple
                    • -
                      security
                      F
                      license
                      -
                      quality
                      A server that enables AI systems to browse, retrieve content from, and interact with web pages through the Model Context Protocol.
                      Last updated -
                    • A
                      security
                      A
                      license
                      A
                      quality
                      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.
                      Last updated -
                      7
                      983
                      63
                      TypeScript
                      MIT License

                    View all related MCP servers

                    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/vlad-ds/street-view-mcp'

                    If you have feedback or need assistance with the MCP directory API, please join our Discord server