概要
What is MySQL MCP Server?
MySQL MCP Server is a database management tool built with FastMCP that provides an interactive interface for managing SQLite databases. It includes both a server component and a client interface, enabling users to list tables, inspect schema, and execute SQL queries through natural language commands.
How to use MySQL MCP Server?
Set up a Python 3.8+ environment, clone the repository, install dependencies, and run the fixture to create the database. Start the server with fastmcp run mcpserver.py:mcp --transport sse --host 127.0.0.1 --port 8000, then run the client with python mcpclient.py. Use natural language commands like "Show me all tables in the database" or "Describe the structure of the users table".
Key features of MySQL MCP Server
- List all tables in the SQLite database.
- Get detailed schema information for any table.
- Execute SQL queries with formatted results.
- Interactive client interface for database operations.
Use cases of MySQL MCP Server
- Quick exploration of database schema and tables.
- Running ad-hoc SQL queries without a separate client.
- Managing database content through conversational prompts.
FAQ from MySQL MCP Server
What are the prerequisites?
Python 3.8 or higher and pip (Python package installer) are required.
How do I install dependencies?
Run pip install -r requirements.txt inside a virtual environment.
Where is the database stored?
The database is created by running python sqlite_fixture.py; it is a local SQLite file (not specified further in the README).
What transport does the server use?
The server uses SSE (Server-Sent Events) on HTTP, started with --transport sse and default port 8000.
Is authentication required?
The README does not mention any authentication mechanism.