mcp_3d_relief

mcp_3d_relief

mcp\_3d\_relief

Category
访问服务器

README

MCP STL 3D Relief Generator

<div align="center">

中文 · Introduction to MCP · Wiki

</div>

This project provides a MCP server that converts 2D images into 3D relief models in STL format, suitable for 3D printing or rendering.

Features

  • Convert any image to a 3D relief model
  • Control model dimensions (width, thickness)
  • Add optional base to the 3D model
  • Invert depth for different relief effects
  • Fast processing with immediate download links

Installation

Prerequisites

  • Python 3.10+
  • uv

Option 1: Local Installation

  1. Clone the repository:
git clone https://github.com/bigchx/mcp_3d_relief.git
cd mcp_3d_relief
  1. Install dependencies:
uv pip sync requirements.txt
  1. Run/Inspect the server:
mcp run server.py
mcp dev server.py

Usage

JSON Configuration

{
  "mcpServers": {
    "mcp_3d_relief": {
      "command": "uv",
      "args": ["--directory", "{fill_in_your_path_here}", "run", "server.py"]
    }
  }
}

MCP Tool Parameters

  • image_path: Local path or web URL to the input image file
  • model_width: Width of the 3D model in mm (default: 50.0)
  • model_thickness: Maximum thickness/height of the 3D model in mm (default: 5.0)
  • base_thickness: Thickness of the base in mm (default: 2.0)
  • skip_depth: Whether to use the image directly or generate a depth map (default: true)
  • invert_depth: Invert the relief (bright areas become low instead of high) (default: false)
  • detail_level: Controls the resolution of the processed image (default: 1.0). At detail_level = 1.0, the image is processed at 320px resolution, producing an STL file typically under 100MB. Higher values improve detail quality but significantly increase both processing time and STL file size. For example, doubling the detail_level can increase file size by 4x or more. Use with caution.

Response

The MCP Tool returns a JSON response with:

{
  "status": "success",
  "depth_map_path": "path/to/yourimage_depth_map.png",
  "stl_path": "path/to/yourimage.stl"
}

Where LLMs can access the generated files from this MCP server, using the provided URLs.

Command Line

You can also use the script directly from the command line to generate a relief model from an image:

python3 relief.py path/to/your/image.jpg

External Depth Map Generation

For higher quality depth maps, you can use external depth map generation services like Depth-Anything-V2. This service can generate more accurate depth maps that you can then use with this project:

  1. Visit https://huggingface.co/spaces/depth-anything/Depth-Anything-V2
  2. Upload your image to generate a depth map
  3. Download the generated depth map
  4. Use this depth map with our converter by setting skip_depth=false

This approach can provide better 3D relief models, especially for complex images.

How It Works

  1. The image is processed to create a depth map (darker pixels = lower, brighter pixels = higher)
  2. The depth map is converted to a 3D mesh with triangular facets
  3. A base is added to the bottom of the model
  4. The model is saved as an STL file

Our partners

<div style="display: flex; justify-content: center; align-items: center; gap: 20px; margin: 30px 0;"> <div style="flex: 1; text-align: center; padding: 15px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); transition: all 0.2s ease-in-out; max-width: 300px; hover:transform: translateY(-5px); hover:box-shadow: 0 6px 16px rgba(0,0,0,0.15);"> <a href="https://www.voxeldance.com/" style="display: block; height: 100%;"> <img src="images/voxeldance.png" alt="voxeldance" style="max-width: 100%; height: auto; object-fit: contain; transition: opacity 0.2s ease-in-out;"> </a> </div> <div style="flex: 1; text-align: center; padding: 15px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); transition: all 0.2s ease-in-out; max-width: 300px; hover:transform: translateY(-5px); hover:box-shadow: 0 6px 16px rgba(0,0,0,0.15);"> <a href="https://www.3dzyk.cn/" style="display: block; height: 100%;"> <img src="images/3dzyk.png" alt="3dzyk" style="max-width: 100%; height: auto; object-fit: contain; transition: opacity 0.2s ease-in-out;"> </a> </div> </div>

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选