Skip to content

MCP#5899

Open
adalisk-emikhaylov wants to merge 31 commits intomasterfrom
mcp
Open

MCP#5899
adalisk-emikhaylov wants to merge 31 commits intomasterfrom
mcp

Conversation

@adalisk-emikhaylov
Copy link
Copy Markdown
Contributor

No description provided.

@adalisk-emikhaylov adalisk-emikhaylov changed the title MCP preparations MCP Apr 13, 2026
@adalisk-emikhaylov adalisk-emikhaylov added the skip-image-rebuild force to skip docker image rebuild label Apr 14, 2026
Comment on lines +142 to +144
CMAKE_OPTIONS="${MR_CMAKE_OPTIONS}" ${SCRIPT_DIR}/thirdparty/nlohmann-json.sh "$MESHLIB_THIRDPARTY_DIR/nlohmann-json"
# Build cpp-httplib separately. It is header-only, this just installs it. It is a dependency of fastmcpp.
CMAKE_OPTIONS="${MR_CMAKE_OPTIONS}" ${SCRIPT_DIR}/thirdparty/cpp-httplib.sh "$MESHLIB_THIRDPARTY_DIR/cpp-httplib"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could they be parts of the thirdparty/CMakeLists.txt?

Comment thread scripts/build_source.sh
Comment thread scripts/thirdparty/fastmcpp.sh Outdated
export HOME=${RUNNER_TEMP}
git config --global --add safe.directory ${GITHUB_WORKSPACE}
git submodule update --init --recursive --depth 1 thirdparty/imgui thirdparty/mrbind-pybind11 thirdparty/mrbind
git submodule update --init --recursive --depth 1 thirdparty/imgui thirdparty/mrbind-pybind11 thirdparty/mrbind thirdparty/fastmcpp thirdparty/nlohmann-json thirdparty/cpp-httplib
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use nlohmann-json and cpp-httplib versions from vcpkg?

run: |
# Download sub-submodules for certain submodules. We don't recurse above in Checkout to improve build performance. See: https://github.com/actions/checkout/issues/1779
git submodule update --init --recursive --depth 1 thirdparty/mrbind
git submodule update --init --recursive --depth 1 thirdparty/mrbind thirdparty/fastmcpp thirdparty/nlohmann-json thirdparty/cpp-httplib
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use nlohmann-json and cpp-httplib versions from vcpkg?

Comment thread source/MRViewer/MRMcp.cpp Outdated
Comment thread source/MRViewer/MRMcp.cpp Outdated
Comment thread source/MRViewer/MRMcp.cpp Outdated
Comment thread source/MRViewer/MRMcp.cpp Outdated
Comment thread source/MRViewer/MRUITestEngineControl.cpp
@adalisk-emikhaylov adalisk-emikhaylov removed the skip-image-rebuild force to skip docker image rebuild label Apr 15, 2026
Comment thread scripts/thirdparty/nlohmann-json.sh
Comment thread source/MRMcp/MRMcp.h
Comment thread source/MRMcp/MRMcp.h
Comment thread source/MRMcp/MRMcp.h
Comment thread source/MRMcp/MRMcp.h Outdated
Comment thread source/MRMcp/MRMcp.h
// NOTE: Consult `docs/testing_mcp.md` for how to test your tool.
MRMCP_API bool addTool( std::string id, std::string name, std::string desc, Schema::Base inputSchema, Schema::Base outputSchema, ToolFunc func );

[[nodiscard]] MRMCP_API Params getParams() const;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const Params& ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might not be initialized yet, in which case I return default-constructed params.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is Server singleton or we expecting more then one? why store params_ in State while we can store it directly in Server? (in general why have two separate classes?)

Comment thread source/MRMcp/MRMcp.h Outdated
Comment on lines +140 to +142
// Returns true on success, including if the server is already running and you're trying to start it again.
// Stopping always returns true.
MRMCP_API bool setRunning( bool enable );
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just run(bool) ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then run( false ) looks weird to me.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mb toggle(bool on) or enable(bool) (we have enable in other places)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this file also contain addition of default MCP tools?

Comment thread source/MRViewer/MRUITestEngineControl.h Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Join this file wtih MRSetupMCP.cpp?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather keep them separate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants