solidworks_mcp.server_cli_fixed¶
solidworks_mcp.server_cli_fixed ¶
Utilities for server cli fixed.
Attributes¶
app
module-attribute
¶
app = Typer(name='solidworks-mcp', help='SolidWorks MCP Server - Model Context Protocol for SolidWorks automation', no_args_is_help=True)
Classes¶
DeploymentMode ¶
Bases: StrEnum
Deployment mode options.
Attributes:
| Name | Type | Description |
|---|---|---|
HYBRID |
Any
|
The hybrid value. |
LOCAL |
Any
|
The local value. |
REMOTE |
Any
|
The remote value. |
Functions¶
load_config ¶
Load configuration from file and environment variables.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config_file
|
str | None
|
The config file value. Defaults to None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
SolidWorksMCPConfig |
SolidWorksMCPConfig
|
The result produced by the operation. |
Source code in src/solidworks_mcp/config.py
run ¶
run(config: str = typer.Option(None, '--config', help='Configuration file path', show_default=False), mode: str = typer.Option(None, '--mode', help='Deployment mode (local/remote/hybrid)', show_default=False), host: str = typer.Option('localhost', '--host', help='Server host for remote mode'), port: int = typer.Option(8000, '--port', help='Server port for remote mode'), debug: bool = typer.Option(False, '--debug', help='Enable debug mode'), mock: bool = typer.Option(False, '--mock', help='Use mock SolidWorks for testing')) -> None
Start the SolidWorks MCP Server.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
str
|
Configuration values for the operation. Defaults to typer.Option( None, "--config", help="Configuration file path", show_default=False, ). |
Option(None, '--config', help='Configuration file path', show_default=False)
|
mode
|
str
|
The mode value. Defaults to typer.Option( None, "-- mode", help="Deployment mode (local/remote/hybrid)", show_default=False, ). |
Option(None, '--mode', help='Deployment mode (local/remote/hybrid)', show_default=False)
|
host
|
str
|
The host value. Defaults to typer.Option( "localhost", " --host", help="Server host for remote mode", ). |
Option('localhost', '--host', help='Server host for remote mode')
|
port
|
int
|
The port value. Defaults to typer.Option( 8000, "-- port", help="Server port for remote mode", ). |
Option(8000, '--port', help='Server port for remote mode')
|
debug
|
bool
|
The debug value. Defaults to typer.Option( False, "-- debug", help="Enable debug mode", ). |
Option(False, '--debug', help='Enable debug mode')
|
mock
|
bool
|
The mock value. Defaults to typer.Option( False, "-- mock", help="Use mock SolidWorks for testing", ). |
Option(False, '--mock', help='Use mock SolidWorks for testing')
|
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
None. |
Source code in src/solidworks_mcp/server_cli_fixed.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | |