Labsco
Shion-Serizawa logo

MySQL Schema MCP Server

from Shion-Serizawa

A server for retrieving MySQL database schema information using the FastMCP framework.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeQuick setup

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

Example

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")