Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ jobs:
--url http://127.0.0.1:8002/mcp \
--suite all \
--spec-version 2026-07-28 \
--expected-failures conformance/expected-failures-2026-07-28.yaml \
-o conformance-results

# Extension scenarios are excluded by the --spec-version filter and
Expand Down Expand Up @@ -165,7 +164,6 @@ jobs:
--command "$(pwd)/target/debug/conformance-client" \
--suite all \
--spec-version 2026-07-28 \
--expected-failures conformance/expected-failures-2026-07-28.yaml \
-o conformance-client-results/draft

- name: Run extension client suite (informational)
Expand Down
25 changes: 0 additions & 25 deletions conformance/expected-failures-2026-07-28.yaml

This file was deleted.

30 changes: 22 additions & 8 deletions conformance/src/bin/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ impl ClientHandler for FullClientHandler {

const CIMD_CLIENT_METADATA_URL: &str = "https://conformance-test.local/client-metadata.json";
const REDIRECT_URI: &str = "http://localhost:3000/callback";
const SCOPE_STEP_UP_INITIAL_SCOPES: &[&str] = &["mcp:basic"];
const SCOPE_STEP_UP_ESCALATED_SCOPES: &[&str] = &["mcp:basic", "mcp:write"];

/// Perform the headless OAuth authorization-code flow.
Expand Down Expand Up @@ -320,11 +321,10 @@ async fn run_auth_scope_step_up_client(
server_url: &str,
_ctx: &ConformanceContext,
) -> anyhow::Result<()> {
// First auth
let mut oauth = OAuthState::new(server_url, None).await?;
oauth
.start_authorization_with_metadata_url(
&[],
SCOPE_STEP_UP_INITIAL_SCOPES,
REDIRECT_URI,
Some("conformance-client"),
Some(CIMD_CLIENT_METADATA_URL),
Expand All @@ -351,7 +351,9 @@ async fn run_auth_scope_step_up_client(
StreamableHttpClientTransportConfig::with_uri(server_url),
);

let client = BasicClientHandler.serve(transport).await?;
let client = BasicClientHandler
.serve_with_lifecycle(transport, conformance_lifecycle())
.await?;

let tools = client.list_tools(Default::default()).await?;
tracing::debug!("Listed {} tools", tools.tools.len());
Expand Down Expand Up @@ -398,10 +400,12 @@ async fn run_auth_scope_step_up_client(
auth_client2,
StreamableHttpClientTransportConfig::with_uri(server_url),
);
let client2 = BasicClientHandler.serve(transport2).await?;
let _ = client2
let client2 = BasicClientHandler
.serve_with_lifecycle(transport2, conformance_lifecycle())
.await?;
client2
.call_tool(call_tool_params(tool.name.clone(), args))
.await;
.await?;
client2.cancel().await.ok();
return Ok(());
}
Expand Down Expand Up @@ -859,7 +863,7 @@ async fn run_basic_client(server_url: &str) -> anyhow::Result<()> {
}

async fn run_tools_call_client(server_url: &str, ctx: &ConformanceContext) -> anyhow::Result<()> {
run_tools_call_client_with_lifecycle(server_url, ctx, ClientLifecycleMode::Initialize).await
run_tools_call_client_with_lifecycle(server_url, ctx, conformance_lifecycle()).await
}

async fn run_discover_tools_call_client(
Expand Down Expand Up @@ -930,7 +934,17 @@ fn conformance_protocol_version() -> ProtocolVersion {
std::env::var("MCP_CONFORMANCE_PROTOCOL_VERSION")
.ok()
.and_then(|version| serde_json::from_value(Value::String(version)).ok())
.unwrap_or(ProtocolVersion::V_2026_07_28)
.unwrap_or(ProtocolVersion::V_2025_11_25)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The node module defaults to this in its code for this ENV var

https://github.com/modelcontextprotocol/conformance/blob/da56f6631c83bec2b3b7e40a82f392ae360b790c/src/types.ts#L43

https://github.com/modelcontextprotocol/conformance/blob/da56f6631c83bec2b3b7e40a82f392ae360b790c/src/runner/client.ts#L45

It is set to the new version when the command is run with --spec-version 2026-07-28 so we still have coverage of the new way

}

fn conformance_lifecycle() -> ClientLifecycleMode {
if conformance_protocol_version().as_str() >= ProtocolVersion::V_2026_07_28.as_str() {
ClientLifecycleMode::Discover {
preferred_versions: preferred_protocol_versions(),
}
} else {
ClientLifecycleMode::Initialize
}
}

/// Preferred protocol versions for discover-lifecycle negotiation: the
Expand Down