Configuration Guide

The mcp_ohmy_sql MCP server uses a flexible JSON-based configuration system that supports multiple databases and schemas. This guide is organized into focused sections to help you configure the server for your specific database setup.

Quick Start

  1. Set the configuration file path:

    export MCP_OHMY_SQL_CONFIG=/path/to/your/config.json
    
  2. Create a basic configuration file

  3. Add your databases

  4. Configure schemas and table filters

  5. Set up database connections

Configuration Sections

Basic Configuration:

Learn the basic structure of the configuration file, including version, settings, and the overall JSON schema.

Database Configuration:

Understand how to define multiple databases, including identifiers, descriptions, and database-level settings.

Schema Configuration

Configure schemas within databases, including table filtering and schema-specific access controls.

Connection Configuration

Set up SQLAlchemy connections with proper connection strings and engine parameters.

Relational Database Connection Configuration

Detailed configuration examples for popular relational databases like PostgreSQL, MySQL, SQLite, and SQL Server.

AWS Redshift Connection Configuration

Specialized configuration for AWS Redshift data warehouses, including authentication and optimization settings.

What You’ll Learn

  • How to structure JSON configuration files

  • Database connection setup for multiple database types

  • Schema and table filtering strategies

  • Security best practices for credentials

  • Connection pooling and performance optimization

  • Troubleshooting common configuration issues

Next Steps

After completing your configuration:

  1. Start the MCP server with your configuration

  2. Use the get_database_schema tool to verify your databases are accessible

  3. Begin querying your databases through the AI assistant

For more information on available tools and their usage, see the Tools Guide documentation.