Token导航 LogoToken导航TokenDH.com
Street View MCP logo
运维云端stdio官方级别未说明来源级核验

Street View MCP

MCP Server

Street View MCP是一个为AI模型提供Google街景图像获取和虚拟导览创建功能的服务器。

工具数

0

提示词数

0

GitHub Stars

7

资源数

0
PythonClaude云端部署Claude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

vlad-ds

提供方

vlad-ds

最后核验

2026/5/17 20:20

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

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

详细介绍

街景MCP

用于谷歌街景API的模型客户端协议(MCP)服务器,使人工智能模型能够获取和显示街景图像并创建虚拟旅游。

与Claude Desktop一起使用

要在Claude Desktop中使用街景MCP:

  1. 确保你有 uv 安装: 紫外线安装指南
  2. 克隆此存储库:
   git clone https://github.com/vlad-ds/street-view-mcp.git
   cd street-view-mcp
  1. 安装依赖项:
   uv pip install -e ".[dev]"
  1. 获取Google Maps API密钥(说明如下)
  2. 将以下内容添加到您的Claude桌面 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中使用街景MCP。

概述

街景MCP为AI模型提供了一个简单的界面,用于:

  1. 按地址、坐标或全景ID获取街景图像
  2. 将图像保存到本地文件
  3. 在默认查看器中打开保存的图像
  4. 创建HTML页面,将多个街景图像编译成虚拟旅游

需求

  • Python 3.9+
  • 启用了街景API的谷歌地图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 Maps API密钥:

  1. 访问 谷歌云控制台
  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 (可选):图像尺寸为“widthxheight”(默认值:“600x400”)
  • heading (可选):相机航向(0-360度,默认值:0)
  • pitch (可选):相机俯仰角度(-90到90,默认值:0)
  • fov (可选):视场度数(10-120,默认值:90)
  • radius (可选):搜索半径(单位:米)(默认值:50)
  • source (可选):图像源(“默认”或“室外”,默认:“默认”)

注:正是其中之一 location, lat_lng,或 pano_id 必须提供。

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": [
    "
New York City Landmarks Tour
",
    "
Explore famous landmarks through Street View images.
",
    "
Empire State Building
",
    "",
    "
350 Fifth Avenue, New York, NY
",
    "
This 102-story Art Deco skyscraper was completed in 1931.
"
  ]
}

参数:

  • 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=[
    "
New York City Landmarks Tour
",
    "
Explore these famous NYC landmarks through Street View images.
",
    
    "
Empire State Building
",
    "",
    "
350 Fifth Avenue, New York, NY
",
    "
An iconic 102-story Art Deco skyscraper in Midtown Manhattan.
",
    
    "
Times Square
",
    "",
    "
Broadway & 7th Avenue, New York, NY
",
    "
Famous for its bright lights, Broadway theaters, and as the site of the annual New Year's Eve ball drop.
",
    
    "
Central Park
",
    "",
    "
Central Park, New York, NY
",
    "
An urban park spanning 843 acres in the heart of Manhattan.
"
  ]
)

项目结构

  • street_view_mcp/

- __init__.py:包初始化 - main.py:MCP服务器的入口点 - server.py:MCP服务器实现 - street_view.py:核心街景API客户端

重要提示

  • 本地存储:此工具将所有街景图像和HTML文件保存在本地 output/ 目录
  • 无自动清理:没有删除已保存文件的内置机制
  • 手动清理:你应该定期清理 output/ 用于管理磁盘空间的目录
  • API使用:每个图像请求都计入您的谷歌地图API配额,并可能产生费用

发展

测试

pytest

许可证

麻省理工学院

目录标签

目录标签

PythonClaude云端部署街景服务本地部署虚拟导览地图APIAI工具

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

api-key

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdioapi-key部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP