Database · MODEL CONTEXT PROTOCOL
RathodDarshil mcp postgres query server
RathodDarshil mcp postgres query server is a community-listed Model Context Protocol server. Review the source repository before installation.
WHAT IT CONNECTS
RathodDarshil mcp postgres query server 为 AI Agent 提供什么
- **Read-Only Database Access**: Only SELECT queries are permitted for security
- **Query Validation**: Prevents potentially harmful SQL operations
- **Timeout Protection**: Queries running longer than 10 seconds are automatically terminated
- **MCP Protocol Support**: Complete implementation of the Model Context Protocol
- **JSON Response Formatting**: Query results are returned in structured JSON format
- `query` (string): A SQL SELECT query to execute
- JSON object containing:
- `rows`: The result set rows
- `rowCount`: Number of rows returned
- `fields`: Column metadata
- PostgreSQL connection pool setup
- Query validation logic
- MCP server configuration
- Tool and resource definitions
- Edit the query validation logic in `isReadOnlyQuery()`
- Add additional tools or resources to the MCP server
- Modify the query timeout duration (currently 10 seconds)
- The server validates all queries to ensure they are read-only
- Connection to the database uses SSL
- Query timeout prevents resource exhaustion
- No write operations are permitted
- Database credentials are passed directly via command line arguments, not stored in files
SECURITY
MCP 收录不等于安全审核
MCP 服务器可能获得模型上下文、凭据、本地文件或调用外部系统的权限。连接 Agent 前,请检查代码、环境变量、网络行为、软件包来源与维护状态。