Step that says it's testing HTTP transport:
|
- task: AzurePowershell@5 |
|
displayName: "Run tests (http) - az pwsh" |
|
env: |
|
SYSTEM_ACCESSTOKEN: $(System.AccessToken) |
|
AZURE_MCP_COLLECT_TELEMETRY: 'false' |
|
inputs: |
|
azureSubscription: azure-sdk-tests-public |
|
azurePowerShellVersion: 'LatestVersion' |
|
scriptType: InlineScript |
|
Inline: | |
|
./eng/scripts/Test-Code.ps1 ` |
|
-TestType 'Live' ` |
|
-Path $(PathToTest) ` |
|
-TestResultsPath '$(Build.ArtifactStagingDirectory)/testResults' |
|
|
|
exit $LastExitCode |
|
pwsh: true |
|
workingDirectory: $(Build.SourcesDirectory) |
The step needs to assign a value to the MCP_TEST_TRANSPORT environment variable as per McpTestUtilities.CreateMcpClientAsync()
|
bool useHttp = string.Equals( |
|
Environment.GetEnvironmentVariable("MCP_TEST_TRANSPORT"), |
|
"http", |
|
StringComparison.OrdinalIgnoreCase); |
Stdio setup that prints "MCP client initialized successfully":
|
output?.WriteLine("MCP client initialized successfully"); |
http setup that prints "HTTP test client initialized at {serverUrl}":
|
output?.WriteLine($"HTTP test client initialized at {serverUrl}"); |
Proof that the http job is spitting out setup output from LiveServerFixture along the branch that uses stdio, i.e., MCP client initialized successfully:
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6694418&view=logs&j=5159808d-2ee1-5ad5-3b4c-ac54c933eeca&t=ede6e3df-33c6-5265-3117-059cd58c238d&l=34
Step that says it's testing HTTP transport:
mcp/eng/pipelines/templates/jobs/live-test.yml
Lines 93 to 110 in b9f596c
The step needs to assign a value to the
MCP_TEST_TRANSPORTenvironment variable as perMcpTestUtilities.CreateMcpClientAsync()mcp/core/Microsoft.Mcp.Core/tests/Microsoft.Mcp.Tests/Client/Helpers/McpTestUtilities.cs
Lines 65 to 68 in b9f596c
Stdio setup that prints
"MCP client initialized successfully":mcp/core/Microsoft.Mcp.Core/tests/Microsoft.Mcp.Tests/Client/Helpers/McpTestUtilities.cs
Line 108 in b9f596c
http setup that prints
"HTTP test client initialized at {serverUrl}":mcp/core/Microsoft.Mcp.Core/tests/Microsoft.Mcp.Tests/Client/Helpers/McpTestUtilities.cs
Line 92 in b9f596c
Proof that the http job is spitting out setup output from
LiveServerFixturealong the branch that uses stdio, i.e.,MCP client initialized successfully:https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6694418&view=logs&j=5159808d-2ee1-5ad5-3b4c-ac54c933eeca&t=ede6e3df-33c6-5265-3117-059cd58c238d&l=34