wesichain-mcp 0.3.0

Rust-native LLM agents & chains with resumable ReAct workflows
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
//! MCP transport abstraction.

use async_trait::async_trait;

use crate::error::McpError;
use crate::protocol::{JsonRpcRequest, JsonRpcResponse};

/// Low-level JSON-RPC transport used by the MCP client.
#[async_trait]
pub trait McpTransport: Send + Sync {
    async fn send(&self, request: JsonRpcRequest) -> Result<JsonRpcResponse, McpError>;
}