diff --git a/crates/contextforge-data-plane-apis/src/user_store.rs b/crates/contextforge-data-plane-apis/src/user_store.rs index 9cb48f34..eddf8451 100644 --- a/crates/contextforge-data-plane-apis/src/user_store.rs +++ b/crates/contextforge-data-plane-apis/src/user_store.rs @@ -3,17 +3,6 @@ use std::collections::HashMap; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; -#[derive(Debug, Clone, Deserialize, Serialize, JsonSchema, Default)] -pub enum Transport { - #[default] - #[serde(rename = "STREAMABLEHTTP")] - StreamableHttp, - #[serde(rename = "SSE")] - Sse, - #[serde(rename = "STDIO")] - Stdio, -} - #[derive(Debug, Clone, Deserialize, Serialize, JsonSchema, Default)] pub enum IntegrationType { #[serde(rename = "REST")] @@ -27,7 +16,6 @@ pub enum IntegrationType { pub struct BackendMCPGateway { pub name: String, pub url: url::Url, - pub transport: Transport, /// Header names copied from the downstream request onto the upstream connection. pub passthrough_headers: Vec, /// Static headers injected onto the upstream connection (override passthrough). diff --git a/crates/contextforge-data-plane-lib/src/gateway/identifier_routing.rs b/crates/contextforge-data-plane-lib/src/gateway/identifier_routing.rs index ab94523e..c02b9946 100644 --- a/crates/contextforge-data-plane-lib/src/gateway/identifier_routing.rs +++ b/crates/contextforge-data-plane-lib/src/gateway/identifier_routing.rs @@ -182,7 +182,6 @@ mod tests { "79fabb70-2188-4de8-95ed-dc1e976e14d4": { "name": "compliance_reference", "url": "http://upstream:9000/mcp", - "transport": "STREAMABLEHTTP", "passthrough_headers": [], "allowed_tool_names": ["get_stats", "echo"], "tool_name_aliases": { @@ -214,7 +213,6 @@ mod tests { "compliance-reference": { "name": "compliance_reference", "url": "http://upstream:9000/mcp", - "transport": "STREAMABLEHTTP", "passthrough_headers": [], "allowed_tool_names": ["get_stats"], "allowed_resource_names": [], @@ -223,7 +221,6 @@ mod tests { "other": { "name": "other", "url": "http://other:9000/mcp", - "transport": "STREAMABLEHTTP", "passthrough_headers": [], "allowed_tool_names": [], "allowed_resource_names": [], diff --git a/crates/contextforge-data-plane-lib/src/gateway/list_aggregation.rs b/crates/contextforge-data-plane-lib/src/gateway/list_aggregation.rs index 001ea53f..deeb2430 100644 --- a/crates/contextforge-data-plane-lib/src/gateway/list_aggregation.rs +++ b/crates/contextforge-data-plane-lib/src/gateway/list_aggregation.rs @@ -266,7 +266,6 @@ mod tests { backend_id: { "name": "backend", "url": "http://upstream:9000/mcp", - "transport": "STREAMABLEHTTP", "passthrough_headers": [], "allowed_tool_names": [], "allowed_resource_names": [], diff --git a/crates/contextforge-data-plane-lib/src/gateway/mcp_service/initialization.rs b/crates/contextforge-data-plane-lib/src/gateway/mcp_service/initialization.rs index 3370cac6..705c6c3b 100644 --- a/crates/contextforge-data-plane-lib/src/gateway/mcp_service/initialization.rs +++ b/crates/contextforge-data-plane-lib/src/gateway/mcp_service/initialization.rs @@ -275,8 +275,6 @@ fn is_protected_header(name: &http::HeaderName) -> bool { #[cfg(test)] mod tests { - use contextforge_data_plane_apis::user_store::Transport; - use super::*; #[test] @@ -297,7 +295,6 @@ mod tests { BackendMCPGateway { name: "b".into(), url: "https://upstream.example/mcp".parse().unwrap(), - transport: Transport::default(), passthrough_headers: passthrough.iter().map(|s| (*s).to_owned()).collect(), add_headers: add.iter().map(|(k, v)| ((*k).to_owned(), (*v).to_owned())).collect(), remove_headers: remove.iter().map(|s| (*s).to_owned()).collect(), diff --git a/crates/contextforge-data-plane-lib/tests/gateway_pagination.rs b/crates/contextforge-data-plane-lib/tests/gateway_pagination.rs index f4324ae9..558f98d5 100644 --- a/crates/contextforge-data-plane-lib/tests/gateway_pagination.rs +++ b/crates/contextforge-data-plane-lib/tests/gateway_pagination.rs @@ -4,7 +4,7 @@ use std::{collections::HashMap, sync::Arc}; use contextforge_data_plane_apis::{ User, - user_store::{BackendMCPGateway, Transport, UserConfig, VirtualHost}, + user_store::{BackendMCPGateway, UserConfig, VirtualHost}, }; use contextforge_data_plane_lib::{Config, Gateway, Result, UserConfigStore, UserConfigStoreType}; use rmcp::{ @@ -24,7 +24,6 @@ fn paginating_backend(port: u16) -> BackendMCPGateway { BackendMCPGateway { name: format!("backend-{port}"), url: format!("http://127.0.0.1:{port}/mcp").parse().expect("valid url"), - transport: Transport::default(), passthrough_headers: Vec::new(), add_headers: HashMap::new(), remove_headers: Vec::new(), diff --git a/crates/contextforge-data-plane-lib/tests/support/list_tools_gateway.rs b/crates/contextforge-data-plane-lib/tests/support/list_tools_gateway.rs index af41eb78..074bd9b1 100644 --- a/crates/contextforge-data-plane-lib/tests/support/list_tools_gateway.rs +++ b/crates/contextforge-data-plane-lib/tests/support/list_tools_gateway.rs @@ -2,7 +2,7 @@ use std::{collections::HashMap, net::SocketAddr, sync::Arc}; use contextforge_data_plane_apis::{ User, - user_store::{BackendMCPGateway, Transport, UserConfig, VirtualHost}, + user_store::{BackendMCPGateway, UserConfig, VirtualHost}, }; use contextforge_data_plane_lib::{ Config, Gateway, Result, UpstreamConnectionMode, UserConfigStore, UserConfigStoreType, @@ -215,7 +215,6 @@ fn create_backends(ports: &[u16], with_tls: bool) -> HashMap allowed_tool_names: Vec allowed_resource_names: Vec allowed_prompt_names: Vec ``` -`Transport` currently declares: - -```text -STREAMABLEHTTP -SSE -STDIO -``` +Backend MCP transport is intentionally absent from `UserConfig`. The dataplane +always builds an upstream Streamable HTTP client. The Rust types above are easier to picture as JSON. For a complete, working `UserConfig` document, see the seed request body in @@ -65,7 +59,6 @@ but the distinction should stay explicit: | `VirtualHost.backends` map key | Required. Selects backend session state and becomes the public prefix when a multi-backend identifier has no explicit alias. | | `BackendMCPGateway.url` | Required. Used to build the upstream `StreamableHttpClientTransport`. | | `BackendMCPGateway.name` | Present in the model. Current routing uses the backend map key, not this field, as the namespace. | -| `transport` | Present in the model. Current upstream code always builds a streamable HTTP client transport. | | `passthrough_headers` | Applied during `initialize`: named downstream request headers are copied onto the upstream connection header map. Body-framing (`Content-Length`, `Content-Type`), hop-by-hop, non-standard hop-by-hop (`Proxy-Connection`), and RMCP-reserved headers are silently skipped. Propagation is session-scoped — headers are snapshotted from the initialize request; see note below. | | `add_headers` | Static `{name: value}` headers injected onto the upstream connection after passthrough (override passthrough values). Body-framing, hop-by-hop, non-standard hop-by-hop (`Proxy-Connection`), and RMCP-reserved headers are silently skipped. | | `remove_headers` | Header names stripped from the upstream connection after add (applied last). Body-framing, hop-by-hop, non-standard hop-by-hop (`Proxy-Connection`), and RMCP-reserved headers are silently skipped. | diff --git a/schemas/user_config.json b/schemas/user_config.json index 348bfd58..4025f635 100644 --- a/schemas/user_config.json +++ b/schemas/user_config.json @@ -38,9 +38,6 @@ "type": "string", "format": "uri" }, - "transport": { - "$ref": "#/$defs/Transport" - }, "passthrough_headers": { "description": "Header names copied from the downstream request onto the upstream connection.", "type": "array", @@ -93,20 +90,11 @@ "required": [ "name", "url", - "transport", "passthrough_headers", "allowed_tool_names", "allowed_resource_names", "allowed_prompt_names" ] - }, - "Transport": { - "type": "string", - "enum": [ - "STREAMABLEHTTP", - "SSE", - "STDIO" - ] } } } \ No newline at end of file