For a postgres mcp server for ai agents, the first results are materializeinc/materialize (Materialize is a streaming SQL database that includes a built-in MCP server, allowing LLMs to query live materialized views and data streams using the PostgreSQL wire protocol), felixge/node-mysql (This is a low-level database driver for MySQL rather than a Model Context Protocol server, meaning it provides the connectivity building blocks but lacks the MCP-specific interface required for LLM integration) and sosedoff/pgweb (This is a web-based graphical database management tool for human users rather than an MCP server designed to provide an interface for LLMs to interact with PostgreSQL). knex/knex and mysqljs/mysql round out the shortlist. Compare the match explanations and check the project documentation against your requirements.
We curate open-source GitHub repositories matching “best postgres mcp servers”. Results are ranked by relevance to your query — pick filters below to narrow, or refine with AI.
Materialize is a streaming SQL database that continuously ingests live data from sources such as Kafka, Redpanda, PostgreSQL, and MySQL, and incrementally maintains materialized views. It provides a PostgreSQL-compatible query engine that accepts standard SQL over the PostgreSQL wire protocol, enabling any existing SQL client or BI tool to query real-time data. The system also includes a Model Context Protocol (MCP) server that exposes live materialized view data to AI agents, providing fresh context without polling. Materialize distinguishes itself through its ability to offer configurable c
Materialize is a streaming SQL database that includes a built-in MCP server, allowing LLMs to query live materialized views and data streams using the PostgreSQL wire protocol.
This project is a pure JavaScript database driver for Node.js that implements the native MySQL binary protocol. It serves as a comprehensive connector for managing persistent network links to MySQL servers, enabling applications to execute queries, manage transactions, and handle complex data operations without requiring external middleware. The driver distinguishes itself through its integrated support for connection pooling and distributed database routing. It maintains managed sets of reusable network sockets to optimize resource usage under high request volumes, while simultaneously provi
This is a low-level database driver for MySQL rather than a Model Context Protocol server, meaning it provides the connectivity building blocks but lacks the MCP-specific interface required for LLM integration.
pgweb is a web-based database client and graphical administration tool for PostgreSQL. It provides a browser-based interface for executing SQL queries, inspecting schemas, and managing database objects. The tool includes a read-only mode that prevents destructive operations by blocking specific SQL keywords. It supports secure remote access to private instances through native SSH tunneling and encrypted database connections. The application covers a broad range of management capabilities, including multi-environment session management, database structure inspection, and the export of query r
This is a web-based graphical database management tool for human users rather than an MCP server designed to provide an interface for LLMs to interact with PostgreSQL.
Knex is a multi-dialect database client that provides a programmatic SQL query builder, a connection pool manager, and a versioned schema migration tool. It enables programmatic database interaction across multiple SQL engines, including PostgreSQL, MySQL, SQLite3, SQL Server, CockroachDB, and Oracle. The project distinguishes itself through a fluent interface for constructing complex SQL statements and a dedicated framework for database seeding. It utilizes specialized dialects to translate generic query representations into database-specific syntax while maintaining a consistent API across
Knex is a database query builder and migration library that provides the building blocks for database interaction, but it is not a pre-built Model Context Protocol server designed to interface directly with LLMs.
This project is a MySQL database driver and client for Node.js. It provides a JavaScript implementation of the MySQL protocol to facilitate connecting to, querying, and managing data within MySQL databases. The driver includes a connection pool manager to maintain a cache of reusable database connections, reducing the overhead of frequent network handshakes. It also supports row-by-row result streaming to process large datasets without loading entire result sets into memory. Core capabilities cover SQL query execution, the management of database transactions, and the coordination of multiple
This is a database driver for MySQL rather than a Model Context Protocol server, meaning it provides the low-level connectivity required to build such a tool but lacks the specific MCP interface for LLM integration.
This project is an asyncio database abstraction layer that provides a common interface for performing non-blocking database operations in Python. It functions as an asynchronous database driver wrapper and a SQL expression builder, allowing for the construction of raw SQL strings from structured Python objects. The library includes an asyncio connection pool manager that utilizes task-local storage to handle connection lifecycles and reduce resource overhead. It also serves as an async database transaction manager, wrapping operations in atomic transactions and savepoints to maintain data int
This is a database abstraction library for building applications, not a pre-built Model Context Protocol server designed to expose PostgreSQL databases to LLMs.
Druid is a database connection management and monitoring framework designed to maintain persistent, high-performance links between applications and relational databases. It functions as a resource manager that automates the lifecycle of connection pools, reducing the overhead associated with repeatedly opening and closing network connections. The project distinguishes itself through an integrated query analysis engine that decomposes database statements into structured components. This capability enables real-time security auditing, syntax validation, and metadata extraction, allowing for the
This is a Java-based database connection pool and monitoring framework, not an MCP server designed to provide an LLM interface for PostgreSQL database interactions.
asyncpg is an asynchronous database driver and binary protocol client for PostgreSQL. It provides a non-blocking interface for executing SQL statements, streaming result sets, and managing data transfer between an application and a PostgreSQL database. The driver implements the PostgreSQL binary protocol directly to facilitate efficient data transfer and type conversion. It includes a connection pool to maintain and reuse open database connections, reducing the latency associated with repeated handshakes. The project covers a broad range of database integration capabilities, including atomic
This is a low-level asynchronous database driver used to build database integrations, rather than a pre-built Model Context Protocol server that provides an LLM-ready interface for PostgreSQL.
Knex is a programmatic SQL query builder for Node.js applications. It provides a unified interface for generating database statements and managing structural versioning through a schema migration tool. The project features a multi-dialect database layer that translates programmatic queries into specific syntax for relational databases including PostgreSQL, MySQL, SQLite3, and MSSQL. This allows for writing database logic that remains compatible across different systems. The system includes infrastructure for managing reusable database connection pools and handling relational transactions to
Knex is a programmatic SQL query builder and database abstraction library, not a pre-built Model Context Protocol server designed to expose PostgreSQL to LLMs.
This project is a Node.js client for PostgreSQL databases, providing a protocol parser to translate raw binary streams into JavaScript objects. It serves as a driver for executing queries, managing data, and integrating Node.js applications with PostgreSQL backends. The library includes a connection pool manager to reduce network overhead by caching reusable connections and a result streamer that uses cursors to retrieve large datasets incrementally. It also functions as an event listener for subscribing to asynchronous server-side notifications to trigger real-time application events. Broad
This is a low-level PostgreSQL driver for Node.js applications rather than a Model Context Protocol server designed to expose database interfaces to LLMs.
ProxySQL is a database proxy designed to route and balance traffic between applications and MySQL or PostgreSQL servers. It provides database high availability by monitoring backend server health and automatically rerouting traffic to healthy nodes during failover events to prevent downtime. The system integrates with generative AI models by proxying requests through a protocol handler, creating a bridge that allows large language models to access structured data. The project includes capabilities for traffic management through automatic failover routing and cluster topology discovery. It op
ProxySQL is a database traffic proxy and load balancer rather than an MCP server, meaning it lacks the specific protocol implementation required to expose PostgreSQL databases to LLMs via the Model Context Protocol.
WCDB is a cross-platform storage layer and embedded database engine that serves as a framework for SQLite. It functions as an object relational mapper, linking application classes to database tables to enable data operations via objects rather than raw queries. The project is distinguished by an integrated encryption layer for securing data at rest and a full-text search engine that uses language-specific tokenizers for text lookups. It also features transparent field compression to reduce storage footprints and a connection-pooling model to coordinate simultaneous read and write operations a
This is an embedded SQLite database engine and ORM for mobile and desktop applications, which does not provide the Model Context Protocol interface or PostgreSQL connectivity required for LLM integration.
| Repository | Stars | Language | License | Last push |
|---|---|---|---|---|
| materializeinc/materialize | 6.3K | Rust | NOASSERTION | |
| felixge/node-mysql | 18.6K | JavaScript | MIT | |
| 9.4K |
| Go |
| MIT |
| knex/knex | 20.3K | JavaScript | MIT |
| mysqljs/mysql | 18.6K | JavaScript | MIT |
| encode/databases | 4K | Python | BSD-3-Clause |
| alibaba/druid | 28.2K | Java | apache-2.0 |
| magicstack/asyncpg | 8K | Python | apache-2.0 |
| tgriesser/knex | 20.3K | JavaScript | MIT |
| brianc/node-postgres | 13.2K | JavaScript | MIT |