From 69fd63d7d632decc41938ee1a9fa3186602664ff Mon Sep 17 00:00:00 2001 From: Bill Prin Date: Wed, 3 Jun 2026 10:56:13 -0700 Subject: [PATCH] feat: add python-sdk as a built-in SDK runner target Wire modelcontextprotocol/python-sdk into the `conformance sdk` runner alongside typescript-sdk and go-sdk, using the SDK's existing conformance fixtures for both client and server modes. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/sdk-runner/known-sdks.ts | 15 +++++++++++++++ src/sdk-runner/sdk-runner.test.ts | 7 +++++++ 2 files changed, 22 insertions(+) diff --git a/src/sdk-runner/known-sdks.ts b/src/sdk-runner/known-sdks.ts index b6550df1..bcd4bbdc 100644 --- a/src/sdk-runner/known-sdks.ts +++ b/src/sdk-runner/known-sdks.ts @@ -43,6 +43,21 @@ export const KNOWN_SDKS: Record = { command: './.conformance-server -http=:3000', url: 'http://localhost:3000' } + }, + // uv workspace: the `mcp` (client) and `mcp-everything-server` (server) + // packages are both members, so one `uv sync --all-packages` covers both + // modes. Fixtures live in the python-sdk repo (.github/actions/conformance/ + // and examples/servers/everything-server). `--port 3000` matches the url and + // the 3000 convention used above; the server's own default is 3001. + 'python-sdk': { + build: 'uv sync --frozen --all-extras --all-packages', + client: { + command: 'uv run --frozen python .github/actions/conformance/client.py' + }, + server: { + command: 'uv run --frozen mcp-everything-server --port 3000', + url: 'http://localhost:3000/mcp' + } } }; diff --git a/src/sdk-runner/sdk-runner.test.ts b/src/sdk-runner/sdk-runner.test.ts index c58e9931..549df3b2 100644 --- a/src/sdk-runner/sdk-runner.test.ts +++ b/src/sdk-runner/sdk-runner.test.ts @@ -69,6 +69,13 @@ describe('lookupBuiltinConfig', () => { expect(lookupBuiltinConfig('rust-sdk')).toBeNull(); }); + it('exposes python-sdk with both client and server commands', () => { + const py = lookupBuiltinConfig('python-sdk'); + expect(py?.client?.command).toContain('client.py'); + expect(py?.server?.command).toContain('mcp-everything-server'); + expect(py?.server?.url).toBe('http://localhost:3000/mcp'); + }); + it('exposes the typescript-sdk-v1 alias with repo + defaultRef', () => { const v1 = lookupBuiltinConfig('typescript-sdk-v1'); expect(v1?.repo).toBe('typescript-sdk');