Skip to content

Commit 368e3b2

Browse files
Add Dockerfiles for the 17 sample MCP servers
* add Dockerfiles and update README.md definitions
1 parent ea35591 commit 368e3b2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+913
-43
lines changed

package-lock.json

+11-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM node:22.12-alpine as builder
2+
3+
COPY src/aws-kb-retrieval-server /app
4+
COPY tsconfig.json /tsconfig.json
5+
6+
WORKDIR /app
7+
8+
RUN --mount=type=cache,target=/root/.npm npm install
9+
10+
FROM node:22-alpine AS release
11+
12+
COPY --from=builder /app/dist /app
13+
14+
ENV NODE_ENV=production
15+
16+
WORKDIR /app
17+
18+
CMD ["node", "dist/index.js"]

src/aws-kb-retrieval-server/README.md

+26
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,24 @@ An MCP server implementation for retrieving information from the AWS Knowledge B
2727

2828
Add this to your `claude_desktop_config.json`:
2929

30+
#### Docker
31+
32+
```json
33+
{
34+
"mcpServers": {
35+
"aws-kb-retrieval": {
36+
"command": "docker",
37+
"args": [ "run", "-i", "--rm", "-e", "AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID", "-e", "AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY", "-e", "AWS_REGION=$AWS_REGION", "ai/mcp-aws-kb-retrieval-server" ],
38+
"env": {
39+
"AWS_ACCESS_KEY_ID": "YOUR_ACCESS_KEY_HERE",
40+
"AWS_SECRET_ACCESS_KEY": "YOUR_SECRET_ACCESS_KEY_HERE",
41+
"AWS_REGION": "YOUR_AWS_REGION_HERE"
42+
}
43+
}
44+
}
45+
}
46+
```
47+
3048
```json
3149
{
3250
"mcpServers": {
@@ -46,6 +64,14 @@ Add this to your `claude_desktop_config.json`:
4664
}
4765
```
4866

67+
## Building
68+
69+
Docker:
70+
71+
```sh
72+
docker build -t ai/mcp-aws-kb-retrieval -f src/aws-kb-retrieval-server/Dockerfile .
73+
```
74+
4975
## License
5076

5177
This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.

src/aws-kb-retrieval-server/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
"@aws-sdk/client-bedrock-agent-runtime": "^3.0.0"
2424
},
2525
"devDependencies": {
26-
"@types/node": "^20.10.0",
26+
"@types/node": "^22",
2727
"shx": "^0.3.4",
2828
"typescript": "^5.6.2"
2929
}
30-
}
30+
}

src/brave-search/Dockerfile

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM node:22.12-alpine as builder
2+
3+
# Must be entire project because `prepare` script is run during `npm install` and requires all files.
4+
COPY src/brave-search /app
5+
COPY tsconfig.json /tsconfig.json
6+
7+
WORKDIR /app
8+
9+
RUN --mount=type=cache,target=/root/.npm npm install
10+
11+
FROM node:22-alpine AS release
12+
13+
COPY --from=builder /app/dist /app
14+
15+
ENV NODE_ENV=production
16+
17+
WORKDIR /app
18+
19+
CMD ["node", "dist/index.js"]

src/brave-search/README.md

+34
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,31 @@ An MCP server implementation that integrates the Brave Search API, providing bot
3636
### Usage with Claude Desktop
3737
Add this to your `claude_desktop_config.json`:
3838

39+
### Docker
40+
41+
```json
42+
{
43+
"mcpServers": {
44+
"brave-search": {
45+
"command": "docker",
46+
"args": [
47+
"run",
48+
"-i",
49+
"--rm",
50+
"-e",
51+
"BRAVE_API_KEY=$BRAVE_API_KEY",
52+
"ai/mcp-brave-search"
53+
],
54+
"env": {
55+
"BRAVE_API_KEY": "YOUR_API_KEY_HERE"
56+
}
57+
}
58+
}
59+
}
60+
```
61+
62+
### NPX
63+
3964
```json
4065
{
4166
"mcpServers": {
@@ -53,6 +78,15 @@ Add this to your `claude_desktop_config.json`:
5378
}
5479
```
5580

81+
82+
## Build
83+
84+
Docker build:
85+
86+
```bash
87+
docker build -t vonwig/brave-search:mcp -f src/brave-search/Dockerfile .
88+
```
89+
5690
## License
5791

