MCPcopy
hub / github.com/modelcontextprotocol/python-sdk / test_generates_uv_run_command

Function test_generates_uv_run_command

tests/cli/test_claude.py:71–79  ·  view source on GitHub ↗

Should write a uv run command that invokes mcp run on the resolved file spec.

(config_dir: Path)

Source from the content-addressed store, hash-verified

69
70
71def test_generates_uv_run_command(config_dir: Path):
72 """Should write a uv run command that invokes mcp run on the resolved file spec."""
73 assert update_claude_config(file_spec="server.py:app", server_name="my_server")
74
75 resolved = Path("server.py").resolve()
76 assert _read_server(config_dir, "my_server") == {
77 "command": "/fake/bin/uv",
78 "args": ["run", "--frozen", "--with", "mcp[cli]==1.2.3", "mcp", "run", f"{resolved}:app"],
79 }
80
81
82def test_file_spec_without_object_suffix(config_dir: Path):

Callers

nothing calls this directly

Calls 2

update_claude_configFunction · 0.90
_read_serverFunction · 0.85

Tested by

no test coverage detected