pub mod http_sse;
pub mod stdio;
pub mod streamable_http;
use crate::mcp::protocol::{JsonRpcNotification, JsonRpcRequest, JsonRpcResponse, McpNotification};
use anyhow::Result;
use async_trait::async_trait;
use tokio::sync::mpsc;
#[async_trait]
pub trait McpTransport: Send + Sync {
async fn request(&self, request: JsonRpcRequest) -> Result<JsonRpcResponse>;
async fn notify(&self, notification: JsonRpcNotification) -> Result<()>;
fn notifications(&self) -> mpsc::Receiver<McpNotification>;
async fn close(&self) -> Result<()>;
fn is_connected(&self) -> bool;
}