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.4.tar.gz (69.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_ohmy_sql-0.1.4-py3-none-any.whl (93.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mcp_ohmy_sql-0.1.4.tar.gz
  • Upload date:
  • Size: 69.9 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.4.tar.gz
Algorithm Hash digest
SHA256 6119f0bd64465e1daaa5dc66286a10e4959e111ab75762111da012eeccd5407b
MD5 31922ddd82377850e60a5267375a4e0d
BLAKE2b-256 a9b380fc45b761a4ed7d473f234322fe75a40c9f4f0f7efed227fd62a2312e30

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mcp_ohmy_sql-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 93.5 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 10008fb2dd6dddd8dd1a124c2270a86c52b4edf3ade71baa90977ab68eebaa8d
MD5 6d990c00903deb354825478f86bd1f20
BLAKE2b-256 d6e46c9cae2570d7e74b5a22cab252b0c190a674b9de860db1bc0588e1581972

See more details on using hashes here.

Supported by

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