The Street View MCP server enables AI models to fetch and display Google Street View imagery and create virtual tours. It provides a simple interface for retrieving images by address, coordinates, or panorama ID, and can compile multiple images into an interactive experience.
uv
package manager (recommended)Clone the repository:
git clone https://github.com/vlad-ds/street-view-mcp.git
cd street-view-mcp
Create and activate a virtual environment:
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
Install dependencies:
uv pip install -e ".[dev]"
You need a Google Maps API key with Street View API enabled:
Visit the Google Cloud Console
Create a new project or select an existing one
Enable the "Street View Static API" in the API Library
Create an API key from the Credentials page
Set the API key as an environment variable:
# 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
Run the server with:
python -m street_view_mcp.main --host 127.0.0.1 --port 8000
To use with Claude Desktop:
Add the following to your Claude Desktop claude_desktop_config.json
file:
"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
}
}
In Claude Desktop, activate Street View functionality by typing "/street_view"
You can also use the tool directly from the command line:
# 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
Fetches and saves a Street View image:
{
"filename": "empire_state.jpg",
"location": "Empire State Building, NY",
"size": "600x400",
"heading": 90,
"pitch": 10
}
Parameters:
filename
(required): Name for saving the imagelocation
(optional): Address to get image forlat_lng
(optional): Coordinates (e.g., "40.748817,-73.985428")pano_id
(optional): Specific panorama IDsize
(optional): Image dimensions as "widthxheight" (default: "600x400")heading
(optional): Camera heading in degrees (0-360, default: 0)pitch
(optional): Camera pitch in degrees (-90 to 90, default: 0)fov
(optional): Field of view in degrees (10-120, default: 90)radius
(optional): Search radius in meters (default: 50)source
(optional): Image source ("default" or "outdoor", default: "default")Note: You must provide exactly one of location
, lat_lng
, or pano_id
.
Fetches metadata about a Street View panorama:
{
"location": "Empire State Building, NY"
}
Returns JSON metadata with status, copyright, date, panorama ID, and coordinates.
Opens a saved image in the default application:
{
"filename": "empire_state.jpg"
}
Creates a virtual tour HTML page:
{
"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>"
]
}
Parameters:
html_elements
(required): List of HTML content elementsfilename
(required): Name for the HTML filetitle
(optional): Page title (default: "Street View Tour")Example workflow for creating a virtual tour:
Fetch images of different locations:
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")
Create an HTML tour page:
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>"
]
)
output/
directoryTo add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "street_view" '{"command":"uv","args":["run","--directory","${workspaceRoot}","mcp","run","src/street_view_mcp/server.py"],"env":{"API_KEY":"${env:API_KEY}"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"street_view": {
"command": "uv",
"args": [
"run",
"--directory",
"${workspaceRoot}",
"mcp",
"run",
"src/street_view_mcp/server.py"
],
"env": {
"API_KEY": "${env:API_KEY}"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"street_view": {
"command": "uv",
"args": [
"run",
"--directory",
"${workspaceRoot}",
"mcp",
"run",
"src/street_view_mcp/server.py"
],
"env": {
"API_KEY": "${env:API_KEY}"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect