From f6de8bc1f27dbb4a9e251846b808e530772fe083 Mon Sep 17 00:00:00 2001 From: Jeremy Schoemaker Date: Fri, 31 Jul 2026 14:50:25 -0500 Subject: [PATCH] feat: add swift-sdk to the built-in SDK matrix Registers modelcontextprotocol/swift-sdk, whose conformance fixtures already exist upstream (Sources/MCPConformance/{Client,Server}, exposed as the mcp-everything-client and mcp-everything-server products) but had no entry here. SwiftPM writes binaries to a per-triple directory and maintains a .build/debug symlink to it, so the fixture paths stay portable across host architectures. The server defaults to port 3001; --port pins it to the 3000 convention the other entries use. Verified locally on macOS 26 / arm64 with Swift 6.2.4: client --suite core 216 passed, 0 failed (baseline check passed) server 67 passed, 2 failed Also swaps the 'unknown SDK' fixture in the tests from swift-sdk to kotlin-sdk, since swift-sdk is no longer unknown. --- src/sdk-runner/known-sdks.ts | 18 ++++++++++++++++++ src/sdk-runner/sdk-runner.test.ts | 14 +++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/src/sdk-runner/known-sdks.ts b/src/sdk-runner/known-sdks.ts index 9c430678..2d906566 100644 --- a/src/sdk-runner/known-sdks.ts +++ b/src/sdk-runner/known-sdks.ts @@ -127,6 +127,24 @@ export const KNOWN_SDKS: Record = { } } }, + // Fixtures live in Sources/MCPConformance/{Client,Server} — the + // mcp-everything-client and mcp-everything-server products, mirroring + // scripts/run-conformance.sh. SwiftPM writes binaries to a per-triple + // directory but also maintains a `.build/debug` symlink pointing at it, so + // the paths below stay portable across host architectures. The server + // defaults to port 3001; `--port` pins it to the 3000 convention used above. + 'swift-sdk': { + build: + 'swift build --product mcp-everything-client && swift build --product mcp-everything-server', + client: { + command: './.build/debug/mcp-everything-client' + }, + server: { + command: './.build/debug/mcp-everything-server --port 3000', + url: 'http://localhost:3000/mcp' + }, + expectedFailures: 'conformance-baseline.yml' + }, // Fixtures live in tests/ModelContextProtocol.ConformanceClient and // tests/ModelContextProtocol.ConformanceServer (requires the .NET 10 SDK, // per global.json); build output goes to the repo-level artifacts/ tree diff --git a/src/sdk-runner/sdk-runner.test.ts b/src/sdk-runner/sdk-runner.test.ts index 7ce0f79b..c352f518 100644 --- a/src/sdk-runner/sdk-runner.test.ts +++ b/src/sdk-runner/sdk-runner.test.ts @@ -74,7 +74,7 @@ describe('lookupBuiltinConfig', () => { }); it('returns null for unknown SDKs', () => { - expect(lookupBuiltinConfig('swift-sdk')).toBeNull(); + expect(lookupBuiltinConfig('kotlin-sdk')).toBeNull(); }); it('exposes python-sdk-v1 with repo + defaultRef + specVersion and both commands', () => { @@ -141,6 +141,18 @@ describe('lookupBuiltinConfig', () => { expect(rs?.server?.url).toBe('http://localhost:3000/mcp'); }); + it('exposes swift-sdk with the SwiftPM everything fixtures', () => { + const sw = lookupBuiltinConfig('swift-sdk'); + expect(sw?.build).toContain('mcp-everything-client'); + expect(sw?.build).toContain('mcp-everything-server'); + // SwiftPM writes to a per-triple dir but keeps a .build/debug symlink to + // it, so these paths stay portable across host architectures. + expect(sw?.client?.command).toBe('./.build/debug/mcp-everything-client'); + // The server defaults to 3001; --port pins it to the 3000 convention. + expect(sw?.server?.command).toContain('--port 3000'); + expect(sw?.server?.url).toBe('http://localhost:3000/mcp'); + }); + it('every built-in entry validates against SdkConfigSchema', () => { for (const [name, cfg] of Object.entries(KNOWN_SDKS)) { expect(() => SdkConfigSchema.parse(cfg), name).not.toThrow();