Back to Home
gharshit icon

mcpServer

Verified Safe

by gharshit

Overview

Provides a standardized interface for AI assistants to securely interact with PostgreSQL databases through a Model Context Protocol (MCP) server.

Installation

Run Command
uv run python main.py

Environment Variables

  • MCP_TRANSPORT
  • MCP_HOST
  • MCP_PORT

Security Notes

The server implements explicit checks to prevent destructive SQL operations (e.g., DELETE, DROP, TRUNCATE, UPDATE, INSERT) by blacklisting keywords in the `run_sql_query` tool. However, database credentials are directly specified in `config.yaml`, which is a significant security risk if this file is committed to version control. Additionally, while operations are read-only, direct string concatenation for SQL queries (e.g., in `run_sql_query`) without parameterized statements could still be vulnerable to SQL injection for information disclosure if an AI assistant is prompted to craft malicious `SELECT` queries.

Similar Servers

Stats

Interest Score0
Security Score6
Cost ClassLow
Stars0
Forks0
Last Update2025-11-29

Tags

AIPostgreSQLDatabaseMCPServerAPI