SQL

•
5
•

Provides a server for the Model Context Protocol (MCP), offering database metadata, sample data, and read-only query capabilities.

SQL-MCP functions as a dedicated server for the Model Context Protocol (MCP), enabling controlled and secure exposure of database information. It provides essential capabilities such as fetching database metadata, serving sample data, and executing read-only SQL queries. Designed with flexibility in mind, it supports both stdio and HTTP transport mechanisms. The tool prioritizes security by implementing injection validation for SQL queries, sanitizing sensitive output fields like passwords, and offering optional credential protection. With robust logging features and straightforward deployment via npm, Docker, or Docker Compose, SQL-MCP offers a reliable solution for integrating database context into various applications and development workflows.

Key Features

01Provides database metadata and sample data via MCP.
020 GitHub stars
03Supports multiple transport methods, including stdio and HTTP.
04Enables secure read-only SQL queries with built-in injection validation.
05Automatically sanitizes sensitive output fields (e.g., passwords) with masking.
06Offers flexible deployment options via npm, Docker, or Docker Compose.

Use Cases

01Integrating secure database context into development workflows that consume the Model Context Protocol.
02Debugging and testing Model Context Protocol integrations using tools like MCP Inspector.
03Providing controlled, read-only access to database information for external applications or services.