For an MCP server for querying databases, the first results are supabase-community/supabase-mcp, mindsdb/mindsdb and graphile/postgraphile (PostGraphile turns a PostgreSQL database into a GraphQL API with schema introspection and query execution, but it does not implement the Model Context Protocol, so it is not the MCP server you are looking for). pymysql/pymysql and mark3labs/mcp-go round out the shortlist. Compare the match explanations and check the project documentation against your requirements.
Connect AI agents to relational and NoSQL databases using the Model Context Protocol for data retrieval.
This project is a Model Context Protocol server and AI agent database connector. It provides a standardized communication layer that allows language models to interact with relational data stores, read database schemas, and manage PostgreSQL database resources. The implementation acts as a serverless host for the Model Context Protocol, deploying on distributed edge functions to connect AI assistants to a project. This enables AI agents to perform database administration, execute SQL queries, and handle schema migrations through an AI-compatible interface. The system covers broader capabilit
This repository is an MCP server specifically for PostgreSQL database access, supporting schema introspection and SQL query execution via the Model Context Protocol—directly matching the search for a database-interaction MCP server, though it does not explicitly mention a read-only mode option.
MindsDB is an AI-native database engine that treats machine learning models and autonomous agents as virtual tables. By mapping external data sources, predictive models, and third-party services directly into the database schema, it enables users to perform inference, data retrieval, and complex orchestration using standard SQL syntax. The platform distinguishes itself through an autonomous agent orchestrator that executes iterative reasoning loops, allowing agents to plan data access and synthesize natural language responses from connected knowledge bases. It functions as a federated data ga
MindsDB is an AI-native database engine that implements the Model Context Protocol, enabling AI models to query databases via SQL and schema introspection; this fits your need for a secure MCP server for database access, though it is a broader platform rather than a lightweight dedicated MCP adapter.
PostGraphile is an automated tool that converts a PostgreSQL database schema into a fully functional GraphQL API. It serves as a GraphQL execution engine and schema orchestrator, utilizing database schema introspection to retrieve strongly typed metadata directly from PostgreSQL. The project features a modular system for composing and standardizing GraphQL schemas through plugins, which manage naming conventions and connections. It includes a PostgreSQL query builder that constructs dynamic, SQL-injection-proof queries using tagged template literals. The system employs a declarative query pl
PostGraphile turns a PostgreSQL database into a GraphQL API with schema introspection and query execution, but it does not implement the Model Context Protocol, so it is not the MCP server you are looking for.
PyMySQL is a MySQL database connector and SQL database driver for Python environments. It serves as a client library that enables Python applications to establish network connections and interact with MySQL database servers. The library is a pure Python implementation of the MySQL client-server wire protocol. This design allows for MySQL integration and data management without requiring native C extensions. The project provides capabilities for database connectivity, query execution, and secure access control. It follows the DB-API 2.0 specification to provide a consistent interface for mana
PyMySQL is a pure-Python MySQL client library, not an MCP server — it provides database connectivity that an MCP server could use, but it does not implement the Model Context Protocol or act as a standalone server for AI model interactions.
mcp-go is a Go implementation of the Model Context Protocol (MCP) providing an SDK and framework for building servers that connect large language model applications to external tools and data sources. It serves as a developer kit for implementing bidirectional communication and structured data exchange between AI clients and servers. The framework enables the creation of executable tools with structured output schemas, reusable prompt templates, and data resource exposure via URI templates. It supports multiple transport layers, including stdio, HTTP, and Server-Sent Events, using a transport
mcp-go is a Go SDK and framework for building MCP servers, not a ready-to-use MCP server for database access — you would use it to build the server you want, but it provides no built-in SQL connectivity, query execution, schema introspection, or read-only mode.
This toolkit provides an asynchronous interface for interacting with relational databases, offering a unified driver-agnostic layer for managing connection pools and executing transactions. It is designed to integrate with asynchronous runtimes, enabling non-blocking database operations while maintaining secure, encrypted communication between the application and the database server. The project distinguishes itself through its compile-time validation capabilities, which use procedural macros to inspect SQL syntax and parameter types against a live database schema during the build process. Th
SQLx is a Rust async SQL library with compile-time query validation, not an MCP server — it provides database connectivity but lacks any implementation of the Model Context Protocol.
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
node-postgres is a PostgreSQL client driver for Node.js, not an MCP server — it provides database connectivity but does not implement the Model Context Protocol or serve as a query endpoint for AI models.
Peewee is a SQL object-relational mapper and query builder that provides an object-oriented interface for mapping application classes to relational database tables. It functions as a relational database toolkit for managing schemas, executing migrations, and handling complex table relationships. The project distinguishes itself by providing an asyncio database driver for non-blocking database operations, ensuring event loop responsiveness. It also supports semi-structured data storage, allowing the storage and querying of flexible JSON documents within traditional relational database systems.
Peewee is a Python ORM and database toolkit, not an MCP server — it provides the database connectivity layer that an MCP server would use, but does not implement the Model Context Protocol itself, so it falls short of the query's requirement for a protocol-aware server.
This project is a tool for integrating existing HTTP APIs with AI agents by translating standard web endpoints into the Model Context Protocol. It provides a framework for constructing and managing libraries of functions that allow large language models to execute tasks and retrieve data. The system functions as an AI gateway that manages tool hosting, authentication, and routing. It includes capabilities for monetizing tool access through usage-based billing and payment processor integration, as well as the ability to publish service definitions to a gateway for commercial productization. T
This project is a general-purpose MCP server for integrating any HTTP API with AI agents, but it lacks built-in SQL connectivity, schema introspection, or read-only mode, so it does not directly match the specific database-access scenario you are looking for.
pq is a PostgreSQL driver for Go that implements the standard database/sql interface. It serves as a connection library and protocol implementation that translates application data types into the binary and text formats required by PostgreSQL. The project provides specialized utilities for high-performance data ingestion using bulk data loading and a dedicated bulk data importer. It also features an implementation for listening to asynchronous server notifications and provides tools for connection load balancing across multiple hosts and ports. The driver covers a broad surface of database i
This is a PostgreSQL database driver for Go, not an MCP server — it provides low-level SQL connectivity and data type mapping but does not implement the Model Context Protocol or expose any API for AI models to interact with databases, so while it could be a component in building such a server, it is not itself one.
Rainfrog is a terminal-based database client that connects to multiple database engines, combining schema browsing, interactive SQL query execution, and inline data editing into a single terminal interface. It provides a tree navigator for exploring tables, columns, and indexes, and an inline cell editor that automatically constructs and executes the necessary UPDATE statements when a cell value is changed. The application also supports modal Vim-style keyboard shortcuts for cursor movement and editing, making it usable entirely from the keyboard. Query results are fetched in chunks and pagin
Rainfrog is a terminal-based database client for human interaction rather than an MCP server that exposes database access to AI agents via the Model Context Protocol, so it's a neighboring tool but not what this search targets.
git-mcp is a Model Context Protocol server that transforms Git repositories and static sites into structured context providers for AI assistants. It functions as a documentation retrieval tool and repository indexer, exposing codebases and project files as standardized tools to reduce hallucinations in large language model responses. The project converts raw repository files, READMEs, and external URLs into formats optimized for token consumption. It enables AI agents to perform query-based code searches and retrieve specific sections of project documentation to maintain up-to-date technical
Git-MCP is an MCP server for retrieving code and documentation from Git repositories, not for database access—there is no SQL support, query execution, schema introspection, or read-only database mode, so it does not match this search.
| Repository | Stars | Language | License | Last push |
|---|---|---|---|---|
| supabase-community/supabase-mcp | 2.5K | TypeScript | apache-2.0 | |
| mindsdb/mindsdb | 39.8K | Makefile | MIT | |
| graphile/postgraphile | 12.9K | TypeScript | MIT | |
| pymysql/pymysql | 7.8K | Python | MIT | |
| mark3labs/mcp-go | 9.2K | Go | MIT | |
| launchbadge/sqlx | 17.6K | Rust | Apache-2.0 | |
| brianc/node-postgres | 13.2K | JavaScript | MIT | |
| coleifer/peewee | 12K | Python | MIT | |
| transitive-bullshit/chatgpt-api | 18.1K | TypeScript | NOASSERTION | |
| lib/pq | 10K | Go | NOASSERTION |