-
securityA
license-
qualityA Model Context Protocol server providing LLMs read-only access to PostgreSQL databases for inspecting schemas and executing queries.
Last updated -
16,948
17
JavaScript
MIT License
这是一个用于与 PostgreSQL 数据库交互的模型上下文协议服务器。它提供了一个只读接口来查询 PostgreSQL 数据库并检查其架构。
服务器可以通过多种方式配置,按优先级顺序列出:
POSTGRES_URL
:完整数据库 URL(例如, postgres://user:pass@host:5432/dbname
)POSTGRES_HOST
:数据库主机POSTGRES_PORT
:数据库端口(默认值:5432)POSTGRES_DB
:数据库名称POSTGRES_USER
:数据库用户POSTGRES_PASSWORD
:数据库密码POSTGRES_SSL
:启用 SSL 模式(设置为“true”以启用)POSTGRES_SCHEMA
:数据库模式(默认值:'public')DOTENV_PATH
:.env 文件的自定义路径DEBUG_MCP
:启用调试日志记录(设置为“true”以启用)postgres://user@host/dbname/table_name/schema
要在本地构建服务器:
在开发期间以监视模式运行:
设置DEBUG_MCP=true
以启用调试日志记录。日志将写入:
/tmp/postgres-mcp-debug.json
%TEMP%/postgres-mcp-debug.json
麻省理工学院
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
模型上下文协议服务器,可与 PostgreSQL 数据库交互以列出表、检索模式和执行只读 SQL 查询。
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/hthuong09/postgres-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server