Skip to content

Conversation

@antonpk1
Copy link
Collaborator

Summary

Migrates the qr-server Python example to use uv with PEP 723 inline script dependencies, eliminating the need for a separate requirements.txt.

Changes

qr-server

  • server.py: Added #!/usr/bin/env uv run shebang + inline dependencies block
  • package.json: New file with npm scripts (uv run server.py) for run-all.ts integration
  • requirements.txt: Deleted (deps now inline in server.py)
  • README.md: Updated with uv installation and usage instructions
  • widget.html: SDK version bump 0.3.1 → 0.4.0

CI & Testing

  • .github/workflows/ci.yml: Added astral-sh/setup-uv@v5 to e2e job
  • package.json: Docker commands now install uv via curl -LsSf https://astral.sh/uv/install.sh | sh
  • tests/e2e/servers.spec.ts: Added qr-server to test list
  • qr-server.png: New golden screenshot for Playwright tests

Benefits

  1. Simpler Python setup: uv run server.py handles everything - no venv, no pip install
  2. Self-contained: Dependencies declared in the script itself
  3. CI-ready: Works in Docker and GitHub Actions

Testing

  • ✅ Playwright tests pass in Docker
  • ✅ Local npm start works (requires uv installed)

- Replace requirements.txt with inline script dependencies in server.py
- Add package.json with npm scripts for run-all.ts integration
- Update CI workflow to install uv via astral-sh/setup-uv@v5
- Update Docker commands to install uv for e2e tests
- Add Playwright golden screenshot for qr-server
- Update README with uv installation and usage instructions
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 14, 2026

Open in StackBlitz

@modelcontextprotocol/ext-apps

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/ext-apps@272

@modelcontextprotocol/server-basic-react

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/server-basic-react@272

@modelcontextprotocol/server-basic-vanillajs

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/server-basic-vanillajs@272

@modelcontextprotocol/server-budget-allocator

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/server-budget-allocator@272

@modelcontextprotocol/server-cohort-heatmap

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/server-cohort-heatmap@272

@modelcontextprotocol/server-customer-segmentation

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/server-customer-segmentation@272

@modelcontextprotocol/server-map

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/server-map@272

@modelcontextprotocol/server-pdf

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/server-pdf@272

@modelcontextprotocol/server-scenario-modeler

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/server-scenario-modeler@272

@modelcontextprotocol/server-shadertoy

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/server-shadertoy@272

@modelcontextprotocol/server-sheet-music

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/server-sheet-music@272

@modelcontextprotocol/server-system-monitor

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/server-system-monitor@272

@modelcontextprotocol/server-threejs

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/server-threejs@272

@modelcontextprotocol/server-transcript

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/server-transcript@272

@modelcontextprotocol/server-video-resource

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/server-video-resource@272

@modelcontextprotocol/server-wiki-explorer

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/server-wiki-explorer@272

commit: 489d28b

Without a default, the test would fail since text is required.
Uses modelcontextprotocol.io as the default URL.
ochafik
ochafik previously approved these changes Jan 14, 2026
@ochafik
Copy link
Contributor

ochafik commented Jan 14, 2026

Oh, please also update the top-level readme w/ a grid cell / link to the QR folder!

- Add grid-cell.png screenshot for README gallery
- Rename 'QR Server' to 'QR Code Server' everywhere
- Add QR Code (Python) entry to examples table in README
@antonpk1
Copy link
Collaborator Author

Oh, please also update the top-level readme w/ a grid cell / link to the QR folder!

updated!

@antonpk1
Copy link
Collaborator Author

@claude looks ok to you?

uv needs extra time on first run to download Python dependencies
@antonpk1 antonpk1 merged commit be8d725 into main Jan 15, 2026
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants