Street View MCP
Street View MCP
Ein Model-Client-Protocol (MCP)-Server für die Google Street View API, der es KI-Modellen ermöglicht, Street View-Bilder abzurufen und anzuzeigen und virtuelle Touren zu erstellen.
Verwendung mit Claude Desktop
So verwenden Sie Street View MCP mit Claude Desktop:
Stellen Sie sicher, dass Sie
uvinstalliert haben: UV-InstallationshandbuchKlonen Sie dieses Repository:
git clone https://github.com/vlad-ds/street-view-mcp.git cd street-view-mcpInstallieren Sie Abhängigkeiten:
uv pip install -e ".[dev]"Holen Sie sich einen Google Maps API-Schlüssel (Anweisungen unten)
Fügen Sie Ihrer Claude Desktop-Datei
claude_desktop_config.jsonFolgendes hinzu:
"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
}
}Nach der Konfiguration können Sie Street View MCP in Claude Desktop verwenden, indem Sie einfach „/street_view“ eingeben.
Related MCP server: MCP Google Map Server
Überblick
Street View MCP bietet eine einfache Schnittstelle für KI-Modelle, um:
Street View-Bilder nach Adresse, Koordinaten oder Panorama-ID abrufen
Bilder in lokalen Dateien speichern
Gespeicherte Bilder im Standard-Viewer öffnen
Erstellen Sie HTML-Seiten, die mehrere Street View-Bilder zu virtuellen Touren zusammenstellen
Anforderungen
Python 3.9+
Google Maps API-Schlüssel mit aktivierter Street View API
fastmcp-Paketuv-Paketmanager (empfohlen)
Installation
# 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-Schlüssel-Setup
Das Street View MCP erfordert einen Google Maps API-Schlüssel mit aktivierter Street View API:
Besuchen Sie die Google Cloud Console
Erstellen Sie ein neues Projekt oder wählen Sie ein vorhandenes aus
Aktivieren Sie die „Street View Static API“ in der API-Bibliothek
Erstellen Sie einen API-Schlüssel auf der Seite „Anmeldeinformationen“.
Legen Sie den API-Schlüssel als Umgebungsvariable fest:
# 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" > .envVerwendung
Starten des MCP-Servers
python -m street_view_mcp.main --host 127.0.0.1 --port 8000Der Server steht KI-Modellen am angegebenen Host und Port zur Verfügung.
Verwendung als CLI-Tool
# 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.jpgMCP-Tools
Das Street View MCP bietet die folgenden Tools für KI-Modelle:
get_street_view
Ruft ein Street View-Bild basierend auf Standort, Koordinaten oder Panorama-ID ab und speichert es in einer Datei.
{
"filename": "empire_state.jpg",
"location": "Empire State Building, NY",
"size": "600x400",
"heading": 90,
"pitch": 10
}Parameter:
filename(erforderlich): Name zum Speichern des Bildes (darf noch nicht vorhanden sein)location(optional): Adresse, für die das Bild abgerufen werden solllat_lng(optional): Komma-getrennte Koordinaten (zB "40.748817,-73.985428")pano_id(optional): Spezifische Panorama-IDsize(optional): Bildabmessungen als „Breite x Höhe“ (Standard: „600 x 400“)heading(optional): Kamerakurs in Grad (0-360, Standard: 0)pitch(optional): Neigung der Kamera in Grad (-90 bis 90, Standard: 0)fov(optional): Sichtfeld in Grad (10-120, Standard: 90)radius(optional): Suchradius in Metern (Standard: 50)source(optional): Bildquelle („Standard“ oder „Outdoor“, Standard: „Standard“)
Hinweis: Es muss genau einer der folgenden Werte angegeben werden: location , lat_lng oder pano_id .
get_metadata
Ruft Metadaten zu einem Street View-Panorama ab.
{
"location": "Empire State Building, NY"
}Parameter:
Dieselben Standortparameter wie
get_street_viewGibt JSON-Metadaten mit Status, Copyright, Datum, Panorama-ID und Koordinaten zurück
open_image_locally
Öffnet ein gespeichertes Street View-Bild in der Standardanwendung.
{
"filename": "empire_state.jpg"
}Parameter:
filename(erforderlich): Der Dateiname des zu öffnenden Bildes (muss im Ausgabeverzeichnis vorhanden sein)
create_html_page
Erstellt eine HTML-Seite, die mehrere Street View-Bilder als virtuelle Tour anzeigt.
{
"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>"
]
}Parameter:
html_elements(erforderlich): Liste der HTML-Inhaltselementefilename(erforderlich): Name für die HTML-Dateititle(optional): Seitentitel (Standard: "Street View Tour")
Wichtig: Verwenden Sie beim Referenzieren von Bildern immer den Pfad ../output/filename.jpg .
Erstellen virtueller Touren
Das Street View MCP ermöglicht die Erstellung virtueller Touren durch die Kombination mehrerer Street View-Bilder mit beschreibendem Text auf einer HTML-Seite.
Beispielhafter Workflow zum Erstellen einer Tour:
Holen Sie sich Bilder von verschiedenen Standorten:
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")Erstellen Sie eine HTML-Tourseite:
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>"
]
)Projektstruktur
street_view_mcp/__init__.py: Paketinitialisierungmain.py: Einstiegspunkt für den MCP-Serverserver.py: MCP-Serverimplementierungstreet_view.py: Kernclient der Street View-API
Wichtige Hinweise
Lokaler Speicher : Dieses Tool speichert alle Street View-Bilder und HTML-Dateien lokal im Verzeichnis
output/Keine automatische Bereinigung : Es gibt keinen integrierten Mechanismus zum Löschen gespeicherter Dateien
Manuelle Bereinigung : Sie sollten das
output/regelmäßig bereinigen, um Speicherplatz zu verwaltenAPI-Nutzung : Jede Bildanforderung wird auf Ihr Google Maps API-Kontingent angerechnet und kann Kosten verursachen
Entwicklung
Testen
pytestLizenz
MIT
Available Tools
4 toolscreate_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
Scored across 4 tools
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.
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.
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.
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
Related MCP Connectors
The Google Maps MCP server is a fully-managed server provided by the Maps Grounding Lite API that connects AI applications to Google Maps Platform services. It provides three main tools for building LLM applications: searching for places, looking up weather information, and computing routes with details like distance and travel time. The server acts as a proxy that translates Google Maps data into a format that AI applications can understand, enabling agents to accurately answer real-world location and travel queries.
Create immersive travel experiences by instructing an avatar to navigate Google Maps. Report on th…
Place search, routes and spatial reasoning for AI agents, with real-world addresses.
Geospatial AI MCP server — satellite imagery, embeddings, weather, GNS governance
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA server that provides AI-powered image generation, modification, and processing capabilities through the Model Context Protocol, leveraging Google Gemini models and other image services.19MIT
- AlicenseBqualityBmaintenanceA 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,362 npm502MIT
- AlicenseAqualityDmaintenanceAn 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.516MIT
- AlicenseNot gradedqualityNot gradedmaintenanceA 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