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

18
src/postgres/Dockerfile Normal file
View File

@@ -0,0 +1,18 @@
FROM node:22.12-alpine as builder
COPY src/postgres /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

@@ -24,6 +24,21 @@ The server provides schema information for each table in the database:
To use this server with the Claude Desktop app, add the following configuration to the "mcpServers" section of your `claude_desktop_config.json`:
### Docker
```json
{
"mcpServers": {
"postgres": {
"command": "docker",
"args": ["run", "-i", "--rm", "ai/mcp-postgres", "host.docker.internal:5432/mydb"]
}
}
}
```
### NPX
```json
{
"mcpServers": {
@@ -41,6 +56,14 @@ To use this server with the Claude Desktop app, add the following configuration
Replace `/mydb` with your database name.
## Building
Docker:
```sh
docker build -t ai/mcp-postgres -f src/postgres/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.
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.