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

What RathodDarshil mcp postgres query server gives an 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

An MCP listing is not a security review

An MCP server may receive model context, credentials, local files, or permission to call external systems. Review its code, requested environment variables, network behavior, package provenance, and maintenance status before connecting it to an agent.