Street View MCP server

Provides a bridge to Google Street View API for fetching and displaying street imagery by address, coordinates, or panorama ID with customizable parameters for virtual exploration and location visualization.
Back to servers
Setup instructions
Provider
Vlad
Release date
May 15, 2025
Language
Go
Stats
4 stars

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.

Installation

Prerequisites

  • Python 3.9+
  • Google Maps API key with Street View API enabled
  • uv package manager (recommended)

Setup Steps

  1. Clone the repository:

    git clone https://github.com/vlad-ds/street-view-mcp.git
    cd street-view-mcp
    
  2. Create and activate a virtual environment:

    uv venv
    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
    
  3. Install dependencies:

    uv pip install -e ".[dev]"
    

API Key Configuration

You need a Google Maps API key with Street View API enabled:

  1. Visit the Google Cloud Console

  2. Create a new project or select an existing one

  3. Enable the "Street View Static API" in the API Library

  4. Create an API key from the Credentials page

  5. 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
    

Usage

Starting the MCP Server

Run the server with:

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

Claude Desktop Integration

To use with Claude Desktop:

  1. 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
      }
    }
    
  2. In Claude Desktop, activate Street View functionality by typing "/street_view"

Command Line Usage

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

MCP Tools

get_street_view

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 image
  • location (optional): Address to get image for
  • lat_lng (optional): Coordinates (e.g., "40.748817,-73.985428")
  • pano_id (optional): Specific panorama ID
  • size (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.

get_metadata

Fetches metadata about a Street View panorama:

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

Returns JSON metadata with status, copyright, date, panorama ID, and coordinates.

open_image_locally

Opens a saved image in the default application:

{
  "filename": "empire_state.jpg"
}

create_html_page

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 elements
  • filename (required): Name for the HTML file
  • title (optional): Page title (default: "Street View Tour")

Creating Virtual Tours

Example workflow for creating a virtual tour:

  1. 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")
    
  2. 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>"
      ]
    )
    

Important Notes

  • All Street View images and HTML files are saved locally in the output/ directory
  • There is no automatic cleanup of saved files; you should periodically manage disk space
  • Each image request counts toward your Google Maps API quota and may incur charges

How to install this MCP server

For Claude Code

To 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.

For Cursor

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.

Adding an MCP server to Cursor globally

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}"
            }
        }
    }
}

Adding an MCP server to a project

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.

How to use the MCP server

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.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.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

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later