Cognito-3D-MCP

Cognito-3D-MCP

A local Model Context Protocol server that turns one or more reference images into 3D GLB assets, with pluggable backends for Hunyuan3D-2mv, Stable Fast 3D, and SPAR3D.

Category
访问服务器

README

<p align="center"> <img src="assets/branding/cognito-3d-mcp-brand.png" alt="Cognito-3D-MCP" width="720"> </p>

<p align="center"> <strong>Local image-to-3D generation for MCP clients.</strong><br> Turn one or more reference images into a GLB through a small, model-agnostic tool surface. </p>

Cognito-3D-MCP

Cognito-3D-MCP is a local Model Context Protocol server that gives AI agents a consistent way to create 3D assets from images. It routes each request to one of three generation engines while keeping model files, input images, and generated meshes on your machine.

The server currently integrates Hunyuan3D-2mv as its built-in multiview engine, with optional Stable Fast 3D and SPAR3D adapters for single-image generation.

Why Cognito

  • One tool surface — switch generation engines without changing MCP clients.
  • Multiview input — provide front, left, back, and right references when using the default engine.
  • Local by design — images and generated GLB files remain in paths you control.
  • Backend discovery — clients can inspect which engines are configured before starting a GPU-heavy job.
  • Safe runtime isolation — optional engines run in their own Python environments to avoid native dependency conflicts.
  • Reproducible controls — configure seed, inference steps, guidance, mesh resolution, and texture resolution through the MCP call.

How it works

flowchart LR
    Client["MCP client"] --> Server["Cognito-3D-MCP"]
    Server --> Discover["list_3d_backends"]
    Server --> Generate["generate_3d"]
    Generate --> MV["Hunyuan3D-2mv<br>1–4 views"]
    Generate --> SF3D["Stable Fast 3D<br>1 view"]
    Generate --> SPAR["SPAR3D<br>1 view"]
    MV --> GLB["Local GLB"]
    SF3D --> GLB
    SPAR --> GLB

GPU generation jobs are serialized so multiple MCP calls do not compete for the same device.

Requirements

  • Python 3.10 or newer
  • A PyTorch installation supported by your hardware
  • The dependencies and model access required by the generation engine you intend to use
  • An MCP-compatible client such as Codex, Claude Desktop, or another local host

The default engine is GPU-oriented and normally expects CUDA. Model weights are not stored in this repository.

Install

git clone https://github.com/Lanc3/Cognito-3D-MCP.git
cd Cognito-3D-MCP
python -m pip install -e ".[mcp]"

Copy .env.example into your environment configuration and adjust the paths for your machine. The default settings use the Hunyuan3D-2mv checkpoint:

HUNYUAN3D_MODEL_PATH=tencent/Hunyuan3D-2mv
HUNYUAN3D_SUBFOLDER=hunyuan3d-dit-v2-mv
HUNYUAN3D_VARIANT=fp16
HUNYUAN3D_DEVICE=cuda

HY3D_MCP_OUTPUT_ROOT=outputs/mcp
HY3D_MCP_JOB_TIMEOUT=1800

Run the server over stdio:

cognito-3d-mcp

You can also run it as a Python module:

python -m hy3dgen_mcp.server

Connect an MCP client

Use an absolute repository path in your client configuration:

{
  "mcpServers": {
    "cognito-3d": {
      "command": "python",
      "args": ["-m", "hy3dgen_mcp.server"],
      "cwd": "/absolute/path/to/Cognito-3D-MCP"
    }
  }
}

Restart the client after changing its MCP configuration.

Tools

list_3d_backends

Reports each engine's availability, configuration summary, and whether it is the default. Call this first when the client should choose an engine dynamically.

generate_3d

Creates a GLB from local image files.

Parameter Purpose Default
front_image Absolute path to the required front image Required
backend hunyuan3d, sf3d, or spar3d hunyuan3d
left_image Optional left reference for the multiview engine —
back_image Optional back reference for the multiview engine —
right_image Optional right reference for the multiview engine —
output_dir Destination directory for the generation job Auto-generated
seed Reproducibility seed 12345
steps Inference steps, from 1 to 200 50
guidance_scale Model guidance strength 5.0
octree_resolution Mesh extraction resolution, from 32 to 1024 384
texture_resolution Texture size for supporting engines, from 256 to 4096 1024

Accepted input formats are PNG, JPEG, and WebP. Only the default hunyuan3d engine accepts the optional left, back, and right views. Successful calls return the backend name, output path, input views, and a status message.

Generation engines

Engine Input Integration
Hunyuan3D-2mv 1–4 canonical views Built in and selected by default
Stable Fast 3D Single front image Optional isolated installation
SPAR3D Single front image Optional isolated installation

To enable Stable Fast 3D or SPAR3D, install the engine from its official source in a separate environment, then configure its repository root and Python executable:

SF3D_ROOT=/absolute/path/to/stable-fast-3d
SF3D_PYTHON=/absolute/path/to/sf3d/environment/python

SPAR3D_ROOT=/absolute/path/to/stable-point-aware-3d
SPAR3D_PYTHON=/absolute/path/to/spar3d/environment/python

Cognito-3D-MCP does not download or redistribute those projects or their model weights.

Output

Each job writes mesh.glb into a unique directory under outputs/mcp/ unless output_dir is provided. Generated outputs are excluded from Git by default.

Development

Run the focused MCP test suite with:

python -m unittest discover -s tests -v

See CONTRIBUTING.md for contribution guidance and SECURITY.md for private vulnerability reporting.

License and provenance

Cognito-3D-MCP is built on imported Hunyuan3D inference source and remains subject to the bundled LICENSE and NOTICE. Those terms include use, territory, distribution, and attribution restrictions, so this repository is source-available and is not represented as OSI-approved open source. Optional engines have their own licenses and model-access terms.

See UPSTREAM.md for the exact upstream repository and pinned commit used by this project.

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选