-
Notifications
You must be signed in to change notification settings - Fork 106
MCP #5899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
MCP #5899
Changes from all commits
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
f1d748a
Refactor the UI test engine to make way for MCP.
adalisk-emikhaylov 2f7e1c6
Some more refactoring.
adalisk-emikhaylov bd3ee1a
Update VS projects.
adalisk-emikhaylov b213647
Hopefully fix mac builds.
adalisk-emikhaylov e471719
Merge remote-tracking branch 'origin/master' into mcp
adalisk-emikhaylov 87778f9
Try again.
adalisk-emikhaylov a1e2e27
Add missing header.
adalisk-emikhaylov 1a39ed8
Merge remote-tracking branch 'origin/master' into mcp
adalisk-emikhaylov 7538041
Merge remote-tracking branch 'origin/master' into mcp
adalisk-emikhaylov e4a9a21
Move the MCP server to MeshLib.
adalisk-emikhaylov 68f35e5
Try again.
adalisk-emikhaylov 8e39ecb
Try again.
adalisk-emikhaylov cd1b76c
Try again.
adalisk-emikhaylov db8e762
Try again.
adalisk-emikhaylov 13577ba
Try again.
adalisk-emikhaylov f34dcde
Try again.
adalisk-emikhaylov 4bb88ec
Merge remote-tracking branch 'origin/master' into mcp
adalisk-emikhaylov 826e9b8
Try again.
adalisk-emikhaylov b0a1935
Try again.
adalisk-emikhaylov ac7c5d2
Try again.
adalisk-emikhaylov 24d3bda
Try again.
adalisk-emikhaylov e246fcc
Try again.
adalisk-emikhaylov 1331089
Try again.
adalisk-emikhaylov 8adf23e
Try again.
adalisk-emikhaylov 11bb94e
Try again.
adalisk-emikhaylov 06eaa1b
Merge remote-tracking branch 'origin/master' into mcp
adalisk-emikhaylov dede838
Forgot to change the header in one place.
adalisk-emikhaylov 03b99b2
Address some PR comments.
adalisk-emikhaylov c4e3f06
Move the MCP testing guide to a separate file.
adalisk-emikhaylov c27f5fe
Try again.
adalisk-emikhaylov 0c12532
Address some comments.
adalisk-emikhaylov 037b885
Try again.
adalisk-emikhaylov 68b8d13
More code changes.
adalisk-emikhaylov 4087c37
Try again.
adalisk-emikhaylov a795633
Try again.
adalisk-emikhaylov 367a4fc
Try again.
adalisk-emikhaylov 1acee2c
Try to fix Mac builds.
adalisk-emikhaylov 2cd21d3
Try again.
adalisk-emikhaylov 929d1f6
Try again.
adalisk-emikhaylov 3bf4efc
Try again.
adalisk-emikhaylov d8022ef
Try again.
adalisk-emikhaylov d657351
Try again.
adalisk-emikhaylov 8dc86d2
Again?
adalisk-emikhaylov c86744e
Wrong file.
adalisk-emikhaylov 54d3a72
Try again.
adalisk-emikhaylov 77c9e71
Again.
adalisk-emikhaylov aa7f367
Try again.
adalisk-emikhaylov dab25f9
Try again.
adalisk-emikhaylov 1c67b3e
Merge remote-tracking branch 'origin/master' into mcp
adalisk-emikhaylov 13db44b
Try again.
adalisk-emikhaylov 4ff2cd3
Fix VS builds.
adalisk-emikhaylov ae3d19d
Merge remote-tracking branch 'origin/master' into mcp
adalisk-emikhaylov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # How to test MCP? | ||
|
|
||
| Use "MCP Inspector". Run it with `npx @modelcontextprotocol/inspector`, where `npx` is installed as a part of Node.JS. | ||
|
|
||
| Set: | ||
| * Transport Type = SSE | ||
| * URL = http://localhost:8080/sse | ||
| * Connection Type = Via Proxy (Doesn't work for me without proxy now when we're using the Fastmcpp library, but did work with another library; not sure why.) | ||
|
|
||
| Press `Connect`. | ||
|
|
||
| Press `List Tools` (if grayed out, do `Clear` first). | ||
|
|
||
| Click on your tool. | ||
|
|
||
| On the right panel, set parameters. For some parameter types, it helps to press `Switch to JSON` on the right, then type them as JSON. | ||
|
|
||
| Press `Run Tool`. If you get weird errors, try pressing it again. In some cases, the first press passes stale/empty parameters. | ||
|
|
||
| Then check for validation errors, below this button. | ||
|
|
||
| If it complains that your output doesn't match the schema you specified, paste both the output and the schema (using the `Copy` button in the top-right corner of the code blocks; that copies JSON properly, unlike Ctrl+C in this case) | ||
| into a schema validator, e.g. https://www.jsonschemavalidator.net/ | ||
|
|
||
| **NOTE:** It doesn't seem to validate the input schema (only output schema). Check it by eye. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| #!/bin/false | ||
| # This file is supposed to be sourced. | ||
|
|
||
| [[ ${MR_EMSCRIPTEN_SINGLETHREAD:=} ]] || export MR_EMSCRIPTEN_SINGLETHREAD=0 | ||
| [[ ${MR_EMSCRIPTEN_WASM64:=} ]] || export MR_EMSCRIPTEN_WASM64=0 | ||
|
|
||
| if [[ $OSTYPE == "linux"* && $MR_STATE != "DOCKER_BUILD" ]]; then | ||
| if [ ! -n "$MR_EMSCRIPTEN" ]; then | ||
| read -t 5 -p "Build with emscripten? Press (y) in 5 seconds to build (y/s/l/N) (s - singlethreaded, l - 64-bit)" -rsn 1 | ||
| echo; | ||
| case $REPLY in | ||
| Y|y) | ||
| export MR_EMSCRIPTEN="ON";; | ||
| S|s) | ||
| export MR_EMSCRIPTEN="ON" | ||
| export MR_EMSCRIPTEN_SINGLETHREAD=1;; | ||
| L|l) | ||
| export MR_EMSCRIPTEN="ON" | ||
| export MR_EMSCRIPTEN_WASM64=1;; | ||
| *) | ||
| export MR_EMSCRIPTEN="OFF";; | ||
| esac | ||
| fi | ||
| else | ||
| if [ ! -n "$MR_EMSCRIPTEN" ]; then | ||
| MR_EMSCRIPTEN="OFF" | ||
| fi | ||
| fi | ||
|
|
||
| # Normalize the spelling of some variables. | ||
| if [ $MR_EMSCRIPTEN == "ON" ]; then | ||
| if [[ $MR_EMSCRIPTEN_SINGLE == "ON" ]]; then | ||
| MR_EMSCRIPTEN_SINGLETHREAD=1 | ||
| fi | ||
| if [[ $MR_EMSCRIPTEN_WASM64 == "ON" ]]; then | ||
| MR_EMSCRIPTEN_WASM64=1 | ||
| fi | ||
| fi | ||
|
|
||
| echo "Emscripten ${MR_EMSCRIPTEN}, singlethread ${MR_EMSCRIPTEN_SINGLETHREAD}, 64-bit ${MR_EMSCRIPTEN_WASM64}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| #!/bin/bash | ||
| set -eo pipefail | ||
|
|
||
| SOURCE_DIR="$1" | ||
| BUILD_DIR="${2:-./cpp-httplib_build}" | ||
|
|
||
| CMAKE_OPTIONS="${CMAKE_OPTIONS} \ | ||
| -D HTTPLIB_TEST=OFF \ | ||
| -D HTTPLIB_USE_BROTLI_IF_AVAILABLE=OFF \ | ||
| -D HTTPLIB_USE_OPENSSL_IF_AVAILABLE=OFF \ | ||
| -D HTTPLIB_USE_ZLIB_IF_AVAILABLE=OFF \ | ||
| -D HTTPLIB_USE_ZSTD_IF_AVAILABLE=OFF \ | ||
| " | ||
|
|
||
| cmake -S "${SOURCE_DIR}" -B "${BUILD_DIR}" -D CMAKE_C_FLAGS="${CFLAGS}" ${CMAKE_OPTIONS} | ||
| cmake --build "${BUILD_DIR}" -j `nproc` | ||
| cmake --install "${BUILD_DIR}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| #!/bin/bash | ||
| set -exo pipefail | ||
|
|
||
| SOURCE_DIR="$1" | ||
| BUILD_DIR="${2:-./fastmcpp_build}" | ||
|
|
||
| # Sync those flags with `source/fastmcpp/CMakeLists.txt`. | ||
| CMAKE_OPTIONS="${CMAKE_OPTIONS} \ | ||
| -D FASTMCPP_BUILD_TESTS=OFF \ | ||
| -D FASTMCPP_BUILD_EXAMPLES=OFF \ | ||
| -D FASTMCPP_FETCH_CURL=OFF \ | ||
| -D CMAKE_CXX_FLAGS=-fPIC \ | ||
| " | ||
|
|
||
| cmake -S "${SOURCE_DIR}" -B "${BUILD_DIR}" -D CMAKE_C_FLAGS="${CFLAGS}" ${CMAKE_OPTIONS} | ||
| cmake --build "${BUILD_DIR}" -j `nproc` | ||
| cmake --install "${BUILD_DIR}" |
|
adalisk-emikhaylov marked this conversation as resolved.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| #!/bin/bash | ||
| set -eo pipefail | ||
|
|
||
| SOURCE_DIR="$1" | ||
| BUILD_DIR="${2:-./nlohmann-json_build}" | ||
|
|
||
| CMAKE_OPTIONS="${CMAKE_OPTIONS} \ | ||
| -D JSON_BuildTests=OFF \ | ||
| " | ||
|
|
||
| cmake -S "${SOURCE_DIR}" -B "${BUILD_DIR}" -D CMAKE_C_FLAGS="${CFLAGS}" ${CMAKE_OPTIONS} | ||
| cmake --build "${BUILD_DIR}" -j `nproc` | ||
| cmake --install "${BUILD_DIR}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| project(MRMcp CXX) | ||
|
|
||
| file(GLOB HEADERS "*.h" "*.ipp") | ||
| file(GLOB SOURCES "*.cpp") | ||
|
|
||
| add_library(${PROJECT_NAME} SHARED ${SOURCES} ${HEADERS}) | ||
|
|
||
| target_link_libraries(${PROJECT_NAME} | ||
| PUBLIC | ||
| MRMesh | ||
| ) | ||
|
|
||
| IF(MR_PCH) | ||
| target_precompile_headers(${PROJECT_NAME} REUSE_FROM MRPch) | ||
| ENDIF() | ||
|
|
||
| # On Windows, and on Linux+Vcpkg there is no third-party build script, so add fastmcpp as a subdirectory. | ||
| IF(MESHLIB_USE_VCPKG OR APPLE) | ||
| set(FASTMCPP_DEPS_ADD_SUBDIRECTORY ON) | ||
| add_subdirectory(../fastmcpp fastmcpp) | ||
| target_link_libraries(${PROJECT_NAME} PRIVATE fastmcpp_core) | ||
| target_include_directories(${PROJECT_NAME} PRIVATE | ||
| ${MESHLIB_THIRDPARTY_DIR}/fastmcpp/include | ||
| ${MESHLIB_THIRDPARTY_DIR}/cpp-httplib | ||
| ${MESHLIB_THIRDPARTY_DIR}/nlohmann-json/include | ||
| ) | ||
| ELSE() | ||
| find_package(fastmcpp REQUIRED) | ||
| target_link_libraries(${PROJECT_NAME} PUBLIC fastmcpp::fastmcpp_core) | ||
| ENDIF() | ||
|
|
||
| install( | ||
| TARGETS ${PROJECT_NAME} | ||
| EXPORT ${PROJECT_NAME} | ||
| LIBRARY DESTINATION "${MR_MAIN_LIB_DIR}" | ||
| ARCHIVE DESTINATION "${MR_MAIN_LIB_DIR}" | ||
| RUNTIME DESTINATION "${MR_BIN_DIR}" | ||
| ) | ||
|
|
||
| install( | ||
| FILES ${HEADERS} | ||
| DESTINATION "${MR_INCLUDE_DIR}/${PROJECT_NAME}" | ||
| ) | ||
|
|
||
| install( | ||
| FILES ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}Config.cmake | ||
| DESTINATION ${MR_CONFIG_DIR} | ||
| ) | ||
|
|
||
| install( | ||
| EXPORT ${PROJECT_NAME} | ||
| FILE ${PROJECT_NAME}Targets.cmake | ||
| NAMESPACE MeshLib:: | ||
| DESTINATION ${MR_CONFIG_DIR} | ||
| ) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.