Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion crates/aingle_cortex/src/mcp/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,14 @@ pub fn mcp_http_router(
allowed_hosts.extend(public_hosts.clone());

// StreamableHttpServerConfig is #[non_exhaustive]; build via Default + builder.
let config = StreamableHttpServerConfig::default().with_allowed_hosts(allowed_hosts);
// Stateless JSON request/response mode: aingle's tools are all request/response
// (no server-initiated notifications), so we don't need the SSE notification
// stream. This also maximizes client compatibility — clients that don't open a
// GET text/event-stream channel (e.g. some HTTP MCP clients) work without 406s.
let config = StreamableHttpServerConfig::default()
.with_allowed_hosts(allowed_hosts)
.with_stateful_mode(false)
.with_json_response(true);
let service = StreamableHttpService::new(
move || Ok(AingleMcp::new(factory_state.clone())),
Arc::new(LocalSessionManager::default()),
Expand Down
Loading