Street View MCP
A server that enables AI models to fetch and display Google Street View imagery, allowing users to create virtual tours by viewing streets and landmarks from anywhere.
README
Street View MCP
A Model-Client-Protocol (MCP) server for Google Street View API that enables AI models to fetch and display street view imagery and create virtual tours.
Using with Claude Desktop
To use Street View MCP with Claude Desktop:
- Ensure you have
uvinstalled: UV Installation Guide - Clone this repository:
git clone https://github.com/vlad-ds/street-view-mcp.git cd street-view-mcp - Install dependencies:
uv pip install -e ".[dev]" - Get a Google Maps API key (instructions below)
- Add the following to your Claude Desktop
claude_desktop_config.jsonfile:
"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
}
}
After configuration, you can use Street View MCP in Claude Desktop simply by typing "/street_view".
Overview
Street View MCP provides a simple interface for AI models to:
- Fetch Street View images by address, coordinates, or panorama ID
- Save images to local files
- Open saved images in the default viewer
- Create HTML pages that compile multiple Street View images into virtual tours
Requirements
- Python 3.9+
- Google Maps API key with Street View API enabled
fastmcppackageuvpackage manager (recommended)
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 Key Setup
The Street View MCP requires 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
Usage
Starting the MCP Server
python -m street_view_mcp.main --host 127.0.0.1 --port 8000
The server will be available to AI models at the specified host and port.
Using as a 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.jpg
MCP Tools
The Street View MCP provides the following tools for AI models:
get_street_view
Fetches a Street View image based on location, coordinates, or panorama ID and saves it to a file.
{
"filename": "empire_state.jpg",
"location": "Empire State Building, NY",
"size": "600x400",
"heading": 90,
"pitch": 10
}
Parameters:
filename(required): Name for saving the image (must not already exist)location(optional): Address to get image forlat_lng(optional): Comma-separated 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: Exactly one of location, lat_lng, or pano_id must be provided.
get_metadata
Fetches metadata about a Street View panorama.
{
"location": "Empire State Building, NY"
}
Parameters:
- Same location parameters as
get_street_view - Returns JSON metadata with status, copyright, date, panorama ID, and coordinates
open_image_locally
Opens a saved Street View image in the default application.
{
"filename": "empire_state.jpg"
}
Parameters:
filename(required): The filename of the image to open (must exist in output directory)
create_html_page
Creates an HTML page that displays multiple Street View images as a virtual tour.
{
"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")
Important: When referencing images, always use the path ../output/filename.jpg.
Creating Virtual Tours
The Street View MCP enables creation of virtual tours by combining multiple Street View images with descriptive text in an HTML page.
Example workflow for creating a 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>"
]
)
Project Structure
street_view_mcp/__init__.py: Package initializationmain.py: Entry point for MCP serverserver.py: MCP server implementationstreet_view.py: Core Street View API client
Important Notes
- Local Storage: This tool saves all Street View images and HTML files locally in the
output/directory - No Automatic Cleanup: There is no built-in mechanism to delete saved files
- Manual Cleanup: You should periodically clean up the
output/directory to manage disk space - API Usage: Each image request counts toward your Google Maps API quota and may incur charges
Development
Testing
pytest
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。