Add Dockerfiles for the 17 sample MCP servers

* add Dockerfiles and update README.md definitions
This commit is contained in:
Jim Clark
2024-12-10 11:56:46 -08:00
parent ea35591902
commit 368e3b23ca
46 changed files with 913 additions and 43 deletions

View File

@@ -0,0 +1,19 @@
FROM node:22.12-alpine as builder
# Must be entire project because `prepare` script is run during `npm install` and requires all files.
COPY src/google-maps /app
COPY tsconfig.json /tsconfig.json
WORKDIR /app
RUN --mount=type=cache,target=/root/.npm npm install
FROM node:22-alpine AS release
COPY --from=builder /app/dist /app
ENV NODE_ENV=production
WORKDIR /app
CMD ["node", "dist/index.js"]

View File

@@ -59,6 +59,31 @@ Get a Google Maps API key by following the instructions [here](https://developer
Add the following to your `claude_desktop_config.json`:
#### Docker
```json
{
"mcpServers": {
"google-maps": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GOOGLE_MAPS_API_KEY=$GOOGLE_MAPS_API_KEY",
"ai/mcp-google-maps"
],
"env": {
"GOOGLE_MAPS_API_KEY": "<YOUR_API_KEY>"
}
}
}
}
```
### NPX
```json
{
"mcpServers": {
@@ -76,6 +101,14 @@ Add the following to your `claude_desktop_config.json`:
}
```
## Build
Docker build:
```bash
docker build -t vonwig/google-maps:mcp -f src/google-maps/Dockerfile .
```
## License
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.