techne-client 0.1.0

A simple, handmade MCP client with streaming support
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::mcp::Bytes;

use futures::channel::mpsc;
use futures::future::BoxFuture;

use std::io;

pub trait Transport {
    fn listen(&self) -> BoxFuture<'static, io::Result<Channel>>;

    fn send(&self, bytes: Bytes) -> BoxFuture<'static, io::Result<Channel>>;
}

pub type Channel = mpsc::Receiver<Bytes>;