Local MySQL Read Only Server
БесплатноНе проверенProvides a read-only interface to local MySQL databases via MCP, enabling listing databases, tables, describing schemas, and querying rows with structured filte
Описание
Provides a read-only interface to local MySQL databases via MCP, enabling listing databases, tables, describing schemas, and querying rows with structured filters.
README
This project provides a small stdio MCP server for reading local MySQL data. It is designed to run with:
D:\anaconda\envs\torch\python.exe
The server implements a minimal MCP JSON-RPC stdio layer directly because the
official Python MCP SDK requires a newer Python than the current torch
environment.
Install Dependency
Recommended:
conda install -n torch -c conda-forge pymysql
Fallback:
D:\anaconda\envs\torch\python.exe -m pip install PyMySQL -i https://pypi.tuna.tsinghua.edu.cn/simple
If both commands fail because of local SSL or proxy settings, install PyMySQL
manually into the torch conda environment and then run the tests below.
Configure MySQL
Copy the example file and fill in local credentials:
Copy-Item mysql_mcp_config.example.json mysql_mcp_config.json
mysql_mcp_config.json is ignored by git. You can also point to another config
file with:
$env:MYSQL_MCP_CONFIG = "D:\path\to\mysql_mcp_config.json"
Use a MySQL user with read-only permissions whenever possible. The MCP server only exposes read tools, but database permissions should still enforce the same rule.
MCP Client Configuration
Example stdio configuration:
{
"mcpServers": {
"local-mysql-readonly": {
"command": "D:\\anaconda\\envs\\torch\\python.exe",
"args": ["D:\\桌面\\aienglish\\server.py"],
"env": {
"MYSQL_MCP_CONFIG": "D:\\桌面\\aienglish\\mysql_mcp_config.json"
}
}
}
}
Tools
list_databases: list visible databases, excluding system schemas by default.list_tables: list tables and views in one database.describe_table: return column and index metadata.read_rows: read rows using structured filters, ordering, limit, and offset.
read_rows does not accept raw SQL. Database, table, and column names are
validated against MySQL metadata, and values are sent as query parameters.
Allowed filter operators:
=, !=, <, <=, >, >=, LIKE, IN, IS NULL, IS NOT NULL
Test
D:\anaconda\envs\torch\python.exe -m unittest
After mysql_mcp_config.json is configured and PyMySQL is installed, validate
manually with your MCP client by calling:
list_databaseslist_tablesdescribe_tableread_rowswithlimitset to5
Установка Local MySQL Read Only Server
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/YaangHailong/MCP-stdioFAQ
Local MySQL Read Only Server MCP бесплатный?
Да, Local MySQL Read Only Server MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Local MySQL Read Only Server?
Нет, Local MySQL Read Only Server работает без API-ключей и переменных окружения.
Local MySQL Read Only Server — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Local MySQL Read Only Server в Claude Desktop, Claude Code или Cursor?
Открой Local MySQL Read Only Server на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
wenb1n-dev/SmartDB_MCP
A universal database MCP server supporting simultaneous connections to multiple databases. It provides tools for database operations, health analysis, SQL optim
автор: wenb1n-devPostgres Server
This server enables interaction with PostgreSQL databases through the Model Context Protocol, optimized for the AWS Bedrock AgentCore Runtime. It provides tools
автор: madhurprashPostgres
Query your database in natural language
автор: AnthropicPostgreSQL
Read-only database access with schema inspection.
автор: modelcontextprotocolCompare Local MySQL Read Only Server with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории data
