MCP PostgreSQL Server
@antonorlov
MCP PostgreSQL Server について
MCP PostgreSQL Server
基本情報
設定
以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。
{
"mcpServers": {
"postgres": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-postgres-server"
],
"env": {
"PG_HOST": "your_host",
"PG_PORT": "5432",
"PG_USER": "your_user",
"PG_PASSWORD": "your_password",
"PG_DATABASE": "your_database"
}
}
}
}ツール
ツールは検出されませんでした
ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。
概要
What is MCP PostgreSQL Server?
A Model Context Protocol server that enables AI models to interact with PostgreSQL databases through a standardized interface. It provides database operations such as connecting, querying, executing statements, and listing schemas and tables.
How to use MCP PostgreSQL Server?
Install via npm (npm install mcp-postgres-server) or run directly with npx mcp-postgres-server. Configure environment variables for database credentials (host, port, user, password, database). Then use the available MCP tools: connect_db, query, execute, list_schemas, list_tables, describe_table.
Key features of MCP PostgreSQL Server
- Secure connection handling with automatic cleanup
- Prepared statement support to prevent SQL injection
- Supports PostgreSQL-style ($1, $2) and MySQL-style (?) parameter placeholders
- Comprehensive error handling with detailed messages
- TypeScript support
- Automatic connection management
- Multi-schema support for database operations
Use cases of MCP PostgreSQL Server
- Querying data from PostgreSQL tables using SELECT statements
- Executing INSERT, UPDATE, and DELETE operations securely
- Exploring database structure by listing schemas, tables, and describing columns
- Integrating AI models with existing PostgreSQL databases for data retrieval
FAQ from MCP PostgreSQL Server
How does the server prevent SQL injection?
It uses prepared statements for all queries, securely handling parameterized inputs to avoid injection.
What parameter placeholder styles are supported?
Both PostgreSQL-style ($1, $2) and MySQL
「データベース」の他のコンテンツ
mcp_mysql_server
wenb1n-devModel Context Protocol (MCP) server that supports secure interaction with MySQL databases and has anomaly analysis capabilities.更加牛逼!更加好用!不仅止于mysql的增删改查功能; 还包含了数据库异常分析能力;且便于开发者们进行个性化的工具扩展
Meilisearch MCP Server
meilisearchA Model Context Protocol (MCP) server for interacting with Meilisearch through LLM interfaces.
Sail MCP Server for Spark SQL
lakehqDrop-in Apache Spark replacement written in Rust, unifying batch processing, stream processing, and compute-intensive AI workloads.
MCP Server for MySQL based on NodeJS
benborlaA Model Context Protocol server that provides read-only access to MySQL databases. This server enables LLMs to inspect database schemas and execute read-only queries.
MCP MongoDB Server
kiliczshA Model Context Protocol Server for MongoDB
コメント