File size: 3,940 Bytes
ac82876
 
 
 
 
 
 
 
 
 
 
a03d9f0
 
 
 
 
 
ac82876
 
a03d9f0
 
 
 
378d32a
22d5c4a
a03d9f0
d20f583
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a03d9f0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
---
title: SAM3D
emoji: 😻
colorFrom: pink
colorTo: blue
sdk: gradio
sdk_version: 6.0.1
app_file: app.py
pinned: false
license: mit
short_description: Creating and editing 3d models using text prompts
tags:
  - text-to-3d
  - mcp
  - gemini
  - sam-3d
  - building-mcp-track-multimodal
---

# 🎨 Text to 3D – MCP Server

Generate and edit 3D models from text prompts using **Gemini** + **Meta SAM-3D**.

🎬 **Demo:** [[YouTube Link](https://drive.google.com/file/d/1tghBt4iaNEMtUT9Er0UdkfQrsy-3FxD0/view?usp=sharing)]  
πŸ“± **Post:** [[X/LinkedIn Link](https://www.linkedin.com/feed/update/urn:li:activity:7401045673531420672/)]

## πŸ’‘ Use Cases

This tool enables rapid 3D asset creation through natural language:
- **Game Developers** – Quickly prototype 3D assets by describing them ("a medieval sword", "a sci-fi helmet")
- **Designers & Artists** – Generate concept models and iterate with text edits ("make it larger", "change color to gold")
- **E-commerce** – Create product mockups from descriptions for visualization
- **Education** – Generate 3D models for teaching (anatomy, architecture, objects)
- **AI Agents** – Claude/Cursor can autonomously create 3D assets as part of larger workflows via MCP

## πŸš€ Future Scope

- Multi-object scene generation
- Style transfer for 3D models
- Animation support
- Direct 3D file editing without regeneration
- Integration with game engines (Unity/Unreal)

## πŸ—οΈ Architecture

```
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      MCP Protocol      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Claude Desktop β”‚ ◄────────────────────► β”‚   Gradio MCP Server β”‚
β”‚  Cursor / Cline β”‚                        β”‚   (HF Space)        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                      β”‚
                        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                        β–Ό                             β–Ό                             β–Ό
                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                 β”‚   Gemini    β”‚              β”‚   Gemini    β”‚              β”‚   SAM-3D    β”‚
                 β”‚  Generate   │──────────────│    Edit     │──────────────│   (Modal)   β”‚
                 β”‚   Image     β”‚              β”‚  / Remove   β”‚              β”‚  3D Recon   β”‚
                 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```

**Flow:** `Text β†’ Image β†’ Remove BG β†’ Grayscale Mask β†’ SAM-3D β†’ 3D Model (GLB/PLY)`

## πŸ”Œ MCP Tools

| Tool | Description |
|------|-------------|
| `generate_3d` | Text prompt β†’ 3D model |
| `edit_3d` | Edit existing model with text |

### Connect from Claude Desktop

```json
{
  "mcpServers": {
    "text-to-3d": {
      "command": "npx",
      "args": ["mcp-remote", "https://MCP-1st-Birthday-text-to-3d-SAM3D.hf.space/gradio_api/mcp/sse"]
    }
  }
}
```

## πŸ› οΈ Tech Stack

| Component | Purpose |
|-----------|---------|
| Gemini 2.5 Flash | Image generation |
| Gemini 3 Pro | Background removal & editing |
| SAM-3D (Meta) | 3D reconstruction |
| Modal | Serverless GPU |
| Gradio | UI + MCP server |

## πŸ“¦ Outputs

- **GLB** – 3D mesh
- **PLY** – Gaussian splat

---

**Built for [MCP 1st Birthday Hackathon](https://huggingface.co/MCP-1st-Birthday)** πŸŽ‚