MySQLReader
by ChenRongpeng1998
MySQLReader is an MCP service designed for reading MySQL databases. It focuses on security by providing only query operations, with no support for adding, deleting, or modifying data.
Last updated: N/A
What is MySQLReader?
MySQLReader is an MCP service that allows you to read data from a MySQL database. It prioritizes security by only offering query functionality.
How to use MySQLReader?
To use MySQLReader, you need to install the required dependencies using uv sync
and configure the service in your claude_desktop_config.json
file. You can specify the database host, database name, and authentication method (environment variables, file, or encrypted file). The mysql_reader.py
script takes the host and database as required arguments, and authentication method related arguments.
Key features of MySQLReader
Read-only access to MySQL databases
Supports multiple authentication methods (environment variables, plain text file, encrypted file)
Uses pymysql library for database interaction
Integration with Claude Desktop
RSA encryption for secure credential storage
Use cases of MySQLReader
Querying data from a MySQL database within a secure environment
Integrating MySQL data into Claude Desktop applications
Accessing database information without exposing sensitive credentials in plain text
Building read-only data dashboards
FAQ from MySQLReader
What authentication methods are supported?
What authentication methods are supported?
The service supports three authentication methods: environment variables (ev), plain text file (file), and RSA-encrypted file (efile).
How do I install the necessary dependencies?
How do I install the necessary dependencies?
Use pip install uv
to install uv, then navigate to the project directory, run uv sync
to synchronize the environment, and activate the virtual environment with .venv\Scripts\activate
.
How do I configure the service in claude_desktop_config.json
?
How do I configure the service in claude_desktop_config.json
?
Add a new entry under mcpServers
with the command set to uv
and the arguments including the path to the script, database host, database name, and authentication method.
How do I use the RSA encryption feature?
How do I use the RSA encryption feature?
Use the RSA_key_generator.py
script to encrypt your username and password. Specify the desired file names for the public key, private key, and encrypted data. Then, configure the service to use the efile
authentication method and provide the paths to the encrypted file and private key.
Is it safe to store my credentials in a plain text file?
Is it safe to store my credentials in a plain text file?
No, storing credentials in a plain text file is not recommended due to security risks. Use the environment variable or encrypted file methods instead.