Skip to content

Commit a81630f

Browse files
MCP (#5899)
* Refactor the UI test engine to make way for MCP. * Some more refactoring. * Update VS projects. * Hopefully fix mac builds. * Try again. * Add missing header. * Move the MCP server to MeshLib. * Try again. * Try again. * Try again. * Try again. * Try again. * Try again. * Try again. * Try again. * Try again. * Try again. * Try again. * Try again. * Try again. * Try again. * Forgot to change the header in one place. * Address some PR comments. * Move the MCP testing guide to a separate file. * Try again. * Address some comments. * Try again. * More code changes. * Try again. * Try again. * Try again. * Try to fix Mac builds. * Try again. * Try again. * Try again. * Try again. * Try again. * Again? * Wrong file. * Try again. * Again. * Try again. * Try again. * Try again. * Fix VS builds.
1 parent 95b32f6 commit a81630f

42 files changed

Lines changed: 1636 additions & 426 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-test-linux-vcpkg.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ jobs:
115115
# related issue: https://github.com/actions/checkout/issues/1779
116116
export HOME=${RUNNER_TEMP}
117117
git config --global --add safe.directory ${GITHUB_WORKSPACE}
118-
git submodule update --init --recursive --depth 1 thirdparty/imgui thirdparty/mrbind-pybind11 thirdparty/mrbind
118+
git submodule update --init --recursive --depth 1 thirdparty/imgui thirdparty/mrbind-pybind11 thirdparty/mrbind thirdparty/fastmcpp thirdparty/nlohmann-json thirdparty/cpp-httplib
119119
120120
- name: Install MRBind
121121
if: ${{ inputs.mrbind || inputs.mrbind_c }}

.github/workflows/build-test-ubuntu-arm64.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ jobs:
9999
run: |
100100
ln -s /usr/local/lib/meshlib-thirdparty-lib/lib ./lib
101101
ln -s /usr/local/lib/meshlib-thirdparty-lib/include ./include
102+
ln -s /usr/local/lib/meshlib-thirdparty-lib/share ./share
102103
103104
- name: Install MRBind
104105
if: ${{ inputs.mrbind || inputs.mrbind_c }}

.github/workflows/build-test-ubuntu-x64.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ jobs:
7878
run: |
7979
ln -s /usr/local/lib/meshlib-thirdparty-lib/lib ./lib
8080
ln -s /usr/local/lib/meshlib-thirdparty-lib/include ./include
81+
ln -s /usr/local/lib/meshlib-thirdparty-lib/share ./share
8182
8283
- name: Install MRBind
8384
if: ${{ inputs.mrbind || inputs.mrbind_c }}

.github/workflows/update-docs-manual.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,12 @@ jobs:
4747
export HOME=${RUNNER_TEMP}
4848
git config --global --add safe.directory '*'
4949
git submodule update --init --recursive --depth 1 thirdparty/imgui thirdparty/eigen thirdparty/parallel-hashmap thirdparty/mrbind-pybind11 thirdparty/mrbind
50-
50+
5151
- name: Install thirdparty libs
5252
run: |
5353
ln -s /usr/local/lib/meshlib-thirdparty-lib/lib ./lib
5454
ln -s /usr/local/lib/meshlib-thirdparty-lib/include ./include
55+
ln -s /usr/local/lib/meshlib-thirdparty-lib/share ./share
5556
5657
- name: Install mrbind
5758
run: scripts/mrbind/install_mrbind_ubuntu.sh

.gitmodules

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,12 @@
7676
[submodule "thirdparty/OpenCTM-git"]
7777
path = thirdparty/OpenCTM-git
7878
url = https://github.com/MeshInspector/OpenCTM.git
79+
[submodule "thirdparty/fastmcpp"]
80+
path = thirdparty/fastmcpp
81+
url = https://github.com/MeshInspector/fastmcpp
82+
[submodule "thirdparty/nlohmann-json"]
83+
path = thirdparty/nlohmann-json
84+
url = https://github.com/nlohmann/json
85+
[submodule "thirdparty/cpp-httplib"]
86+
path = thirdparty/cpp-httplib
87+
url = https://github.com/yhirose/cpp-httplib

.gitpod.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ tasks:
99
init: |
1010
ln -s /usr/local/lib/meshlib-thirdparty-lib/lib ./lib
1111
ln -s /usr/local/lib/meshlib-thirdparty-lib/include ./include
12+
ln -s /usr/local/lib/meshlib-thirdparty-lib/share ./share

CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,14 @@ option(MESHLIB_BUILD_MESHCONV "Build meshconv utility" ON)
5353
option(MESHLIB_BUILD_SYMBOLMESH "Build symbol-to-mesh library" ON)
5454
option(MESHLIB_BUILD_VOXELS "Build voxels library" ON)
5555
option(MESHLIB_BUILD_EXTRA_IO_FORMATS "Build extra IO format support library" ON)
56+
option(MESHLIB_BUILD_MCP "Enable MCP server" ON)
5657
option(MESHLIB_BUILD_GENERATED_C_BINDINGS "Build C bindings (assuming they are already generated)" OFF)
5758
5859
option(MESHLIB_BUILD_MRCUDA "Build MRCuda library" ON)
5960
option(MESHLIB_EXPERIMENTAL_HIP "(experimental) Use HIP toolkit for MRCuda library" OFF)
61+
IF(MR_EMSCRIPTEN)
62+
set(MESHLIB_BUILD_MCP OFF)
63+
ENDIF()
6064
IF(MR_EMSCRIPTEN OR APPLE)
6165
set(MESHLIB_BUILD_MRCUDA OFF)
6266
ENDIF()
@@ -293,6 +297,10 @@ IF(NOT MR_EMSCRIPTEN AND NOT APPLE)
293297
ENDIF()
294298
ENDIF()
295299
300+
IF(MESHLIB_BUILD_MCP AND NOT MR_EMSCRIPTEN)
301+
add_subdirectory(${PROJECT_SOURCE_DIR}/MRMcp ./MRMcp)
302+
ENDIF()
303+
296304
IF(BUILD_TESTING)
297305
enable_testing()
298306
add_subdirectory(${PROJECT_SOURCE_DIR}/MRTest ./MRTest)

cmake/Modules/CompilerOptions.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ ENDIF()
3232
# Warnings and misc compiler settings.
3333
IF(MSVC)
3434
# C++-specific flags.
35-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DImDrawIdx=unsigned /D_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING /D_SILENCE_CXX20_OLD_SHARED_PTR_ATOMIC_SUPPORT_DEPRECATION_WARNING /D_SILENCE_CXX23_ALIGNED_STORAGE_DEPRECATION_WARNING /D_SILENCE_CXX23_DENORM_DEPRECATION_WARNING /D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR")
35+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DImDrawIdx=unsigned /D_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING /D_SILENCE_CXX20_OLD_SHARED_PTR_ATOMIC_SUPPORT_DEPRECATION_WARNING /D_SILENCE_CXX23_ALIGNED_STORAGE_DEPRECATION_WARNING /D_SILENCE_CXX23_DENORM_DEPRECATION_WARNING /D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR")
3636

3737
# Common C/C++ flags:
3838

docker/ubuntu22Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ COPY scripts/mrbind-pybind11/install_all_python_versions_ubuntu_pkgs.sh scripts/
4444

4545
COPY --from=build /home/MeshLib/lib /usr/local/lib/meshlib-thirdparty-lib/lib
4646
COPY --from=build /home/MeshLib/include /usr/local/lib/meshlib-thirdparty-lib/include
47+
COPY --from=build /home/MeshLib/share /usr/local/lib/meshlib-thirdparty-lib/share
4748

4849
ENV MR_STATE=DOCKER_BUILD
4950

docker/ubuntu24Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ COPY scripts/mrbind-pybind11/install_all_python_versions_ubuntu_pkgs.sh scripts/
5252

5353
COPY --from=build /home/MeshLib/lib /usr/local/lib/meshlib-thirdparty-lib/lib
5454
COPY --from=build /home/MeshLib/include /usr/local/lib/meshlib-thirdparty-lib/include
55+
COPY --from=build /home/MeshLib/share /usr/local/lib/meshlib-thirdparty-lib/share
5556
COPY --from=cuda /usr/local/cuda-12.6 /usr/local/cuda-12.6
5657

5758
ENV MR_STATE=DOCKER_BUILD

0 commit comments

Comments
 (0)