Skip to content

Fix docker support #52

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

Merged
merged 4 commits into from
Apr 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions modelcontextprotocol/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# syntax=docker/dockerfile:1
# check=experimental=all

FROM node:22-alpine@sha256:9bef0ef1e268f60627da9ba7d7605e8831d5b56ad07487d24d1aa386336d1944
RUN npm install -g typescript pnpm
RUN addgroup -S group && adduser -S user -G group
WORKDIR /app
COPY . .
RUN --mount=type=cache,target=/root/.local \
pnpm install --frozen-lockfile && pnpm run build

USER user
ENTRYPOINT ["node", "/app/dist/index.js"]
36 changes: 36 additions & 0 deletions modelcontextprotocol/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,27 @@ Add the following to your `claude_desktop_config.json`. See [here](https://model
}
```

of if you're using Docker

```
{
“mcpServers”: {
“stripe”: {
“command”: “docker",
“args”: [
“run”,
"--rm",
"-i",
“mcp/stripe”,
“--tools=all”,
“--api-key=STRIPE_SECRET_KEY”
]
}
}
}

```

## Available tools

| Tool | Description |
Expand Down Expand Up @@ -75,6 +96,21 @@ Run the following command in your terminal:
npx @modelcontextprotocol/inspector node dist/index.js --tools=all --api-key=YOUR_STRIPE_SECRET_KEY
```

### Build using Docker

First build the server

```
docker build -t mcp/stripe .
```

Run the following command in your terminal:

```bash
docker run -p 3000:3000 -p 5173:5173 -v /var/run/docker.sock:/var/run/docker.sock mcp/inspector docker run --rm -i mcp/stripe --tools=all --api-key=YOUR_STRIPE_SECRET_KEY

```

### Instructions

1. Replace `YOUR_STRIPE_SECRET_KEY` with your actual Stripe API secret key.
Expand Down