Basic information
About Jewei Mysql Mcp Server
# MySQL MCP Server
Jewei Mysql Mcp Server is a MCP server in the Databases category listed in the AddMCP.net directory, published by jeweis. It exposes 4 tools, including query_sql, get_table_structure, list_tables, get_db_info. Supported transport: stdio. Runtime: python. License: MIT License. The repository has 1 GitHub stars. Source code is hosted on github.com. Related topics: mysql, mysql-mcp.
Setup
{
"mcpServers": {
"jewei-mysql": {
"disabled": false,
"command": "uvx",
"args": [
"jewei-mysql-mcp-server"
],
"env": {
"DB_HOST": "your_db_host",
"DB_USER": "your_db_user",
"DB_PASSWORD": "your_db_password",
"DB_NAME": "your_db_name",
"DB_PORT": "your_db_port"
}
}
}
}
{
"mcpServers": {
"jewei-mysql": {
"disabled": false,
"command": "uvx",
"args": [
"jewei-mysql-mcp-server"
],
"env": {
"DB_HOST": "your_db_host",
"DB_USER": "your_db_user",
"DB_PASSWORD": "your_db_password",
"DB_NAME": "your_db_name",
"DB_PORT": "your_db_port"
}
}
}
}
{
"servers": {
"jewei-mysql": {
"disabled": false,
"command": "uvx",
"args": [
"jewei-mysql-mcp-server"
],
"env": {
"DB_HOST": "your_db_host",
"DB_USER": "your_db_user",
"DB_PASSWORD": "your_db_password",
"DB_NAME": "your_db_name",
"DB_PORT": "your_db_port"
}
}
}
}
Jewei Mysql Mcp Server config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"jewei-mysql": {
"disabled": false,
"command": "uvx",
"args": [
"jewei-mysql-mcp-server"
],
"env": {
"DB_HOST": "your_db_host",
"DB_USER": "your_db_user",
"DB_PASSWORD": "your_db_password",
"DB_NAME": "your_db_name",
"DB_PORT": "your_db_port"
}
}
}
}
Jewei Mysql Mcp Server tools
-
query_sql
— 执行SQL查询并返回结果集(仅支持SELECT语句)
Args:
sql: SQL查询语句(必须是SELECT语句)
Returns:
包含查询结果的字典,格式为:
{
"columns": [列名列表],
"rows": [行数据列表],
"row_count": 结果行数
}
sql:string* -
get_table_structure
— 获取指定表的结构信息
Args:
table_name: 表名
schema: 数据库名,默认为当前数据库
Returns:
包含表结构信息的字典,格式为:
{
"columns": [列信息列表],
"primary_keys": [主键列表],
"foreign_keys": [外键信息列表],
"indexes": [索引信息列表]
}
schema:string, table_name:string* -
list_tables
— 列出数据库中的所有表
Args:
schema: 数据库名,默认为当前数据库
Returns:
包含表列表的字典,格式为:
{
"tables": [表信息列表],
"count": 表数量
}
schema:string -
get_db_info
— 获取数据库基本信息
Returns:
包含数据库信息的字典,格式为:
{
"database_name": 当前数据库名,
"version": 数据库版本,
"schemas": [数据库列表],
"connection": {
"host": 主机名,
"port": 端口,
"database": 数据库名,
"user": 用户名
}
}
(no parameters)
Overview
What is Jewei Mysql Mcp Server?
Jewei Mysql Mcp Server is a MySQL database query server that executes SQL queries (only SELECT statements), retrieves table structure information (columns, primary keys, foreign keys, indexes), and lists all tables in a database. It is designed for developers who need to interact with MySQL databases through MCP-compatible tools like Windsurf, Cursor, Claude, or Cline.
How to use Jewei Mysql Mcp Server?
Install dependencies with pip install -r requirements.txt, create a .env file with the environment variables DB_HOST, DB_PORT, DB_USER, DB_PASSWORD, and DB_NAME, then run using uvx --from jewei-mysql-mcp-server jewei-mysql-mcp-server (recommended) or from source with python -m jewei_mysql_mcp_server.server. Configure the server in MCP config files for supported clients, replacing placeholder values with your actual database connection info.
Key features of Jewei Mysql Mcp Server
- Execute SQL queries and return result sets (SELECT only)
- Get detailed table structure including columns, keys, and indexes
- List all tables in the specified database
- Supports MCP integration with Windsurf, Cursor, Claude, and Cline
- Run via uvx for easy installation and execution
Use cases of Jewei Mysql Mcp Server
- Query a MySQL database using SELECT statements through MCP clients
- Explore database schema by listing tables and viewing table structure
- Integrate MySQL database interactions into AI-assisted development workflows
Frequently asked questions
1 What queries does Jewei Mysql Mcp Server support?
Only SELECT statements are supported. INSERT, UPDATE, DELETE, and other SQL commands are not allowed.
2 How do I configure the database connection for Jewei Mysql Mcp Server?
Set the environment variables DB_HOST, DB_PORT, DB_USER
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In