HY3D Global MCP
by yoosful
README.md
# HY3D Global MCP
English MCP server and CLI with **current TokenHub HY3D model discovery** and **legacy Tencent HY 3D Global Pro generation**. Community-maintained, not an official Tencent plugin. Uses hosted APIs; does not run model weights locally.
**Every generation requires an explicit model version. No implicit default, "latest" alias, China-side fallback, or automatic submission retry.**
## Current model catalog and generation support
Last verified: **2026-12-02**, authenticated international TokenHub control-plane query covering the full Vision catalog. Twelve HY3D entries are online. A static documentation list omits Texture 3.6 and the two PolyGen entries, so live discovery filters the `hy-3d-` prefix instead of using a fixed ID allowlist.
| Model ID / API value | API surface | Purpose | International regions | Platform status | This repository |
| --- | --- | --- | --- | --- | --- |
| `hy-3d-3.6` | TokenHub | 3D generation; current detailed guide specifies image input | Singapore | online | Discovery only |
| `hy-3d-3.1` | TokenHub | 3D generation | Singapore, Silicon Valley | online | Discovery only |
| `hy-3d-express` | TokenHub | Express 3D generation | Singapore | online | Discovery only |
| `hy-3d-texture-3.6` | TokenHub | Texture 3.6 | Singapore | online | Discovery only |
| `hy-3d-texture` | TokenHub | Texture generation | Singapore | online | Discovery only |
| `hy-3d-component` | TokenHub | Component splitting | Singapore | online | Discovery only |
| `hy-3d-format` | TokenHub | Format conversion | Singapore | online | Discovery only |
| `hy-3d-retopology` | TokenHub | Retopology | Singapore | online | Discovery only |
| `hy-3d-rigging` | TokenHub | Rigging | Singapore | online | Discovery only |
| `hy-3d-uv` | TokenHub | UV unwrapping | Singapore | online | Discovery only |
| `hy-3d-polygen-image-3.0` | TokenHub | PolyGen Image 3.0, catalog entry | Singapore | online | Discovery only |
| `hy-3d-polygen-mesh-3.0` | TokenHub | PolyGen Mesh 3.0, catalog entry | Singapore | online | Discovery only |
| `3.0` | Legacy Global Pro | Normal, Geometry, LowPoly, Sketch; left/right/back additional views | Singapore, Frankfurt, Silicon Valley | Documented API value; not a TokenHub catalog ID | Generation implemented |
| `3.1` | Legacy Global Pro | Normal, Geometry; seven possible additional view angles | Singapore, Frankfurt, Silicon Valley | Documented API value; not a TokenHub catalog ID | Generation implemented |
Singapore = `ap-singapore`, Silicon Valley = `na-siliconvalley`, Frankfurt = `eu-frankfurt`. These are model access regions, not independent verification of physical inference placement. The packaged catalog stores public model metadata only, not anyone's account activation or quota.
**Online is not account activation.** Live `check_access` additionally reads account endpoints and reports `active_postpaid`, `active_quota_only`, `active_no_confirmed_funding`, `not_activated`, or unsupported-region/model status. It never enables payment, claims free quota or generates a model. API-key restrictions, account balance and successful inference remain unverified.
### Query the current catalog or account readiness
```bash
# Offline, account-neutral snapshot. No credentials or network.
uv run --no-sync hy3d-intl models
# Live platform catalog using the existing international thcli login.
uv run --no-sync hy3d-intl models --live --region ap-singapore
# Also read account activation/funding; no paid inference or account changes.
uv run --no-sync hy3d-intl models --live --check-access --region ap-singapore
# Optional: select an existing thcli profile without changing defaults.
uv run --no-sync hy3d-intl models --live --check-access --profile YOUR_EXISTING_PROFILE
```
Live discovery requires separately installed/authenticated `thcli` on PATH, verified with version 1.0.2. It runs only `models list` and `endpoint list`, with explicit `--site intl` and the requested region, and checks every page. It neither copies credentials nor reads/creates plaintext API keys. Raw endpoint names, account IDs and key fields are not returned. Readiness output contains private account funding information; do not commit or publish it.
### What the generation tool actually calls
The existing generation tool remains on `hunyuan.intl.tencentcloudapi.com`, service `hunyuan`, API version `2023-09-01`. It sends the explicit `Model="3.0"` or `Model="3.1"` value. **It does not call TokenHub 3.6**, and TokenHub IDs are rejected rather than guessed or mapped silently.
The current [TokenHub 3.6 guide](https://www.tencentcloud.com/document/product/1300/86390) uses `https://tokenhub-intl.tencentcloudmaas.com/v1/api/3d/submit` and `/v1/api/3d/query`, bearer API-key authentication, lowercase fields, and `model="hy-3d-3.6"`. That is a different request contract from legacy Global Pro. The summary model list mentions text and images, but the detailed 3.6 submission guide and live catalog input metadata specify images. This repository does not infer text support from the summary or port a generation adapter in a catalog-only update.
The [official submission contract](https://www.tencentcloud.com/document/product/1284/75540) states:
> "Tencent HY 3D Global model version"
> "Defaults to 3.0, with optional choices: 3.0, 3.1"
> "When selecting version 3.1, the [LowPoly] and [Sketch] parameter is unavailable"
The legacy generation adapter deliberately does **not** use that provider default. Omitting `model` fails locally before any network request.
Submission returns `JobId` and `RequestId`. The [query contract](https://www.tencentcloud.com/document/product/1284/75541) returns status, errors, result files and `RequestId`, but **no model field**. A successful live task establishes that the selected request is accepted and runs; it does not independently establish Tencent's internal checkpoint. Do not equate these API versions with an open-weight repository or claim a checkpoint match.
Each result separates:
- `provider_response`: unchanged provider fields, including future fields.
- `request_evidence`: requested model, endpoint, API version, region, action, JobId, RequestId and a canonical-request SHA-256. No prompt or image contents are stored in this evidence.
- `provider_reported_model`: null for the documented response; never inferred from the requested model.
API version `2023-09-01` is the API contract identifier, not the selected model version. Request regions are `ap-singapore` (default), `eu-frankfurt` and `na-siliconvalley`, per the [common-parameter contract](https://www.tencentcloud.com/document/api/1284/75534). They are not claims about physical inference placement.
## Install
Requires Python 3.11+ and [uv](https://docs.astral.sh/uv/).
From this repository directory:
```bash
uv sync --locked --no-dev
uv run --no-sync hy3d-intl capabilities
uv run --no-sync hy3d-intl check-config
```
Use the isolated environment. The China and international SDK distributions share the `tencentcloud` Python namespace and must not be mixed in one environment. The application rejects a client whose endpoint/version/service do not match the international contract.
## Credentials
Supply credentials in the launching process environment:
```bash
export TENCENTCLOUD_SECRET_ID='your-international-account-secret-id'
export TENCENTCLOUD_SECRET_KEY='your-international-account-secret-key'
# Optional, for temporary credentials:
# export TENCENTCLOUD_TOKEN='your-session-token'
# Optional, default ap-singapore:
# export TENCENTCLOUD_REGION='ap-singapore'
# Optional per-request timeout, 1 to 120 seconds, default 30:
# export HY3D_TIMEOUT_SECONDS='30'
```
Prefer temporary, scoped credentials. Do not put real credentials into a repository, MCP config example or shell command arguments. The generation adapter does not load `.env` automatically or read existing CLI credential files. Optional live discovery lets thcli use its existing login independently. Presence checks do not verify CAM permissions, product activation, account eligibility, or available quota.
## MCP setup
STDIO entry point: `hy3d-intl-mcp`. All tool descriptions, argument schemas and errors generated by this package are English. Tencent's raw response is preserved in its original language.
Example client configuration; replace the directory with the actual absolute checkout path:
```json
{
"mcpServers": {
"hy3d-global": {
"command": "uv",
"args": ["run", "--directory", "/absolute/path/hy3d-intl-mcp", "--no-sync", "hy3d-intl-mcp"]
}
}
}
```
The client must inherit the credential environment. If it cannot, use that client's secure credential mechanism. This example does not embed secrets. Nothing in this repository edits or activates the host's MCP configuration.
| Tool | Purpose | Live API call |
| --- | --- | --- |
| `hy3d_list_capabilities` | Legacy versions, current catalog snapshot and evidence limits | No |
| `hy3d_list_models` | Offline catalog or live TokenHub model/account discovery | Optional, read-only |
| `hy3d_check_config` | Credential presence, not authentication/permissions | No |
| `hy3d_preview_generation` | Validate and preview the request, explicit model required | No |
| `hy3d_submit_generation` | Submit one generation task, explicit model required | Yes, potentially billable |
| `hy3d_query_job` | Query the original Global Pro job | Yes, query only |
| `hy3d_wait_job` | Bounded polling of the original job | Yes, query only |
Example preview/submit arguments:
```json
{
"model": "3.1",
"prompt": "A small wooden chair with four legs",
"generate_type": "Normal",
"enable_pbr": true
}
```
Run preview first. Submit only when generation is intended. After submission, retain the full result in the client conversation and query the returned `query_arguments.job_id`. MCP is stateless and does not create local receipt files automatically. Use the CLI when a persistent receipt is required.
## CLI
No credentials or network required for a preview:
```bash
uv run --no-sync hy3d-intl generate --model 3.1 --prompt 'A small wooden chair'
uv run --no-sync hy3d-intl generate --model 3.1 --image-path /absolute/path/reference.png --enable-pbr
```
Explicit submission requires a **new receipt path**. Existing files are never overwritten:
```bash
uv run --no-sync hy3d-intl generate --model 3.1 --prompt 'A small wooden chair' --execute --receipt ./chair-receipt.json
```
The CLI reserves a private receipt before calling the API, then atomically replaces it after writing and syncing the new record. If persistence fails after acceptance, it prints the accepted JobId/RequestId and retains the prepared record; do not resubmit. It does not copy input prompts/images into receipts, and failure records store only safe error metadata. Successful provider fields are unchanged and could contain provider-echoed input. Receipts include result URLs, which may be signed; keep them private. If interrupted or timed out, inspect the original operation before trying again.
Query the JobId from that receipt in the **same region**:
```bash
uv run --no-sync hy3d-intl query ORIGINAL_JOB_ID --region ap-singapore
uv run --no-sync hy3d-intl wait ORIGINAL_JOB_ID --region ap-singapore --max-queries 3 --interval-seconds 10
```
WAIT/RUN are pending. DONE/FAIL are terminal; a failed provider job remains visible and yields a nonzero CLI exit code. `polling_exhausted=true` means still pending, not cancelled. No job cancellation or paid retry is implemented. For MCP polling longer than the default, increase the client's timeout.
Images support exactly one of `image_url`, `image_path` or `image_base64`. Local files must use absolute paths; JPEG/PNG/WebP, 128 to 5000 pixels per side, at most 6 MiB before encoding and 8 MiB after encoding. Additional views use JPEG/PNG, 129 to 4999 pixels. The validator conservatively caps combined additional-view base64 at 8 MiB; public URL contents and their sizes remain provider-validated. Remote URLs must use HTTPS without embedded credentials. Do not combine prompt and image except in model 3.0 Sketch mode.
Use `--multi-view-json` with an array of `{"view":"left","image_url":"https://..."}` objects. Face count accepts the documented 3000 to 1500000 range. PBR with Geometry and polygon type outside LowPoly are rejected rather than silently ignored.
## Scope and verification
Generation implements only the documented **legacy Global Pro submission/query** pair. Discovery covers the current TokenHub catalog and optional account activation. TokenHub 3.6, Express and processing entries are discoverable, but their invocation adapters are not implemented. International catalog availability does not make changing a legacy hostname or model enum sufficient.
Contract sources and the official international SDK establish the model values and routing. Automated tests cover request validation, SDK configuration, exact model serialization, no retries, receipt privacy, English schemas, and a real STDIO MCP session with no live API calls. **No paid live job is part of this repository's verification.** Authenticated TokenHub read-only discovery is verified; legacy generation authentication, API-key scope and actual generated assets remain unverified.
The installed machine-wide CLI action catalog may be older than the API documentation. This package calls the official international SDK directly rather than assuming those CLI actions exist.
## Development
```bash
uv sync --locked
mkdir -p .pytest_cache
uv run pytest --basetemp=.pytest_cache/tmp -q
uv run ruff check .
uv run ruff format --check .
uv build
```
Contract checked: **2026-12-02**. To update, run the live discovery command, replace only public catalog fields in the snapshot, compare the links below and current international SDK, update validation and tests, then run an explicitly authorized live task only if needed. Never replace requested-model evidence with a claim about an unreported backend.
### Sources
- [Current TokenHub model list](https://www.tencentcloud.com/document/product/1300/78934)
- [TokenHub discovery and regional endpoints](https://www.tencentcloud.com/document/product/1300/78941)
- [TokenHub 3.6 invocation contract](https://www.tencentcloud.com/document/product/1300/86390)
- Model-specific official references are embedded in `src/hy3d_intl/model_catalog.json`; newly cataloged PolyGen entries are not treated as verified invocation contracts
- [Global Pro submission and model versions](https://www.tencentcloud.com/document/product/1284/75540)
- [Global Pro query and response fields](https://www.tencentcloud.com/document/product/1284/75541)
- [Common parameters and supported request regions](https://www.tencentcloud.com/document/api/1284/75534)
- [Global data types](https://www.tencentcloud.com/document/api/1284/75542), the per-action 3.1 view list is newer than this page's shorter view enum
- [Official international SDK client](https://github.com/TencentCloud/tencentcloud-sdk-python-intl-en/blob/master/tencentcloud/hunyuan/v20230901/hunyuan_client.py)
- [Official international SDK request/response models](https://github.com/TencentCloud/tencentcloud-sdk-python-intl-en/blob/master/tencentcloud/hunyuan/v20230901/models.py)
MIT license applies to this repository's code, not Tencent's models, services or generated assets. Those remain subject to their own terms.This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues