dcc-mcp-openusd 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dcc_mcp_openusd-0.1.0/.gitignore +15 -0
- dcc_mcp_openusd-0.1.0/.release-please-manifest.json +3 -0
- dcc_mcp_openusd-0.1.0/CHANGELOG.md +12 -0
- dcc_mcp_openusd-0.1.0/LICENSE +21 -0
- dcc_mcp_openusd-0.1.0/PKG-INFO +106 -0
- dcc_mcp_openusd-0.1.0/README.md +72 -0
- dcc_mcp_openusd-0.1.0/justfile +42 -0
- dcc_mcp_openusd-0.1.0/pyproject.toml +102 -0
- dcc_mcp_openusd-0.1.0/release-please-config.json +21 -0
- dcc_mcp_openusd-0.1.0/src/dcc_mcp_openusd/__init__.py +43 -0
- dcc_mcp_openusd-0.1.0/src/dcc_mcp_openusd/__main__.py +5 -0
- dcc_mcp_openusd-0.1.0/src/dcc_mcp_openusd/__version__.py +3 -0
- dcc_mcp_openusd-0.1.0/src/dcc_mcp_openusd/cli.py +51 -0
- dcc_mcp_openusd-0.1.0/src/dcc_mcp_openusd/runtime.py +329 -0
- dcc_mcp_openusd-0.1.0/src/dcc_mcp_openusd/server.py +194 -0
- dcc_mcp_openusd-0.1.0/src/dcc_mcp_openusd/skills/SKILLS_INDEX.md +10 -0
- dcc_mcp_openusd-0.1.0/src/dcc_mcp_openusd/skills/openusd-project/SKILL.md +29 -0
- dcc_mcp_openusd-0.1.0/src/dcc_mcp_openusd/skills/openusd-project/scripts/create_project.py +30 -0
- dcc_mcp_openusd-0.1.0/src/dcc_mcp_openusd/skills/openusd-project/scripts/snapshot_stage.py +29 -0
- dcc_mcp_openusd-0.1.0/src/dcc_mcp_openusd/skills/openusd-project/tools.yaml +65 -0
- dcc_mcp_openusd-0.1.0/src/dcc_mcp_openusd/skills/openusd-stage/SKILL.md +22 -0
- dcc_mcp_openusd-0.1.0/src/dcc_mcp_openusd/skills/openusd-stage/scripts/add_reference.py +30 -0
- dcc_mcp_openusd-0.1.0/src/dcc_mcp_openusd/skills/openusd-stage/scripts/create_stage.py +30 -0
- dcc_mcp_openusd-0.1.0/src/dcc_mcp_openusd/skills/openusd-stage/scripts/define_xform.py +28 -0
- dcc_mcp_openusd-0.1.0/src/dcc_mcp_openusd/skills/openusd-stage/scripts/list_stage.py +31 -0
- dcc_mcp_openusd-0.1.0/src/dcc_mcp_openusd/skills/openusd-stage/tools.yaml +116 -0
- dcc_mcp_openusd-0.1.0/src/dcc_mcp_openusd/skills/openusd-validate/SKILL.md +21 -0
- dcc_mcp_openusd-0.1.0/src/dcc_mcp_openusd/skills/openusd-validate/scripts/package_usdz.py +28 -0
- dcc_mcp_openusd-0.1.0/src/dcc_mcp_openusd/skills/openusd-validate/scripts/validate_stage.py +29 -0
- dcc_mcp_openusd-0.1.0/src/dcc_mcp_openusd/skills/openusd-validate/tools.yaml +50 -0
- dcc_mcp_openusd-0.1.0/tests/test_package_metadata.py +27 -0
- dcc_mcp_openusd-0.1.0/tests/test_runtime.py +62 -0
- dcc_mcp_openusd-0.1.0/tools/lint_skills.py +48 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0 (2026-05-25)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* bootstrap OpenUSD MCP adapter ([03d4931](https://github.com/loonghao/dcc-mcp-openusd/commit/03d4931c2be9325579defd5be9de173babc8a934))
|
|
9
|
+
|
|
10
|
+
## 0.0.0
|
|
11
|
+
|
|
12
|
+
Initial development baseline. `release-please` owns public release versions.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Long Hao
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dcc-mcp-openusd
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: OpenUSD adapter and skills for the DCC Model Context Protocol ecosystem
|
|
5
|
+
Project-URL: Homepage, https://github.com/loonghao/dcc-mcp-openusd
|
|
6
|
+
Project-URL: Repository, https://github.com/loonghao/dcc-mcp-openusd
|
|
7
|
+
Project-URL: Issues, https://github.com/loonghao/dcc-mcp-openusd/issues
|
|
8
|
+
Project-URL: Changelog, https://github.com/loonghao/dcc-mcp-openusd/releases
|
|
9
|
+
Author-email: Long Hao <hal.long@outlook.com>
|
|
10
|
+
License: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: ai,dcc,llm,mcp,model-context-protocol,openusd,usd
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Topic :: Multimedia :: Graphics :: 3D Modeling
|
|
22
|
+
Classifier: Topic :: Multimedia :: Graphics :: 3D Rendering
|
|
23
|
+
Requires-Python: >=3.9
|
|
24
|
+
Requires-Dist: dcc-mcp-core<1.0.0,>=0.17.26
|
|
25
|
+
Provides-Extra: dev
|
|
26
|
+
Requires-Dist: build; extra == 'dev'
|
|
27
|
+
Requires-Dist: pytest>=7.0; extra == 'dev'
|
|
28
|
+
Requires-Dist: pyyaml>=6.0; extra == 'dev'
|
|
29
|
+
Requires-Dist: ruff>=0.8.0; extra == 'dev'
|
|
30
|
+
Requires-Dist: twine; extra == 'dev'
|
|
31
|
+
Provides-Extra: openusd
|
|
32
|
+
Requires-Dist: usd-core<27,>=24.11; extra == 'openusd'
|
|
33
|
+
Description-Content-Type: text/markdown
|
|
34
|
+
|
|
35
|
+
# dcc-mcp-openusd
|
|
36
|
+
|
|
37
|
+
OpenUSD adapter and skills for the DCC Model Context Protocol ecosystem.
|
|
38
|
+
|
|
39
|
+
`dcc-mcp-openusd` runs a headless OpenUSD-oriented MCP server that can create
|
|
40
|
+
portable USD project folders, author simple stages, add references, validate
|
|
41
|
+
stages, and package USDZ-like archives. It is designed to plug into the
|
|
42
|
+
`dcc-mcp-core` gateway and skills-first workflow.
|
|
43
|
+
|
|
44
|
+
## Install
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
pip install dcc-mcp-openusd
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
For full OpenUSD runtime behavior, install the optional Pixar USD bindings:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
pip install "dcc-mcp-openusd[openusd]"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Run
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
dcc-mcp-openusd --port 8765
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Then connect an MCP client to:
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
http://127.0.0.1:8765/mcp
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Bundled Skills
|
|
69
|
+
|
|
70
|
+
The first version ships three bundled skills:
|
|
71
|
+
|
|
72
|
+
| Skill | Purpose |
|
|
73
|
+
| --- | --- |
|
|
74
|
+
| `openusd-project` | Create self-contained project folders and snapshots. |
|
|
75
|
+
| `openusd-stage` | Create stages, list prims, define xforms, and add references. |
|
|
76
|
+
| `openusd-validate` | Validate stage invariants and package a USDZ-style archive. |
|
|
77
|
+
|
|
78
|
+
Agents should follow the normal DCC-MCP flow:
|
|
79
|
+
|
|
80
|
+
1. `search_skills(query="openusd stage")`
|
|
81
|
+
2. `load_skill("openusd-stage")`
|
|
82
|
+
3. Call a typed tool such as `openusd_stage__create_stage`
|
|
83
|
+
4. Validate with `openusd_validate__validate_stage`
|
|
84
|
+
|
|
85
|
+
## Scope
|
|
86
|
+
|
|
87
|
+
This repository is intentionally an adapter/domain-skill package, not a new
|
|
88
|
+
core USD engine. `dcc-mcp-core` remains the shared transport, gateway,
|
|
89
|
+
validation, telemetry, and skill-loading foundation. This package owns
|
|
90
|
+
OpenUSD-specific project semantics, stage authoring tools, validation policy,
|
|
91
|
+
and packaging workflows.
|
|
92
|
+
|
|
93
|
+
## Development
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
pip install -e ".[dev]"
|
|
97
|
+
pytest
|
|
98
|
+
ruff check src tests tools
|
|
99
|
+
python -m build
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Release
|
|
103
|
+
|
|
104
|
+
The repository uses `release-please`. The baseline version is `0.0.0` so the
|
|
105
|
+
first release PR will cut `v0.1.0`. PyPI publishing is wired through the
|
|
106
|
+
`pypi` GitHub environment.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# dcc-mcp-openusd
|
|
2
|
+
|
|
3
|
+
OpenUSD adapter and skills for the DCC Model Context Protocol ecosystem.
|
|
4
|
+
|
|
5
|
+
`dcc-mcp-openusd` runs a headless OpenUSD-oriented MCP server that can create
|
|
6
|
+
portable USD project folders, author simple stages, add references, validate
|
|
7
|
+
stages, and package USDZ-like archives. It is designed to plug into the
|
|
8
|
+
`dcc-mcp-core` gateway and skills-first workflow.
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
pip install dcc-mcp-openusd
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
For full OpenUSD runtime behavior, install the optional Pixar USD bindings:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pip install "dcc-mcp-openusd[openusd]"
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Run
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
dcc-mcp-openusd --port 8765
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Then connect an MCP client to:
|
|
29
|
+
|
|
30
|
+
```text
|
|
31
|
+
http://127.0.0.1:8765/mcp
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Bundled Skills
|
|
35
|
+
|
|
36
|
+
The first version ships three bundled skills:
|
|
37
|
+
|
|
38
|
+
| Skill | Purpose |
|
|
39
|
+
| --- | --- |
|
|
40
|
+
| `openusd-project` | Create self-contained project folders and snapshots. |
|
|
41
|
+
| `openusd-stage` | Create stages, list prims, define xforms, and add references. |
|
|
42
|
+
| `openusd-validate` | Validate stage invariants and package a USDZ-style archive. |
|
|
43
|
+
|
|
44
|
+
Agents should follow the normal DCC-MCP flow:
|
|
45
|
+
|
|
46
|
+
1. `search_skills(query="openusd stage")`
|
|
47
|
+
2. `load_skill("openusd-stage")`
|
|
48
|
+
3. Call a typed tool such as `openusd_stage__create_stage`
|
|
49
|
+
4. Validate with `openusd_validate__validate_stage`
|
|
50
|
+
|
|
51
|
+
## Scope
|
|
52
|
+
|
|
53
|
+
This repository is intentionally an adapter/domain-skill package, not a new
|
|
54
|
+
core USD engine. `dcc-mcp-core` remains the shared transport, gateway,
|
|
55
|
+
validation, telemetry, and skill-loading foundation. This package owns
|
|
56
|
+
OpenUSD-specific project semantics, stage authoring tools, validation policy,
|
|
57
|
+
and packaging workflows.
|
|
58
|
+
|
|
59
|
+
## Development
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
pip install -e ".[dev]"
|
|
63
|
+
pytest
|
|
64
|
+
ruff check src tests tools
|
|
65
|
+
python -m build
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Release
|
|
69
|
+
|
|
70
|
+
The repository uses `release-please`. The baseline version is `0.0.0` so the
|
|
71
|
+
first release PR will cut `v0.1.0`. PyPI publishing is wired through the
|
|
72
|
+
`pypi` GitHub environment.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# dcc-mcp-openusd justfile
|
|
2
|
+
|
|
3
|
+
set shell := ["sh", "-cu"]
|
|
4
|
+
set windows-shell := ["pwsh.exe", "-NoProfile", "-Command"]
|
|
5
|
+
|
|
6
|
+
python := "python"
|
|
7
|
+
|
|
8
|
+
@default:
|
|
9
|
+
just --list
|
|
10
|
+
|
|
11
|
+
dev:
|
|
12
|
+
{{python}} -m pip install -e ".[dev]"
|
|
13
|
+
|
|
14
|
+
serve:
|
|
15
|
+
{{python}} -m dcc_mcp_openusd --port 8765
|
|
16
|
+
|
|
17
|
+
test:
|
|
18
|
+
{{python}} -m pytest
|
|
19
|
+
|
|
20
|
+
lint:
|
|
21
|
+
ruff check src tests tools
|
|
22
|
+
|
|
23
|
+
format:
|
|
24
|
+
ruff format src tests tools
|
|
25
|
+
|
|
26
|
+
lint-format:
|
|
27
|
+
ruff format --check src tests tools
|
|
28
|
+
|
|
29
|
+
lint-skills:
|
|
30
|
+
{{python}} tools/lint_skills.py --warnings-as-errors
|
|
31
|
+
|
|
32
|
+
build:
|
|
33
|
+
{{python}} -m build
|
|
34
|
+
|
|
35
|
+
check-dist: build
|
|
36
|
+
{{python}} -m twine check dist/*
|
|
37
|
+
|
|
38
|
+
clean:
|
|
39
|
+
{{python}} -c "import shutil; [shutil.rmtree(p, ignore_errors=True) for p in ['dist', 'build', 'src/dcc_mcp_openusd.egg-info']]"
|
|
40
|
+
|
|
41
|
+
preflight: lint lint-format lint-skills test check-dist
|
|
42
|
+
@echo "preflight passed"
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "dcc-mcp-openusd"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "OpenUSD adapter and skills for the DCC Model Context Protocol ecosystem"
|
|
9
|
+
authors = [{ name = "Long Hao", email = "hal.long@outlook.com" }]
|
|
10
|
+
readme = "README.md"
|
|
11
|
+
license = { text = "MIT" }
|
|
12
|
+
requires-python = ">=3.9"
|
|
13
|
+
keywords = ["openusd", "usd", "mcp", "dcc", "ai", "llm", "model-context-protocol"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 3 - Alpha",
|
|
16
|
+
"Intended Audience :: Developers",
|
|
17
|
+
"License :: OSI Approved :: MIT License",
|
|
18
|
+
"Programming Language :: Python :: 3",
|
|
19
|
+
"Programming Language :: Python :: 3.9",
|
|
20
|
+
"Programming Language :: Python :: 3.10",
|
|
21
|
+
"Programming Language :: Python :: 3.11",
|
|
22
|
+
"Programming Language :: Python :: 3.12",
|
|
23
|
+
"Topic :: Multimedia :: Graphics :: 3D Modeling",
|
|
24
|
+
"Topic :: Multimedia :: Graphics :: 3D Rendering",
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
dependencies = [
|
|
28
|
+
"dcc-mcp-core>=0.17.26,<1.0.0",
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
[project.optional-dependencies]
|
|
32
|
+
openusd = [
|
|
33
|
+
"usd-core>=24.11,<27",
|
|
34
|
+
]
|
|
35
|
+
dev = [
|
|
36
|
+
"build",
|
|
37
|
+
"pytest>=7.0",
|
|
38
|
+
"ruff>=0.8.0",
|
|
39
|
+
"twine",
|
|
40
|
+
"pyyaml>=6.0",
|
|
41
|
+
]
|
|
42
|
+
|
|
43
|
+
[project.urls]
|
|
44
|
+
Homepage = "https://github.com/loonghao/dcc-mcp-openusd"
|
|
45
|
+
Repository = "https://github.com/loonghao/dcc-mcp-openusd"
|
|
46
|
+
Issues = "https://github.com/loonghao/dcc-mcp-openusd/issues"
|
|
47
|
+
Changelog = "https://github.com/loonghao/dcc-mcp-openusd/releases"
|
|
48
|
+
|
|
49
|
+
[project.scripts]
|
|
50
|
+
dcc-mcp-openusd = "dcc_mcp_openusd.cli:main"
|
|
51
|
+
|
|
52
|
+
[project.entry-points."dcc_mcp.adapters"]
|
|
53
|
+
openusd = "dcc_mcp_openusd:OpenUsdMcpServer"
|
|
54
|
+
|
|
55
|
+
[tool.hatch.build.targets.wheel]
|
|
56
|
+
packages = ["src/dcc_mcp_openusd"]
|
|
57
|
+
artifacts = [
|
|
58
|
+
"src/dcc_mcp_openusd/skills/**",
|
|
59
|
+
]
|
|
60
|
+
|
|
61
|
+
[tool.hatch.build.targets.sdist]
|
|
62
|
+
include = [
|
|
63
|
+
"src/dcc_mcp_openusd",
|
|
64
|
+
"tests",
|
|
65
|
+
"tools",
|
|
66
|
+
"README.md",
|
|
67
|
+
"CHANGELOG.md",
|
|
68
|
+
"LICENSE",
|
|
69
|
+
"justfile",
|
|
70
|
+
"release-please-config.json",
|
|
71
|
+
".release-please-manifest.json",
|
|
72
|
+
]
|
|
73
|
+
|
|
74
|
+
[tool.pytest.ini_options]
|
|
75
|
+
testpaths = ["tests"]
|
|
76
|
+
pythonpath = ["src"]
|
|
77
|
+
python_files = ["test_*.py"]
|
|
78
|
+
python_classes = ["Test*"]
|
|
79
|
+
python_functions = ["test_*"]
|
|
80
|
+
addopts = "-v --tb=short"
|
|
81
|
+
|
|
82
|
+
[tool.ruff]
|
|
83
|
+
line-length = 120
|
|
84
|
+
target-version = "py39"
|
|
85
|
+
|
|
86
|
+
[tool.ruff.lint]
|
|
87
|
+
select = ["E", "F", "I", "W", "B", "C4"]
|
|
88
|
+
ignore = [
|
|
89
|
+
"E501",
|
|
90
|
+
"B008",
|
|
91
|
+
]
|
|
92
|
+
|
|
93
|
+
[tool.ruff.lint.isort]
|
|
94
|
+
known-first-party = ["dcc_mcp_openusd"]
|
|
95
|
+
|
|
96
|
+
[tool.ruff.lint.per-file-ignores]
|
|
97
|
+
"tests/*" = ["S101"]
|
|
98
|
+
"src/dcc_mcp_openusd/skills/**/scripts/*.py" = ["E402"]
|
|
99
|
+
|
|
100
|
+
[tool.ruff.format]
|
|
101
|
+
quote-style = "double"
|
|
102
|
+
indent-style = "space"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"packages": {
|
|
3
|
+
".": {
|
|
4
|
+
"release-type": "python",
|
|
5
|
+
"package-name": "dcc-mcp-openusd",
|
|
6
|
+
"changelog-path": "CHANGELOG.md",
|
|
7
|
+
"include-component-in-tag": false,
|
|
8
|
+
"extra-files": [
|
|
9
|
+
{
|
|
10
|
+
"type": "toml",
|
|
11
|
+
"path": "pyproject.toml",
|
|
12
|
+
"jsonpath": "$.project.version"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"type": "generic",
|
|
16
|
+
"path": "src/dcc_mcp_openusd/__version__.py"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"""OpenUSD adapter and skills for DCC MCP Core."""
|
|
2
|
+
|
|
3
|
+
from dcc_mcp_openusd.__version__ import __version__
|
|
4
|
+
from dcc_mcp_openusd.runtime import (
|
|
5
|
+
OpenUsdError,
|
|
6
|
+
add_reference,
|
|
7
|
+
create_project,
|
|
8
|
+
create_stage,
|
|
9
|
+
define_xform,
|
|
10
|
+
list_stage,
|
|
11
|
+
package_usdz,
|
|
12
|
+
snapshot_stage,
|
|
13
|
+
validate_stage,
|
|
14
|
+
)
|
|
15
|
+
from dcc_mcp_openusd.server import (
|
|
16
|
+
DEFAULT_PORT,
|
|
17
|
+
SERVER_NAME,
|
|
18
|
+
OpenUsdMcpServer,
|
|
19
|
+
OpenUsdServerOptions,
|
|
20
|
+
get_server,
|
|
21
|
+
start_server,
|
|
22
|
+
stop_server,
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
__all__ = [
|
|
26
|
+
"__version__",
|
|
27
|
+
"DEFAULT_PORT",
|
|
28
|
+
"OpenUsdError",
|
|
29
|
+
"OpenUsdMcpServer",
|
|
30
|
+
"OpenUsdServerOptions",
|
|
31
|
+
"SERVER_NAME",
|
|
32
|
+
"add_reference",
|
|
33
|
+
"create_project",
|
|
34
|
+
"create_stage",
|
|
35
|
+
"define_xform",
|
|
36
|
+
"get_server",
|
|
37
|
+
"list_stage",
|
|
38
|
+
"package_usdz",
|
|
39
|
+
"snapshot_stage",
|
|
40
|
+
"start_server",
|
|
41
|
+
"stop_server",
|
|
42
|
+
"validate_stage",
|
|
43
|
+
]
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"""Command-line entry point for dcc-mcp-openusd."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import argparse
|
|
6
|
+
import logging
|
|
7
|
+
import sys
|
|
8
|
+
import time
|
|
9
|
+
from typing import Optional
|
|
10
|
+
|
|
11
|
+
from dcc_mcp_openusd import start_server, stop_server
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def main(argv: Optional[list[str]] = None) -> int:
|
|
15
|
+
"""Run the OpenUSD MCP server."""
|
|
16
|
+
parser = argparse.ArgumentParser(description="OpenUSD MCP Server")
|
|
17
|
+
parser.add_argument("--port", type=int, default=8765, help="Port to listen on")
|
|
18
|
+
parser.add_argument("--gateway-port", type=int, default=None, help="Gateway port")
|
|
19
|
+
parser.add_argument("--registry-dir", default=None, help="Optional gateway registry directory")
|
|
20
|
+
parser.add_argument("--project-dir", default=None, help="Optional active OpenUSD project directory")
|
|
21
|
+
parser.add_argument("--metrics", action="store_true", help="Enable Prometheus metrics when supported by core")
|
|
22
|
+
parser.add_argument("--debug", action="store_true", help="Enable debug logging")
|
|
23
|
+
args = parser.parse_args(argv)
|
|
24
|
+
|
|
25
|
+
logging.basicConfig(
|
|
26
|
+
level=logging.DEBUG if args.debug else logging.INFO,
|
|
27
|
+
format="%(asctime)s [%(levelname)s] %(name)s: %(message)s",
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
server = start_server(
|
|
31
|
+
port=args.port,
|
|
32
|
+
gateway_port=args.gateway_port,
|
|
33
|
+
registry_dir=args.registry_dir,
|
|
34
|
+
project_dir=args.project_dir,
|
|
35
|
+
metrics_enabled=args.metrics,
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
print(f"OpenUSD MCP server started: {server.mcp_url}")
|
|
39
|
+
print("Press Ctrl+C to stop...")
|
|
40
|
+
|
|
41
|
+
try:
|
|
42
|
+
while True:
|
|
43
|
+
time.sleep(1)
|
|
44
|
+
except KeyboardInterrupt:
|
|
45
|
+
print("\nShutting down...")
|
|
46
|
+
stop_server()
|
|
47
|
+
return 0
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
if __name__ == "__main__":
|
|
51
|
+
sys.exit(main())
|