Skip to content
Open
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
18 changes: 18 additions & 0 deletions src/sdk-runner/known-sdks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,24 @@ export const KNOWN_SDKS: Record<string, SdkConfig> = {
}
}
},
// 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
Expand Down
14 changes: 13 additions & 1 deletion src/sdk-runner/sdk-runner.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down Expand Up @@ -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();
Expand Down