What is the difference between the `query` and `execute` tools?
`query` executes SELECT, SHOW, EXPLAIN, and WITH statements only. `execute` handles INSERT, UPDATE, and DELETE operations.
@fanzhenddz
PostgreSQL MCP Server
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"postgresql-mcp-ddz": {
"command": "npx",
"args": [
"postgresql-mcp-ddz"
],
"env": {
"POSTGRES_HOST": "127.0.0.1",
"POSTGRES_PORT": "5432",
"POSTGRES_USER": "postgres",
"POSTGRES_PASSWORD": "your_password",
"POSTGRES_DB": "your_database"
}
}
}
}Connect to a PostgreSQL database
Execute a SELECT query and return results
Execute an INSERT, UPDATE, or DELETE query
List all tables in the database
Get the structure of a specific table
Analyze SQL query performance using EXPLAIN
Execute a SHOW statement (e.g., SHOW STATUS, SHOW VARIABLES)
Postgresql Mcp Ddz is a PostgreSQL database operation server built on the Model Context Protocol (MCP). It enables AI assistants to interact with PostgreSQL databases through a standardized interface, supporting query execution, data modification, schema inspection, and performance analysis.
Install with npm install postgresql-mcp-ddz or run directly via npx postgresql-mcp-ddz. Configure automatic database connection by setting environment variables (POSTGRES_HOST, POSTGRES_PORT, POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB) in your MCP client, or use the connect_db tool to connect manually. Once connected, invoke tools like query, execute, list_tables, describe_table, explain, and show_statement to interact with the database.
`query` executes SELECT, SHOW, EXPLAIN, and WITH statements only. `execute` handles INSERT, UPDATE, and DELETE operations.
Set `POSTGRES_HOST`, `POSTGRES_PORT`, `POSTGRES_USER`, `POSTGRES_PASSWORD`, and `POSTGRES_DB` environment variables for automatic connection, or use the `connect_db` tool with the same parameters.
It requires Node.js and npm (or npx) to install and run the server.
Credentials are passed only at runtime via environment variables or the `connect_db` tool parameters; the server does not persist them.
Yes. Omit the environment variables and use the `connect_db` tool manually to connect each session.
Postgres MCP Pro provides configurable read/write access and performance analysis for you and your AI agents.
An official Qdrant Model Context Protocol (MCP) server implementation
Local MCP server for DuckDB and MotherDuck

Connect Karma.Domains to ChatGPT, Claude, Cursor, VS Code, or another MCP client — and find a domain in plain language. The same auctions, expired, backorder, and buy-now data you use in the app, plus saved filters, note
评论