65 std::unique_ptr<PluginServer>& out);
84 const std::string&
name()
const {
return name_; }
92 const std::filesystem::path&
path()
const {
return path_; }
108 std::string
execute(
const std::string& tool_name,
109 const std::string& args_json);
129 using version_fn_t = int (*)();
140 using free_fn_t = void (*)(
void*);
180 bool resolve_symbols();
190 void* resolve_one(
const char* symbol_name,
bool&
ok)
const;
198 bool resolve_factory_symbols();
206 bool resolve_instance_symbols();
220 std::string take_string(
char* raw)
const;
222 void* handle_{
nullptr};
223 std::filesystem::path path_;
227 version_fn_t version_fn_{
nullptr};
228 create_fn_t create_fn_{
nullptr};
229 name_fn_t name_fn_{
nullptr};
230 list_tools_fn_t list_tools_fn_{
nullptr};
231 execute_fn_t execute_fn_{
nullptr};
232 configure_fn_t configure_fn_{
nullptr};
233 set_dir_fn_t set_dir_fn_{
nullptr};
234 destroy_fn_t destroy_fn_{
nullptr};
235 free_fn_t free_fn_{
nullptr};
246 mutable std::mutex call_mutex_;
A loaded MCP server plugin and its C-ABI entry points.
static entropic_error_t load(const std::filesystem::path &path, std::unique_ptr< PluginServer > &out)
Load a plugin .so and construct its server instance.
entropic_error_t configure(const std::string &config_json)
Pass configuration to the plugin instance.
const std::filesystem::path & path() const
Path this plugin was loaded from.
const std::string & name() const
Server name, used as the tool-routing prefix.
std::string list_tools() const
List the plugin's tools.
entropic_error_t set_working_dir(const std::string &dir)
Set the plugin's working directory.
std::string execute(const std::string &tool_name, const std::string &args_json)
Execute one of the plugin's tools.
~PluginServer()
Destroy the plugin instance, then close the library.
entropic_error_t
Error codes returned by all C API functions.
Pure C interface contract for MCP server plugins.
struct entropic_mcp_server * entropic_mcp_server_t
Opaque handle to an MCP server instance.
Activate model on GPU (WARM → ACTIVE).
@ ok
Tool dispatched, returned non-empty content.