What queries does Jewei Mysql Mcp Server support?
Only SELECT statements are supported. INSERT, UPDATE, DELETE, and other SQL commands are not allowed.
@jeweis
基本情報
# MySQL MCP Server
以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。
{
"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"
}
}
}
}执行SQL查询并返回结果集(仅支持SELECT语句) Args: sql: SQL查询语句(必须是SELECT语句) Returns: 包含查询结果的字典,格式为: { "columns": [列名列表], "rows": [行数据列表], "row_count": 结果行数 }
获取指定表的结构信息 Args: table_name: 表名 schema: 数据库名,默认为当前数据库 Returns: 包含表结构信息的字典,格式为: { "columns": [列信息列表], "primary_keys": [主键列表], "foreign_keys": [外键信息列表], "indexes": [索引信息列表] }
列出数据库中的所有表 Args: schema: 数据库名,默认为当前数据库 Returns: 包含表列表的字典,格式为: { "tables": [表信息列表], "count": 表数量 }
获取数据库基本信息 Returns: 包含数据库信息的字典,格式为: { "database_name": 当前数据库名, "version": 数据库版本, "schemas": [数据库列表], "connection": { "host": 主机名, "port": 端口, "database": 数据库名, "user": 用户名 } }
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.
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.
Only SELECT statements are supported. INSERT, UPDATE, DELETE, and other SQL commands are not allowed.
Set the environment variables DB_HOST, DB_PORT, DB_USER
Universal MCP-Server for your Databases optimized for LLMs and AI-Agents.
Postgres MCP Pro provides configurable read/write access and performance analysis for you and your AI agents.
Connect ClickHouse to your AI assistants.
Local MCP server for DuckDB and MotherDuck
コメント