-
Notifications
You must be signed in to change notification settings - Fork 36
Deployment: Dockerfile and Smithery config #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # Generated by https://smithery.ai. See: https://smithery.ai/docs/build/project-config | ||
| FROM python:3.13-slim | ||
|
|
||
| # Set working directory | ||
| WORKDIR /app | ||
|
|
||
| # Copy project files | ||
| COPY . . | ||
|
|
||
| # Install dependencies | ||
| RUN apt-get update \ | ||
| && apt-get install -y --no-install-recommends build-essential \ | ||
| && rm -rf /var/lib/apt/lists/* \ | ||
| && pip install --upgrade pip setuptools wheel \ | ||
| && pip install . | ||
|
|
||
| # Ensure stdout and stderr are unbuffered | ||
| ENV PYTHONUNBUFFERED=1 | ||
|
|
||
| # Default command | ||
| CMD ["claudecode", "--transport", "stdio", "--allow-path", "/app"] | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,5 +1,7 @@ | ||||||
| # MCP Claude Code | ||||||
|
|
||||||
| [](https://smithery.ai/server/@SDGLBL/claude-code) | ||||||
|
||||||
| [](https://smithery.ai/server/@SDGLBL/claude-code) | |
| [](https://smithery.ai/server/@SDGLBL/claude-code) |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,94 @@ | ||||||
| # Smithery configuration file: https://smithery.ai/docs/build/project-config | ||||||
|
|
||||||
| startCommand: | ||||||
| type: stdio | ||||||
| commandFunction: | ||||||
| # A JS function that produces the CLI command based on the given config to start the MCP on stdio. | ||||||
| |- | ||||||
| (config) => { | ||||||
| const args = [ | ||||||
| '--transport', 'stdio', | ||||||
| '--name', 'claude-code' | ||||||
| ]; | ||||||
| if (config.allowedPaths) { | ||||||
| for (const p of config.allowedPaths) { | ||||||
| args.push('--allow-path', p); | ||||||
| } | ||||||
| } | ||||||
| if (config.agentModel) { | ||||||
| args.push('--agent-model', config.agentModel); | ||||||
| } | ||||||
| if (config.agentMaxTokens !== undefined) { | ||||||
| args.push('--agent-max-tokens', config.agentMaxTokens.toString()); | ||||||
| } | ||||||
| if (config.agentApiKey) { | ||||||
| args.push('--agent-api-key', config.agentApiKey); | ||||||
| } | ||||||
| if (config.agentBaseUrl) { | ||||||
| args.push('--agent-base-url', config.agentBaseUrl); | ||||||
| } | ||||||
| if (config.agentMaxIterations !== undefined) { | ||||||
| args.push('--agent-max-iterations', config.agentMaxIterations.toString()); | ||||||
| } | ||||||
| if (config.agentMaxToolUses !== undefined) { | ||||||
| args.push('--agent-max-tool-uses', config.agentMaxToolUses.toString()); | ||||||
| } | ||||||
| if (config.enableAgentTool) { | ||||||
| args.push('--enable-agent-tool'); | ||||||
| } | ||||||
| if (config.commandTimeout !== undefined) { | ||||||
| args.push('--command-timeout', config.commandTimeout.toString()); | ||||||
| } | ||||||
| return { command: 'claudecode', args }; | ||||||
| } | ||||||
| configSchema: | ||||||
| # JSON Schema defining the configuration options for the MCP. | ||||||
| type: object | ||||||
| properties: | ||||||
| allowedPaths: | ||||||
| type: array | ||||||
| items: | ||||||
| type: string | ||||||
| default: | ||||||
| - /app | ||||||
| description: List of paths to allow file operations | ||||||
| agentModel: | ||||||
| type: string | ||||||
| description: LLM model name in LiteLLM format | ||||||
| agentMaxTokens: | ||||||
| type: number | ||||||
| default: null | ||||||
|
||||||
| default: null | |
| default: 1024 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider adding a
.dockerignoreto exclude unnecessary files (e.g., docs, tests, local configs) from the build context to reduce image size and build time.