metashape-mcp
by jenkinsm13·★ 21·综合分 45
通过自然语言为Agisoft Metashape摄影测量自动化提供106种工具的MCP服务器。
概述
Metashape MCP Server直接将AI驱动的自动化集成到Agisoft Metashape Professional中,提供对整个摄影测量流程的全面控制。服务器在15个模块中提供106种工具,涵盖从照片对齐到3D模型导出的所有功能,还提供10种实时项目检查资源和6种引导工作流提示。它在Metashape的Python环境中本机运行,同时支持HTTP和stdio传输选项,可处理快速操作和长时间运行的任务而不会出现超时问题。
试试问 AI
装完之后,这里有 8 个你可以让 AI 做的事:
什么时候选它
如果你已经在使用 Agisoft Metashape 进行摄影测量,并希望通过自然语言命令自动化处理工作流程,应选择此 MCP 服务器。
什么时候不要选它
如果你没有 Metashape Professional 许可证,不应选择此服务器,因为它与特定软件紧密集成。
此 server 暴露的工具
从 README 抽取出 12 个工具create_projectCreate a new Metashape project
import_photosImport photos into a Metashape project
align_photosPerform structure-from-motion to align camera positions
build_dense_cloudGenerate a dense point cloud from aligned photos
build_meshGenerate a 3D mesh from the dense point cloud
build_textureApply texture to the 3D mesh
generate_demGenerate a Digital Elevation Model from the dense cloud
create_orthomosaicCreate an orthomosaic from the aligned photos
export_modelExport the 3D model to a specified format
detect_markersdetect coded markers in the photos
set_crsSet the coordinate reference system for the project
execute_scriptExecute custom Python code in Metashape
可对比工具
安装
安装
先决条件
- Agisoft Metashape Professional 2.3+ (带Python 3.12脚本功能)
步骤
- 克隆仓库:
git clone https://github.com/jenkinsm13/metashape-mcp.git- 在Metashape中启动MCP服务器:
- **自动启动(推荐)**:编辑scripts/start_mcp_server.py设置源路径,复制到Metashape的脚本文件夹,然后重启Metashape - **手动启动**:运行工具 > 运行脚本,选择scripts/start_mcp_server.py - **控制台**:打开Python控制台,运行from metashape_mcp.server import start_background; start_background() - **无头模式**:对于远程/CI环境,使用scripts/start_mcp_headless.py
- 在Claude Code的Python中安装FastMCP:
python -c "import sys; print(sys.executable)"
pip install "fastmcp>=2.0.0"- 为Claude Code配置stdio代理:
python proxy.pyClaude Desktop配置
{
"mcpServers": {
"metashape": {
"command": "python",
"args": ["path/to/proxy.py"],
"env": {
"METASHAPE_MCP_PORT": "8765"
}
}
}
}FAQ
- 这与直接使用Metashape的Python API有何不同?
- 您不需要编写Python代码,而是用自然语言描述您想要的内容,AI会生成并执行适当的Metashape脚本。这使得摄影测量处理对非编程人员同样可用。
- 我可以在没有Metashape GUI的情况下运行此服务器吗?
- 可以。服务器支持使用`start_mcp_headless.py`的无头模式,可在没有显示器的远程服务器、虚拟机或CI/CD流水线中进行自动化处理。
- 如果操作超过60秒会发生什么?
- stdio代理没有超时限制,而HTTP传输在60秒后可能超时。这使得像密集点云生成这样的长时间操作可以运行数小时而不会中断。
metashape-mcp 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。