solidworks_mcp.setup.launcher¶
solidworks_mcp.setup.launcher ¶
The command a client config runs to start this server.
It is always an absolute path, so the config works no matter where the
client starts it or what its PATH is. Usually it is the launcher in the
environment setup itself runs from. When that environment is a temporary
one in uv's cache (uvx solidworks-mcp-python setup), it is uvx
instead, because the cache folder disappears when uv cleans it.
Attributes¶
Functions:¶
find_uvx ¶
Find the uvx launcher, by absolute path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
uv
|
str | None
|
The uv executable; defaults to the |
None
|
which
|
Callable[[str], str | None]
|
PATH lookup, replaceable in tests. |
which
|
Returns:
| Type | Description |
|---|---|
str | None
|
|
Source code in src/solidworks_mcp/setup/launcher.py
in_uv_cache ¶
Whether an interpreter lives in a temporary environment in uv's cache.
uv tool install environments (under uv\tools) and project
.venv folders are persistent and don't count.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
python
|
str
|
The interpreter's path. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True when a |
bool
|
path to it. |
Source code in src/solidworks_mcp/setup/launcher.py
server_command ¶
server_command(mock: bool = False, year: int | None = None, python: str | None = None, lasting: bool = True, uvx_finder: Callable[[], str | None] = find_uvx) -> tuple[str, list[str]]
The command and arguments that start this server.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mock
|
bool
|
Add |
False
|
year
|
int | None
|
Add |
None
|
python
|
str | None
|
The interpreter to look beside; defaults to |
None
|
lasting
|
bool
|
Return a command that outlives a temporary uv environment.
|
True
|
uvx_finder
|
Callable[[], str | None]
|
Finds |
find_uvx
|
Returns:
| Type | Description |
|---|---|
str
|
|
list[str]
|
the interpreter is in uv's cache; otherwise the |
tuple[str, list[str]]
|
console script in the environment's scripts folder or, without one, |
tuple[str, list[str]]
|
this Python running the server module. |