Skip to content

Conversation

@juan-abia
Copy link

@juan-abia juan-abia commented Dec 20, 2025

Add support for custom package index URLs to allow installing dependencies from private registries. The --index-url CLI option can be repeated multiple times to specify multiple indexes, which are tried in order before PyPI.

Changes:

  • Add --index-url CLI argument with action='append' for multiple indexes
  • Add index_urls parameter to run_mcp_server(), prepare_deno_env(), async_prepare_deno_env(), and code_sandbox()
  • Pass index_urls through Deno/TypeScript layer to micropip.install()
  • Update README with usage examples

Usage:
uvx mcp-run-python --index-url https://private.repo.com/simple --deps pkg stdio

Python API:
async with code_sandbox( dependencies=['pkg'], index_urls=['https://private.repo.com/simple'] ) as sandbox: await sandbox.eval('import pkg')

@juan-abia juan-abia force-pushed the feat/index-url-support branch from 79f12ac to 2e51c0b Compare December 20, 2025 21:29
@juan-abia juan-abia force-pushed the feat/index-url-support branch 2 times, most recently from f4c9b85 to d33a672 Compare December 20, 2025 21:49
Add support for custom package index URLs to allow installing dependencies
from private registries. The --index-url CLI option can be repeated multiple
times to specify multiple indexes, which are tried in order before PyPI.

Changes:
- Add --index-url CLI argument with action='append' for multiple indexes
- Add index_urls parameter to run_mcp_server(), prepare_deno_env(),
  async_prepare_deno_env(), and code_sandbox()
- Pass index_urls through Deno/TypeScript layer to micropip.install()
- Update README with usage examples

Usage:
  uvx mcp-run-python --index-url https://private.repo.com/simple --deps pkg stdio

Python API:
  async with code_sandbox(
      dependencies=['pkg'],
      index_urls=['https://private.repo.com/simple']
  ) as sandbox:
      await sandbox.eval('import pkg')
@juan-abia juan-abia force-pushed the feat/index-url-support branch from d33a672 to 22eb651 Compare December 20, 2025 21:50
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.

1 participant