Download Source/Plugin/McpServer.h from RAM2118/pluginbridge: direct link, hf CLI and curl.
- Browser
- Download file 1.31 kB
-
https://huggingface.co/RAM2118/pluginbridge/resolve/main/Source/Plugin/McpServer.h
- Command line
-
hf download hf://RAM2118/pluginbridge/Source/Plugin/McpServer.h
-
curl -L -o McpServer.h https://huggingface.co/RAM2118/pluginbridge/resolve/main/Source/Plugin/McpServer.h
1.31 kB
| namespace httplib { class Server; } | |
| class HelperConnection; | |
| class McpServer | |
| { | |
| public: | |
| McpServer(HelperConnection& helper); | |
| ~McpServer(); | |
| void start(); | |
| void stop(); | |
| bool isRunning() const; | |
| int getPort() const { return port; } | |
| // Callbacks set by Processor | |
| std::function<std::string()> getAnalysisCallback; | |
| std::function<std::string()> channelNameCallback; | |
| // Param callbacks — wired to inProcessPlugin when SAFE, null when UNSAFE | |
| std::function<std::string(const std::string& keyword)> searchParamCallback; | |
| std::function<std::string(const std::vector<int>& ids)> getParamsCallback; | |
| std::function<bool(const std::map<int,float>& values)> setParamsCallback; | |
| private: | |
| void setupRoutes(); | |
| std::string handleInitialize(const std::string& requestBody); | |
| std::string handleToolsList(const std::string& requestBody); | |
| std::string handleToolsCall(const std::string& requestBody); | |
| std::unique_ptr<httplib::Server> server; | |
| std::thread serverThread; | |
| std::atomic<bool> running{false}; | |
| int port = 0; | |
| std::string sessionId; | |
| bool initialized = false; | |
| HelperConnection& helper; | |
| }; | |