Track MCP LogoTrack MCP
Track MCP LogoTrack MCP

The world's largest repository of Model Context Protocol servers. Discover, explore, and submit MCP tools.

Product

  • Categories
  • Top MCP
  • New & Updated
  • Submit MCP

Company

  • About

Legal

  • Privacy Policy
  • Terms of Service
  • Cookie Policy

© 2026 TrackMCP. All rights reserved.

Built with ❤️ by Krishna Goyal

    Mcp First

    0 stars
    Python
    Updated Oct 5, 2025

    Table of Contents

    • Features
    • Setup
    • Local Setup with uv
    • Local Setup with pip
    • Docker Setup
    • Building and Running the Docker Image
    • Usage
    • Local Usage
    • Docker Usage
    • MCP JSON Configuration
    • Local MCP Configuration
    • Docker MCP Configuration
    • Available Tools
    • Example

    Table of Contents

    • Features
    • Setup
    • Local Setup with uv
    • Local Setup with pip
    • Docker Setup
    • Building and Running the Docker Image
    • Usage
    • Local Usage
    • Docker Usage
    • MCP JSON Configuration
    • Local MCP Configuration
    • Docker MCP Configuration
    • Available Tools
    • Example

    Documentation

    MySQL Schema MCP Server

    A Metadata Change Proposal (MCP) server for retrieving MySQL database schema information using the FastMCP framework.

    Features

    • Retrieve database list
    • Retrieve table list from databases
    • Get table schema (columns) information
    • Get table indexes information
    • Get table foreign key information

    Setup

    Local Setup with uv

    1. Clone this repository

    2. Install uv if you don't have it already:

    bash
    pip install uv

    3. Create a virtual environment and install dependencies:

    bash
    uv venv
       uv pip install -r requirements.txt

    4. Create a .env file based on .env.example with your MySQL connection details:

    code
    MYSQL_HOST=localhost
       MYSQL_PORT=3306
       MYSQL_USER=your_username
       MYSQL_PASSWORD=your_password
       MYSQL_DATABASE=information_schema

    Local Setup with pip

    1. Clone this repository

    2. Install dependencies:

    code
    pip install -r requirements.txt

    3. Create a .env file based on .env.example with your MySQL connection details:

    code
    MYSQL_HOST=localhost
       MYSQL_PORT=3306
       MYSQL_USER=your_username
       MYSQL_PASSWORD=your_password
       MYSQL_DATABASE=information_schema

    Docker Setup

    Building and Running the Docker Image

    1. Clone this repository

    2. Build the Docker image:

    code
    docker build -t mysql-mcp-server .

    3. Run the Docker container with environment variables for MySQL connection:

    code
    docker run -p 8000:8000 \
         -e MYSQL_HOST=host.docker.internal \
         -e MYSQL_PORT=3306 \
         -e MYSQL_USER=your_username \
         -e MYSQL_PASSWORD=your_password \
         -e MYSQL_DATABASE=information_schema \
         mysql-mcp-server

    Note: host.docker.internal is used to connect to the MySQL instance running on your host machine from inside the Docker container.

    4. For Mac and Windows, host.docker.internal resolves to the host machine. For Linux, you may need to use:

    code
    docker run -p 8000:8000 \
         --add-host=host.docker.internal:host-gateway \
         -e MYSQL_HOST=host.docker.internal \
         -e MYSQL_USER=your_username \
         -e MYSQL_PASSWORD=your_password \
         mysql-mcp-server

    Usage

    Local Usage

    Start the server:

    code
    python main.py

    Docker Usage

    Run the Docker container (as shown in the setup section):

    code
    docker run -p 8000:8000 \
      -e MYSQL_HOST=host.docker.internal \
      -e MYSQL_USER=your_username \
      -e MYSQL_PASSWORD=your_password \
      mysql-mcp-server

    You can also create a .env file and mount it to the container:

    code
    docker run -p 8000:8000 \
      -v $(pwd)/.env:/app/.env \
      mysql-mcp-server

    MCP JSON Configuration

    To use this MCP server with MCP-compatible clients, you'll need to configure the client with the appropriate JSON configuration. Here are examples for both local and Docker setups:

    Local MCP Configuration

    json
    {
      "mcpServers": {
        "mysql-schema": {
          "command": "python",
          "args": [
            "main.py"
          ],
          "cwd": "/path/to/mcp-first",
          "alwaysAllow": [
            "databases",
            "tables",
            "schema",
            "indexes",
            "foreign_keys"
          ]
        }
      }
    }

    Docker MCP Configuration

    json
    {
      "mcpServers": {
        "mysql-schema": {
          "command": "docker",
          "args": [
            "run",
            "-i",
            "--rm",
            "-e",
            "MYSQL_HOST=host.docker.internal",
            "-e",
            "MYSQL_USER=your_username",
            "-e",
            "MYSQL_PASSWORD=your_password",
            "mysql-mcp-server"
          ],
          "alwaysAllow": [
            "databases",
            "tables",
            "schema",
            "indexes",
            "foreign_keys"
          ]
        }
      }
    }

    Available Tools

    The server provides the following tools:

    • databases: List all databases
    • tables: List all tables in a database
    • schema: Get the schema (columns, indexes, and foreign keys) for one or more tables.
    • indexes: Get the indexes for a specific table
    • foreign_keys: Get the foreign keys for a specific table

    Example

    python
    from fastmcp.client import Client
    
    # Connect to the MCP server
    client = Client("http://localhost:8000")
    
    # List all databases
    databases = client.databases()
    
    # List tables in a specific database
    tables = client.tables(database="your_database")
    
    # Get schema for a specific table
    schema = client.schema(tables=["your_table"], database="your_database")
    
    # Get schema for multiple tables
    schemas = client.schema(tables=["table1", "table2"], database="your_database")
    
    # Get indexes for a specific table
    indexes = client.indexes(table="your_table", database="your_database")
    
    # Get foreign keys for a specific table
    foreign_keys = client.foreign_keys(table="your_table", database="your_database")

    Similar MCP

    Based on tags & features

    • CH

      Chuk Mcp Linkedin

      Python00
    • PU

      Pursuit Mcp

      Python00
    • HE

      Hello Mcp

      Python00
    • GR

      Gradle Mcp

      Python00

    Trending MCP

    Most active this week

    • PL

      Playwright Mcp

      TypeScript·
      22.1k
    • SE

      Serena

      Python·
      14.5k
    • MC

      Mcp Playwright

      TypeScript·
      4.9k
    • MC

      Mcp Server Cloudflare

      TypeScript·
      3.0k
    View All MCP Servers

    Similar MCP

    Based on tags & features

    • CH

      Chuk Mcp Linkedin

      Python00
    • PU

      Pursuit Mcp

      Python00
    • HE

      Hello Mcp

      Python00
    • GR

      Gradle Mcp

      Python00

    Trending MCP

    Most active this week

    • PL

      Playwright Mcp

      TypeScript·
      22.1k
    • SE

      Serena

      Python·
      14.5k
    • MC

      Mcp Playwright

      TypeScript·
      4.9k
    • MC

      Mcp Server Cloudflare

      TypeScript·
      3.0k