MCP.so
ログイン

MCP Server: PostgreSQL Docker Initializer

@Flow-Research

基本情報

カテゴリ

データベース

トランスポート

stdio

作者

Flow-Research

MCP Server: PostgreSQL Docker Initializer について

概要はまだありません

#mcp-server#postgresql#docker-initializer

MCP Server: PostgreSQL Docker Initializer の設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

{
  "mcpServers": {
    "mcp-server-postgres-init": {
      "command": "npx",
      "args": [
        "@modelcontextprotocol/inspector",
        "node",
        "build/index.js"
      ]
    }
  }
}

MCP Server: PostgreSQL Docker Initializer のツール

ツール一覧はまだありません

この掲載には表示できるツール一覧がまだありません。サーバーにツールがないという意味ではありません。対応機能はプロジェクトのドキュメントをご確認ください。

上のボタンで一時的なサンドボックスでこのサーバーを実行し、ツール一覧を取得できます。

概要

What is MCP Server: PostgreSQL Docker Initializer?

This MCP server provides a single tool (init-postgres-docker) that initializes a PostgreSQL database inside a new Docker container. It is designed for developers who need a quick, disposable PostgreSQL instance for development or testing.

How to use MCP Server: PostgreSQL Docker Initializer?

Install dependencies with make install or npm install, build with make build or npm run build, then run the server. Use make inspect to interact via the MCP inspector, or run node build/index.js directly to connect with an MCP client. The tool is invoked by sending a request with a database name.

Key features of MCP Server: PostgreSQL Docker Initializer

  • Exposes a single tool, init-postgres-docker
  • Pulls postgres:latest Docker image automatically
  • Creates a PostgreSQL container with a specified database name
  • Maps container port 5432 to a random available host port
  • Sets container to auto-remove when stopped
  • Returns a PostgreSQL connection URL (e.g., postgresql://pguser:mysecretpassword@localhost:<hostPort>/<dbName>)

Use cases of MCP Server: PostgreSQL Docker Initializer

  • Quickly spin up a throwaway PostgreSQL database for local development
  • Automate database provisioning in CI/CD pipelines or testing environments
  • Provide a temporary database for demonstrations or tutorials

よくある質問

1

What does the `init-postgres-docker` tool do?

It creates a new Docker container running PostgreSQL with a specified database name, a default user (`pguser`), and a default password (`mysecretpassword`), then returns the connection URL.

2

What are the prerequisites to run this server?

Node.js and npm (or a compatible package manager), Docker (must be running), and Make.

3

Is the default password secure?

No, the password `mysecretpassword` is hardcoded and insecure. This server is intended for demonstration purposes only; real-world use should implement a more secure password method.

4

Does the PostgreSQL container persist after stopping?

No, the container is set to auto-remove (`AutoRemove: true`). Consider the lifecycle needed for your use case.

5

How can I run the server without the Makefile?

Install dependencies with `npm install`, build with `npm run build`, then run `node build/index.js` directly or use the MCP inspector with `npx @modelcontextprotocol/inspector node build/index.js`.

コメント

「データベース」の他のコンテンツ