db-mcp-server

db-mcp-server

3.1

If you are the rightful owner of db-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

A Model Context Protocol (MCP) server that allows users to connect to PostgreSQL databases.

The PostgreSQL MCP Server is designed to facilitate seamless interaction with PostgreSQL databases through the Model Context Protocol. It allows external applications to share database credentials via POST requests to an SSE endpoint, establishing secure connections to PostgreSQL databases. The server is built with a modular architecture, ensuring a clear separation of concerns across its core components, resources, tools, and prompts. This design enables efficient management of database operations, schema management, and analytics, while also providing robust security features such as API rate limiting and CORS support. The server is compatible with Vercel deployment, making it easy to integrate into various environments.

Features

  • Database Connections: Secure PostgreSQL connections with connection pooling, SSL support, and connection validation.
  • Query Execution: SQL query execution with parameter binding, query history tracking, and statistics collection.
  • Schema Management: Table listing and description, column metadata, and key information.
  • Database Analytics: Database size information, activity monitoring, and query performance tracking.
  • Security: API rate limiting, CORS support, and secure headers.

Tools

  1. test-connection

    Tests a connection to a PostgreSQL database.

  2. query

    Executes a SQL query on a PostgreSQL database.

  3. list-tables

    Lists tables in a PostgreSQL database.

  4. describe-table

    Describes the schema of a table in a PostgreSQL database.

  5. get-database-stats

    Gets statistics about a PostgreSQL database.