INNER CODE UNIT · Rust

run_auth_server_migration_client

modelcontextprotocol/rust-sdk · conformance/src/bin/client.rs:603

async fn run_auth_server_migration_client(
    server_url: &str,
    _ctx: &ConformanceContext,
) -> anyhow::Result<()> {
    let store = InMemoryCredentialStore::new();
    let http = reqwest::Client::new();
    let body = json!({"jsonrpc": "2.0", "id": 1, "method": "tools/list", "params": {}});

    let mut token = migration_token(server_url, &store).await?;
    for _ in 0..3 {
        let resp = http
            .post(server_url)
            .header(
                "MCP-Protocol-Version",
                conformance_protocol_version().as_str(),
            )
            .bearer_auth(&token)
            .json(&body)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…