mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-29 08:20:02 -05:00
feat: Add initial MCP Server support
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
#include <iostream>
|
||||
#include <content/command_line_interface.hpp>
|
||||
#include <hex/mcp/client.hpp>
|
||||
|
||||
#include <hex/api/imhex_api/system.hpp>
|
||||
#include <hex/api/imhex_api/hex_editor.hpp>
|
||||
@@ -530,6 +532,14 @@ namespace hex::plugin::builtin {
|
||||
ContentRegistry::Views::setFullScreenView<ViewFullScreenFileInfo>(path);
|
||||
}
|
||||
|
||||
void handleMCPCommand(const std::vector<std::string> &) {
|
||||
mcp::Client client;
|
||||
|
||||
auto result = client.run(std::cin, std::cout);
|
||||
std::fprintf(stderr, "MCP Client disconnected!\n");
|
||||
std::exit(result);
|
||||
}
|
||||
|
||||
|
||||
void registerCommandForwarders() {
|
||||
hex::subcommands::registerSubCommand("open", [](const std::vector<std::string> &args){
|
||||
|
||||
Reference in New Issue
Block a user