5892
This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.

src/brave-search/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"@modelcontextprotocol/sdk": "1.0.1"
2323
},
2424
"devDependencies": {
25-
"@types/node": "^20.10.0",
25+
"@types/node": "^22",
2626
"shx": "^0.3.4",
2727
"typescript": "^5.6.2"
2828
}

src/everart/Dockerfile

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM node:22.12-alpine as builder
2+
3+
COPY src/everart /app
4+
COPY tsconfig.json /tsconfig.json
5+
6+
WORKDIR /app
7+
8+
RUN --mount=type=cache,target=/root/.npm npm install
9+
10+
FROM node:22-alpine AS release
11+
12+
COPY --from=builder /app/dist /app
13+
14+
ENV NODE_ENV=production
15+
16+
WORKDIR /app
17+
18+
CMD ["node", "dist/index.js"]

src/everart/README.md

+25
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,25 @@ export EVERART_API_KEY=your_key_here
1010

1111
## Config
1212
Add to Claude Desktop config:
13+
14+
### Docker
15+
```json
16+
{
17+
"mcpServers": {
18+
"everart": {
19+
"command": "docker",
20+
"args": ["run", "-i", "--rm", "-e", "EVERART_API_KEY=$EVERART_API_KEY", "ai/mcp-everart"],
21+
"env": {
22+
"EVERART_API_KEY": "your_key_here"
23+
}
24+
},
25+
26+
}
27+
}
28+
```
29+
30+
### NPX
31+
1332
```json
1433
{
1534
"mcpServers": {
@@ -71,3 +90,9 @@ Generation details:
7190
7291
You can also click the URL above to view the image again.
7392
```
93+
94+
## Building w/ Docker
95+
96+
```sh
97+
docker build -t ai/mcp-everart -f src/everart/Dockerfile .
98+
```

src/everart/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"open": "^9.1.0"
2626
},
2727
"devDependencies": {
28-
"@types/node": "^20.11.0",
28+
"@types/node": "^22",
2929
"shx": "^0.3.4",
3030
"typescript": "^5.3.3"
3131
}

src/everything/Dockerfile

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM node:22.12-alpine as builder
2+
3+
COPY src/everything /app
4+
COPY tsconfig.json /tsconfig.json
5+
6+
WORKDIR /app
7+
8+
RUN --mount=type=cache,target=/root/.npm npm install
9+
10+
FROM node:22-alpine AS release
11+
12+
COPY --from=builder /app/dist /app
13+
14+
ENV NODE_ENV=production
15+
16+
WORKDIR /app
17+
18+
CMD ["node", "dist/index.js"]

src/fetch/Dockerfile

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Use a Python image with uv pre-installed
2+
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim
3+
4+
# Install the project into `/app`
5+
WORKDIR /app
6+
7+
# Enable bytecode compilation
8+
ENV UV_COMPILE_BYTECODE=1
9+
10+
# Copy from the cache instead of linking since it's a mounted volume
11+
ENV UV_LINK_MODE=copy
12+
13+
# Install the project's dependencies using the lockfile and settings
14+
RUN --mount=type=cache,target=/root/.cache/uv \
15+
--mount=type=bind,source=uv.lock,target=uv.lock \
16+
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
17+
uv sync --frozen --no-install-project --no-dev
18+
19+
# Then, add the rest of the project source code and install it
20+
# Installing separately from its dependencies allows optimal layer caching
21+
ADD . /app
22+
RUN --mount=type=cache,target=/root/.cache/uv \
23+
uv sync --frozen --no-dev
24+
25+
# Place executables in the environment at the front of the path
26+
ENV PATH="/app/.venv/bin:$PATH"
27+
28+
# when running the container, add --db-path and a bind mount to the host's db file
29+
ENTRYPOINT ["uvx" , "mcp-server-fetch"]

src/filesystem/Dockerfile

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM node:22.12-alpine as builder
2+
3+
WORKDIR /app
4+
5+
COPY src/filesystem /app
6+
COPY tsconfig.json /tsconfig.json
7+
8+
RUN --mount=type=cache,target=/root/.npm npm install
9+
10+
FROM node:22-alpine AS release
11+
12+
COPY --from=builder /app/dist /app
13+
14+
ENV NODE_ENV=production
15+
16+
WORKDIR /app
17+
18+
CMD ["node", "dist/index.js"]

0 commit comments

Comments
 (0)