MySQL Database Server
Enable direct interaction with MySQL databases through a standardized MCP interface. Perform database operations such as connecting, querying, modifying tables, and listing schema details seamlessly. Simplify database management and integration within your LLM applications.
Installation
Installing for Claude Desktop
Manual Configuration Required
This MCP server requires manual configuration. Run the command below to open your configuration file:
npx mcpbar@latest edit -c claudeThis will open your configuration file where you can add the MySQL Database Server MCP server manually.
MySQL MCP Server for Smithery
A MySQL connector for Smithery that allows you to connect to your MySQL database directly from Smithery.
One-Click Installation
Global Installation
npm install -g mysql-aqara
Local Installation
npm install mysql-aqara
Manual Installation
- Clone this repository:
git clone https://github.com/aqaranewbiz/mysql-aqara.git
- Install dependencies:
cd mysql-aqara
npm install
pip install -r requirements.txt
- Make the run.js file executable (Unix/Linux/Mac):
chmod +x run.js
Usage
Using Global Installation
mysql-aqara
Using Local Installation
npx mysql-aqara
Direct Execution
node run.js
Features
- Smart Path Detection: Automatically finds the Python script in various locations
- Cross-Platform Support: Works on Windows, macOS, and Linux
- Automatic Python Detection: Uses
python3orpythondepending on your system - Automatic Requirements Installation: Installs required Python packages on startup
- Improved Error Handling: Better feedback for troubleshooting
Configuration
No environment variables required! When connecting to a database, you'll need to provide:
- host: Database server hostname or IP address
- user: Database username
- password: Database password
- database: Database name
Available Tools
connect_db
Establishes a connection to the MySQL database.
Parameters:
- host: Database server hostname
- user: Database username
- password: Database password
- database: Database name
create_or_modify_table
Creates a new table or modifies an existing one.
Parameters:
- table_name: Name of the table
- columns: Array of column definitions
execute_query
Executes a SELECT query on the database.
Parameters:
- query: SQL SELECT query
- params (optional): Parameters for the query
execute_command
Executes an INSERT, UPDATE, or DELETE query.
Parameters:
- command: SQL command to execute
- params (optional): Parameters for the command
list_tables
Lists all tables in the connected database.
Parameters: None
describe_table
Gets the structure of a specific table.
Parameters:
- table_name: Name of the table to describe
Troubleshooting
If you encounter issues:
-
Python Not Found: The server will automatically detect
python3orpython. If neither works, ensure Python is installed and in your PATH. -
Missing Modules: The server will attempt to install required packages automatically. If this fails, manually run:
pip install mysql-connector-python>=8.0.0 -
Connection Issues: Verify your database credentials and ensure the MySQL server is running and accessible.
-
Script Path Issues: The server checks multiple locations for the Python script. If it can't find it, ensure the
mcp_server.pyfile is in the same directory asindex.jsor in the current working directory.
License
MIT
Contact
If you have any questions, please create an issue.
Stars
0Forks
0Last commit
7 months agoRepository age
7 months
Auto-fetched from GitHub .
MCP servers similar to MySQL Database Server:
Stars
Forks
Last commit
Stars
Forks
Last commit
Stars
Forks
Last commit