Entropic 2.11.1
Local-first agentic inference engine
Loading...
Searching...
No Matches
plugin_server.h File Reference

dlopen-loaded in-process MCP server plugin (gh#133). More...

#include <entropic/interfaces/i_mcp_server.h>
#include <filesystem>
#include <memory>
#include <mutex>
#include <string>
Include dependency graph for plugin_server.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  entropic::PluginServer
 A loaded MCP server plugin and its C-ABI entry points. More...
 

Namespaces

namespace  entropic
 Activate model on GPU (WARM → ACTIVE).
 

Detailed Description

dlopen-loaded in-process MCP server plugin (gh#133).

Owns one plugin .so: the dlopen handle, the resolved C entry points from entropic/interfaces/i_mcp_server.h, and the server instance created through them. Destruction destroys the instance and closes the library, in that order.

Why this is not an MCPServerBase subclass
MCPServerBase::list_tools() and ::execute() are non-virtual — they iterate the server's own ToolRegistry — so an adapter deriving from it could not intercept them, and ServerManager would see an empty registry instead of the plugin's tools. Making them virtual would change the MCPServerBase vtable, which i_mcp_server.h defines as requiring a plugin-API version bump, and would break any consumer already subclassing the exported base.

Instead this mirrors the established ExternalMCPClient pattern: external servers are likewise not MCPServerBase subclasses but a parallel map with their own branch in ServerManager::route_tool_call. Plugins are the third such peer.

Version
2.10.1

Definition in file plugin_server.h.