mirror of
https://github.com/modelcontextprotocol/servers.git
synced 2026-04-18 08:03:26 +02:00
Add Dockerfiles for the 17 sample MCP servers
* add Dockerfiles and update README.md definitions
This commit is contained in:
18
src/postgres/Dockerfile
Normal file
18
src/postgres/Dockerfile
Normal 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"]
|
||||
@@ -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.
|
||||
Reference in New Issue
Block a user