solidworks_mcp.setup.legacy¶
solidworks_mcp.setup.legacy ¶
Recognise older, hand-made config entries that start this same server.
Before solidworks-mcp setup existed, the README had people add entries
under names of their choosing, launched through run-mcp.ps1,
start_local_server_claude.py and similar. Left in place beside the new
solidworks entry, they load every tool twice, and the PowerShell ones
can break the stdio connection.
The rule reads only an entry's command and args. Secrets live in
env and headers, which are never looked at. It matches this
project's own launcher names exactly, so another vendor's SolidWorks server
is never mistaken for this one.
Attributes¶
_OLD_SCRIPTS
module-attribute
¶
_OLD_SCRIPTS = frozenset({'run-mcp.ps1', 'run-mcp-claude.ps1', 'start_local_server.py', 'start_local_server_claude.py'})
_OUR_LAUNCHERS
module-attribute
¶
_OUR_LAUNCHERS = frozenset({'solidworks-mcp', 'solidworks-mcp.exe', 'solidworks-mcp-python', 'solidworks-mcp-python.exe'})
_OUR_MODULES
module-attribute
¶
Functions:¶
launcher_name ¶
The program file an entry starts, for showing to the user.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
entry
|
Any
|
A server entry from a client config. |
required |
Returns:
| Type | Description |
|---|---|
str
|
The file name of its |
str
|
folder; |
Source code in src/solidworks_mcp/setup/legacy.py
old_entries ¶
Name every entry, besides solidworks, that starts this server.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
servers
|
dict[str, Any]
|
A config's server entries ( |
required |
Returns:
| Type | Description |
|---|---|
list[str]
|
Their names, in the config's order. |
Source code in src/solidworks_mcp/setup/legacy.py
starts_this_server ¶
Whether a config entry launches this project's server.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
entry
|
Any
|
A server entry from a client config. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True when its command is one of this package's launchers, or its |
bool
|
arguments name one of this project's launch scripts or modules. |