Skip to main content

A powerful Model Context Protocol (MCP) server that provides universal SQL database connectivity with intelligent query optimization, schema introspection, and built-in safety features for AI assistants.

Project description

Documentation Status https://github.com/MacHu-GWU/mcp_ohmy_sql-project/actions/workflows/main.yml/badge.svg https://codecov.io/gh/MacHu-GWU/mcp_ohmy_sql-project/branch/main/graph/badge.svg https://img.shields.io/pypi/v/mcp-ohmy-sql.svg https://img.shields.io/pypi/l/mcp-ohmy-sql.svg https://img.shields.io/pypi/pyversions/mcp-ohmy-sql.svg https://img.shields.io/badge/✍️_Release_History!--None.svg?style=social&logo=github https://img.shields.io/badge/⭐_Star_me_on_GitHub!--None.svg?style=social&logo=github
https://img.shields.io/badge/Link-API-blue.svg https://img.shields.io/badge/Link-GitHub-blue.svg https://img.shields.io/badge/Link-Submit_Issue-blue.svg https://img.shields.io/badge/Link-Request_Feature-blue.svg https://img.shields.io/badge/Link-Download-blue.svg

Welcome to mcp_ohmy_sql Documentation

https://mcp-ohmy-sql.readthedocs.io/en/latest/_static/mcp_ohmy_sql-logo.png

👀 Overview

mcp_ohmy_sql is a powerful SQL Model Context Protocol (MCP) server that bridges AI assistants with your databases. Built on SQLAlchemy’s robust foundation, it provides universal database connectivity with intelligent query optimization, configurable access controls, and built-in safeguards against excessive data loads to LLMs.

Transform your database interactions with natural language queries, automatic schema discovery, and intelligent result formatting—all while maintaining enterprise-grade security and performance.

See 📚 Full Documentation HERE

🚀 Feature Highlights

Universal Database Support

Connect to virtually any SQL database through SQLAlchemy’s proven architecture. From lightweight SQLite to enterprise PostgreSQL, MySQL, Oracle, and SQL Server—all supported out of the box.

Multi-Database Architecture

Manage multiple databases and schemas simultaneously from a single MCP server. Perfect for complex environments with dev/staging/production databases or multi-tenant applications.

Intelligent Query Optimization

Built-in query analysis engine prevents expensive operations, automatically limits result sets, and provides performance feedback to help you write efficient queries.

AI-Optimized Schema Encoding

Schema information is compressed by ~70% using a specialized encoding format, dramatically reducing token usage while preserving all essential metadata for accurate query generation.

Enterprise-Ready Security

Fine-grained table filtering, parameterized query support, and read-only operations by default. Access controls ensure your production data stays safe.

💎 Why Choose mcp_ohmy_sql?

While other SQL MCP servers exist, mcp_ohmy_sql stands out through:

Comprehensive Database Ecosystem

Beyond traditional SQL databases, we’re expanding to support modern data platforms including AWS Aurora, Redshift, Glue Catalog, MongoDB Atlas SQL, ElasticSearch, OpenSearch, DuckDB, and S3 data files.

🔧 Production-Ready Architecture

Designed for real-world usage with connection pooling, error handling, query timeouts, and result size limits that prevent your LLM conversations from breaking.

📊 Intelligent Result Formatting

Query results are automatically formatted as Markdown tables—the optimal format for LLM comprehension, using 24% fewer tokens than JSON while maintaining perfect readability.

🔒 Security-First Approach

Built-in safeguards include SQL injection prevention, read-only operations, table filtering, and upcoming fine-grained access controls for enterprise deployments.

🎯 Developer Experience

Comprehensive documentation, clear error messages, and extensive configuration options make setup and maintenance straightforward.

Coming Soon: Remote MCP server deployment, advanced access controls, and expanded database ecosystem support.

See our ROADMAP.md for the complete vision and upcoming features.

🚀️ Supported Features

See our ROADMAP.md for the complete vision and upcoming features.

Feature Support Status

Feature

Status

Note

Multi Database Support

✅ Supported

Local MCP Server via UV

✅ Supported

Local MCP Server via Docker

⏳ In Progress

Remote MCP Server

⏳ In Progress

One Click to Deploy Remote MCP Server

⏳ In Progress

Export Results to Local Files

⏳ In Progress

Local Data File Analysis

⏳ In Progress

User Management

⏳ In Progress

Remote MCP server only feature

Access Control Management

⏳ In Progress

Remote MCP server only feature

🛢️ Supported Databases

See our ROADMAP.md for the complete vision and upcoming features.

Database Support Status

Database

Status

Note

Sqlite

✅ Supported

via Sqlalchemy

Postgres

✅ Supported

via Sqlalchemy

MySQL

✅ Supported

via Sqlalchemy

Oracle

✅ Supported

via Sqlalchemy

MSSQL

✅ Supported

via Sqlalchemy

AWS Aurora

⏳ In Progress

via boto3

AWS Redshift

✅ Supported

via boto3

AWS Glue Catalog Databases

⏳ In Progress

via boto3

MongoDB

⏳ In Progress

via Atlas SQL

ElasticSearch

⏳ In Progress

via ElasticSearch SQL

OpenSearch

⏳ In Progress

via OpenSearch SQL

DuckDB

⏳ In Progress

via duckdb

Data Files on AWS S3

⏳ In Progress

via boto3

🎯 Get Started

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_ohmy_sql-0.1.3.tar.gz (69.8 kB view details)

Uploaded Source

Built Distribution

mcp_ohmy_sql-0.1.3-py3-none-any.whl (93.4 kB view details)

Uploaded Python 3

File details

Details for the file mcp_ohmy_sql-0.1.3.tar.gz.

File metadata

  • Download URL: mcp_ohmy_sql-0.1.3.tar.gz
  • Upload date:
  • Size: 69.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for mcp_ohmy_sql-0.1.3.tar.gz
Algorithm Hash digest
SHA256 fd893b0bf7754366254261bcca49004020c92952e712eb937e338768585c1f87
MD5 c4767ff81f3310332f580de9e26144fe
BLAKE2b-256 17572ca65237d75389e6891e24a383fad52cae8813f65042e939bf1a8f3a9ffa

See more details on using hashes here.

File details

Details for the file mcp_ohmy_sql-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: mcp_ohmy_sql-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 93.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for mcp_ohmy_sql-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a1c3bc9edc4d939eb5207b164c9dbfa1e9edb94eafa0e16a318e938e4903b2db
MD5 7efa03809b6964d98be264bb68fdba18
BLAKE2b-256 9315e895e2898968a479239d480adb7683861ffab134f1ae0698390d26778476

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page