feat(model): add ServerConfig and ClientConfig (#1266)
This commit is contained in:
parent
fbfc5cc96e
commit
165ff92df1
1 changed files with 331 additions and 303 deletions
|
|
@ -1,6 +1,6 @@
|
|||
use rmcp::{
|
||||
ClientLifecycleMode, ClientServiceExt,
|
||||
model::{InitializeRequestParams, ProtocolVersion, SubscriptionFilter},
|
||||
model::{ClientConfig, ProtocolVersion, SubscriptionFilter},
|
||||
transport::StreamableHttpClientTransport,
|
||||
};
|
||||
|
||||
|
|
@ -13,7 +13,7 @@ async fn main() -> anyhow::Result<()> {
|
|||
.init();
|
||||
|
||||
let transport = StreamableHttpClientTransport::from_uri("http://127.0.0.1:8000/mcp");
|
||||
let client = InitializeRequestParams::default()
|
||||
let client = ClientConfig::default()
|
||||
.serve_with_lifecycle(
|
||||
transport,
|
||||
ClientLifecycleMode::Discover {
|
||||
|
|
|
|||
Loading…
Reference in a new issue