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
|
|
@ -3,7 +3,7 @@ use std::env;
|
|||
use anyhow::{Context, Result};
|
||||
use rmcp::{
|
||||
ServiceExt,
|
||||
model::InitializeRequestParams,
|
||||
model::ClientConfig,
|
||||
transport::{
|
||||
StreamableHttpClientTransport,
|
||||
auth::{AuthClient, ClientCredentialsConfig, OAuthState},
|
||||
|
|
@ -73,7 +73,7 @@ async fn main() -> Result<()> {
|
|||
);
|
||||
|
||||
// Connect to MCP server and list tools
|
||||
let client_service = InitializeRequestParams::default();
|
||||
let client_service = ClientConfig::default();
|
||||
let client = client_service.serve(transport).await?;
|
||||
tracing::info!("Connected to MCP server");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue