Claude (ClaudeDesktop) Config Generator¶
ClaudeConfigGenerator
¶
Factory for producing an MCP host configuration JSON from a stack dedicated to ClaudeDesktop.
Deterministic
Reads from environment and StackConfig; does not mutate the stack.
Source code in src/MCPStack/core/mcp_config_generator/mcp_config_generators/claude_mcp_config.py
15 16 17 18 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 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | |
generate(stack, command=None, args=None, cwd=None, module_name=None, pipeline_config_path=None, save_path=None)
classmethod
¶
Create the configuration mapping and optionally persist it to disk.
Use with CLI
The mcpstack build command calls into this method.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stack
|
An |
required | |
command
|
str | None
|
Executable used to launch the server; defaults to the active Python. |
None
|
args
|
List[str] | None
|
Arguments for the command; defaults to |
None
|
cwd
|
str | None
|
Working directory for the server process. |
None
|
module_name
|
str | None
|
Python module to run when using |
None
|
pipeline_config_path
|
str | None
|
Path to the pipeline JSON produced by |
None
|
save_path
|
str | None
|
If set, write the config JSON here. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
dict |
Dict[str, Any]
|
Configuration mapping suitable for MCP-compatible hosts. |
Raises:
| Type | Description |
|---|---|
MCPStackValidationError
|
If |