Skip to content
This repository was archived by the owner on Jan 30, 2026. It is now read-only.

Commit b972ef4

Browse files
committed
docs: update CLI to use --dep instead of --deps
- Update README.md examples to use --dep (repeatable) instead of --deps - Hide --deps from CLI help (argparse.SUPPRESS) - Add DeprecationWarning when --deps is used - Keep --deps working for backwards compatibility
1 parent 87a9ff8 commit b972ef4

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ To use this server, you must have both Python and [Deno](https://deno.com/) inst
3434
The server can be run with `deno` installed using `uvx`:
3535

3636
```bash
37-
uvx mcp-run-python [-h] [--version] [--port PORT] [--deps DEPS] [--index-url URL] {stdio,streamable-http,streamable-http-stateless,example}
37+
uvx mcp-run-python [-h] [--version] [--port PORT] [--dep PKG]... [--index-url URL]... {stdio,streamable-http,streamable-http-stateless,example}
3838
```
3939

4040
where:
@@ -49,7 +49,7 @@ where:
4949
- `streamable-http-stateless` runs the server with [Streamable HTTP MCP transport](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#streamable-http) in stateless mode and does not
5050
support server-to-client notifications
5151
- `example` will run a minimal Python script using `numpy`, useful for checking that the package is working, for the code
52-
to run successfully, you'll need to install `numpy` using `uvx mcp-run-python --deps numpy example`
52+
to run successfully, you'll need to install `numpy` using `uvx mcp-run-python --dep numpy example`
5353

5454
## Usage with Pydantic AI
5555

@@ -172,7 +172,7 @@ Dependencies must be provided when initializing the server so they can be instal
172172
Use `--index-url` to install dependencies from private registries (can be repeated, tried in order before PyPI):
173173

174174
```bash
175-
uvx mcp-run-python --index-url https://private.repo.com/simple --deps mypackage stdio
175+
uvx mcp-run-python --index-url https://private.repo.com/simple --dep mypackage stdio
176176
```
177177

178178
The Python API accepts `index_urls` in `code_sandbox`, `prepare_deno_env`, and `run_mcp_server`. See [micropip documentation](https://micropip.pyodide.org/en/stable/project/api.html#micropip.install) for index URL requirements.

mcp_run_python/_cli.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import argparse
44
import logging
55
import sys
6+
import warnings
67
from collections.abc import Sequence
78

89
from . import __version__
@@ -25,7 +26,7 @@ def cli_logic(args_list: Sequence[str] | None = None) -> int:
2526
parser.add_argument(
2627
'--dep', action='append', dest='dep_list', metavar='PKG', help='Dependency to install (can be repeated)'
2728
)
28-
parser.add_argument('--deps', '--dependencies', help='(Deprecated) Comma separated list of dependencies to install')
29+
parser.add_argument('--deps', '--dependencies', help=argparse.SUPPRESS)
2930
parser.add_argument(
3031
'--index-url',
3132
action='append',
@@ -58,6 +59,11 @@ def cli_logic(args_list: Sequence[str] | None = None) -> int:
5859

5960
deps: list[str] = args.dep_list or []
6061
if args.deps:
62+
warnings.warn(
63+
'--deps is deprecated, use --dep instead (can be repeated)',
64+
DeprecationWarning,
65+
stacklevel=2,
66+
)
6167
deps.extend(args.deps.split(','))
6268
index_urls: list[str] = args.index_urls or []
6369
return_code = run_mcp_server(

0 commit comments

Comments
 (0)