Skip to content

Commit 987f137

Browse files
authored
Merge pull request #4 from smithery-ai/smithery/config-x0eq
Deployment: Dockerfile and Smithery config
2 parents 467994d + b81ee50 commit 987f137

File tree

3 files changed

+44
-0
lines changed

3 files changed

+44
-0
lines changed

Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
2+
# Use a Python image with uv pre-installed
3+
FROM ghcr.io/astral-sh/uv:python3.11-bookworm-slim AS uv
4+
5+
# Set the working directory
6+
WORKDIR /app
7+
8+
# Copy the project files
9+
COPY . .
10+
11+
# Install the project's dependencies
12+
RUN --mount=type=cache,target=/root/.cache/uv pip install .
13+
14+
# Set environment variables
15+
ENV ALLOW_COMMANDS="ls,cat,pwd,grep,wc,touch,find"
16+
17+
# Start the server using the local script
18+
ENTRYPOINT ["python", "-m", "mcp_shell_server.server"]

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,15 @@ code ~/Library/Application\ Support/Claude/claude_desktop_config.json
6868

6969
#### Installation
7070

71+
### Installing via Smithery
72+
73+
To install Shell Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/mcp-shell-server):
74+
75+
```bash
76+
npx -y @smithery/cli install mcp-shell-server --client claude
77+
```
78+
79+
### Manual Installation
7180
```bash
7281
pip install mcp-shell-server
7382
```

smithery.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Smithery configuration file: https://smithery.ai/docs/config#smitheryyaml
2+
3+
startCommand:
4+
type: stdio
5+
configSchema:
6+
# JSON Schema defining the configuration options for the MCP.
7+
type: object
8+
required:
9+
- allowCommands
10+
properties:
11+
allowCommands:
12+
type: string
13+
description: Comma-separated list of shell commands that are allowed to be executed.
14+
commandFunction:
15+
# A function that produces the CLI command to start the MCP on stdio.
16+
|-
17+
(config) => ({ command: 'python', args: ['-m', 'mcp_shell_server.server'], env: { ALLOW_COMMANDS: config.allowCommands } })

0 commit comments

Comments
 (0)