refactor: fix error introduced by merge, and reorganize feature (#185)
This commit is contained in:
parent
9a771fb157
commit
5e4e77efa5
4 changed files with 67 additions and 55 deletions
|
|
@ -9,7 +9,8 @@ publish = false
|
|||
[dependencies]
|
||||
rmcp = { path = "../../crates/rmcp", features = [
|
||||
"client",
|
||||
"transport-sse",
|
||||
"transport-sse-client",
|
||||
"reqwest",
|
||||
"transport-streamable-http-client",
|
||||
"transport-child-process",
|
||||
"tower",
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ tokio = { version = "1", features = ["full"] }
|
|||
rmcp = { path = "../../crates/rmcp", features = [
|
||||
"client",
|
||||
"transport-child-process",
|
||||
"transport-sse",
|
||||
"transport-sse-client",
|
||||
] }
|
||||
anyhow = "1.0"
|
||||
serde_json = "1"
|
||||
|
|
|
|||
|
|
@ -7,15 +7,16 @@ edition = "2021"
|
|||
tokio = { version = "1", features = ["full"] }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
reqwest = { version = "0.11", features = ["json"] }
|
||||
reqwest = { version = "0.12", features = ["json"] }
|
||||
anyhow = "1.0"
|
||||
thiserror = "1.0"
|
||||
async-trait = "0.1"
|
||||
futures = "0.3"
|
||||
toml = "0.8"
|
||||
rmcp = { git = "https://github.com/modelcontextprotocol/rust-sdk", features = [
|
||||
rmcp = { workspace = true, features = [
|
||||
"client",
|
||||
"transport-child-process",
|
||||
"transport-sse",
|
||||
"transport-sse-client",
|
||||
"reqwest"
|
||||
], no-default-features = true }
|
||||
clap = { version = "4.0", features = ["derive"] }
|
||||
clap = { version = "4.0", features = ["derive"] }
|
||||
|
|
|
|||
|
|
@ -45,7 +45,8 @@ impl McpServerTransportConfig {
|
|||
pub async fn start(&self) -> Result<RunningService<RoleClient, ()>> {
|
||||
let client = match self {
|
||||
McpServerTransportConfig::Sse { url } => {
|
||||
let transport = rmcp::transport::sse::SseTransport::start(url).await?;
|
||||
let transport =
|
||||
rmcp::transport::sse_client::SseClientTransport::start(url.to_owned()).await?;
|
||||
().serve(transport).await?
|
||||
}
|
||||
McpServerTransportConfig::Stdio {
|
||||
|
|
|
|||
Loading…
Reference in a new issue