Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

chore(mcp): remove custom server schema and handlers

Steven Enamakele416a336ba2a
diff --git a/src/openhuman/mcp/registry/mod.rs b/src/openhuman/mcp/registry/mod.rs
index ffac125fa4..e22f64e233 100644
--- a/src/openhuman/mcp/registry/mod.rs
+++ b/src/openhuman/mcp/registry/mod.rs
@@ -35,8 +35,6 @@
#[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.rs
index 98fc0eac14..015c2385f6 100644
--- a/src/openhuman/mcp/registry/schemas_part_01.rs
+++ b/src/openhuman/mcp/registry/schemas_part_01.rs
@@ -26,8 +26,6 @@ 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"),
@@ -104,14 +102,6 @@ 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,
@@ -646,10 +636,6 @@ pub fn schemas(function: &str) -> ControllerSchema {
],
},
- "add_custom" => custom_server_schema(false),
-
- "update_custom" => custom_server_schema(true),
-
// Handled by setup_schemas() — surface a clearer error rather than
// falling through to the generic unknown sink.
"setup_search"
@@ -678,77 +664,3 @@ pub fn schemas(function: &str) -> ControllerSchema {
},
}
}
-
-fn custom_server_schema(include_server_id: bool) -> ControllerSchema {
- let mut inputs = vec![
- FieldSchema {
- name: "display_name",
- ty: TypeSchema::String,
- comment: "User-visible name for the hand-entered server.",
- required: true,
- },
- FieldSchema {
- name: "transport",
- ty: TypeSchema::String,
- comment: "Transport: `stdio` or `http_remote`.",
- required: true,
- },
- FieldSchema {
- name: "command",
- ty: TypeSchema::Option(Box::new(TypeSchema::String)),
- comment: "Executable for a stdio server.",
- required: false,
- },
- FieldSchema {
- name: "args",
- ty: TypeSchema::Option(Box::new(TypeSchema::Array(Box::new(TypeSchema::String)))),
- comment: "Arguments for a stdio server.",
- required: false,
- },
- FieldSchema {
- name: "url",
- ty: TypeSchema::Option(Box::new(TypeSchema::String)),
- comment: "HTTP(S) endpoint for an http_remote server.",
- required: false,
- },
- FieldSchema {
- name: "env",
- ty: TypeSchema::Option(Box::new(TypeSchema::Map(Box::new(TypeSchema::String)))),
- comment: "Environment variables or HTTP headers; values are write-only.",
- required: false,
- },
- FieldSchema {
- name: "description",
- ty: TypeSchema::Option(Box::new(TypeSchema::String)),
- comment: "Optional description.",
- required: false,
- },
- ];
- if include_server_id {
- inputs.insert(
- 0,
- FieldSchema {
- name: "server_id",
- ty: TypeSchema::String,
- comment: "UUID of the custom server to edit.",
- required: true,
- },
- );
- }
- ControllerSchema {
- namespace: "mcp_clients",
- function: if include_server_id { "update_custom" } else { "add_custom" },
- description: if include_server_id {
- "Update a hand-entered MCP server."
- } else {
- "Add a hand-entered MCP server."
- },
- inputs,
- outputs: vec![FieldSchema {
- name: "server",
- ty: TypeSchema::Ref("InstalledServer"),
- comment: "The saved server record; secret values are omitted.",
- required: true,
- }],
- }
-}
diff --git a/src/openhuman/mcp/registry/schemas_part_02.rs b/src/openhuman/mcp/registry/schemas_part_02.rs
index 7ffb1e9a0a..4af57de06c 100644
--- a/src/openhuman/mcp/registry/schemas_part_02.rs
+++ b/src/openhuman/mcp/registry/schemas_part_02.rs
@@ -132,45 +132,6 @@ 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(&params)?;
- 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>(&params, "server_id")?;
- let input = custom_input(&params)?;
- 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;