The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
feat(mcp): add custom server registration endpoints
Steven Enamakel42685e891eea
diff --git a/src/openhuman/mcp/registry/mod.rs b/src/openhuman/mcp/registry/mod.rsindex e22f64e233..ffac125fa4 100644--- a/src/openhuman/mcp/registry/mod.rs+++ b/src/openhuman/mcp/registry/mod.rs@@ -35,6 +35,8 @@#[cfg(feature = "mcp")]pub mod bus;#[cfg(feature = "mcp")]+pub mod custom;+#[cfg(feature = "mcp")]pub(crate) mod helpers;#[cfg(feature = "mcp")]pub mod ops;diff --git a/src/openhuman/mcp/registry/schemas_part_01.rs b/src/openhuman/mcp/registry/schemas_part_01.rsindex 015c2385f6..2f9ab26168 100644--- a/src/openhuman/mcp/registry/schemas_part_01.rs+++ b/src/openhuman/mcp/registry/schemas_part_01.rs@@ -26,6 +26,8 @@ pub fn all_controller_schemas() -> Vec<ControllerSchema> {schemas("registry_settings_get"),schemas("registry_settings_set"),schemas("set_enabled"),+ schemas("add_custom"),+ schemas("update_custom"),// Setup-agent surface (mcp_setup namespace, lives in setup_ops.rs).setup_schemas("search"),setup_schemas("get"),@@ -102,6 +104,14 @@ pub fn all_registered_controllers() -> Vec<RegisteredController> {schema: schemas("set_enabled"),handler: handle_set_enabled,},+ RegisteredController {+ schema: schemas("add_custom"),+ handler: handle_add_custom,+ },+ RegisteredController {+ schema: schemas("update_custom"),+ handler: handle_update_custom,+ },RegisteredController {schema: setup_schemas("search"),handler: handle_setup_search,diff --git a/src/openhuman/mcp/registry/schemas_part_02.rs b/src/openhuman/mcp/registry/schemas_part_02.rsindex 4af57de06c..7ffb1e9a0a 100644--- a/src/openhuman/mcp/registry/schemas_part_02.rs+++ b/src/openhuman/mcp/registry/schemas_part_02.rs@@ -132,6 +132,45 @@ fn handle_set_enabled(params: Map<String, Value>) -> ControllerFuture {})}+fn custom_input(+ params: &Map<String, Value>,+) -> Result<crate::openhuman::mcp::registry::custom::CustomServerInput, String> {+ Ok(crate::openhuman::mcp::registry::custom::CustomServerInput {+ display_name: read_required(params, "display_name")?,+ transport: read_required(params, "transport")?,+ command: read_optional(params, "command")?,+ args: read_optional(params, "args")?.unwrap_or_default(),+ url: read_optional(params, "url")?,+ env: read_optional(params, "env")?.unwrap_or_default(),+ description: read_optional(params, "description")?,+ })+}++fn handle_add_custom(params: Map<String, Value>) -> ControllerFuture {+ Box::pin(async move {+ let config = config_rpc::load_config_with_timeout().await?;+ let input = custom_input(¶ms)?;+ to_json(+ crate::openhuman::mcp::registry::custom::ops::mcp_clients_add_custom(&config, input)+ .await?,+ )+ })+}++fn handle_update_custom(params: Map<String, Value>) -> ControllerFuture {+ Box::pin(async move {+ let config = config_rpc::load_config_with_timeout().await?;+ let server_id = read_required::<String>(¶ms, "server_id")?;+ let input = custom_input(¶ms)?;+ to_json(+ crate::openhuman::mcp::registry::custom::ops::mcp_clients_update_custom(+ &config, server_id, input,+ )+ .await?,+ )+ })+}+fn handle_status(params: Map<String, Value>) -> ControllerFuture {Box::pin(async move {let _ = params;