mcp-mysql-server

mcp-mysql-server

0

The @enemyrr/mcp-mysql-server is a Model Context Protocol server designed to facilitate MySQL database operations for AI models. It supports multiple connection methods, ensures secure and efficient database interactions, and simplifies schema management. It is open to contributions and is released under the MIT license.

@enemyrr/mcp-mysql-server

A Model Context Protocol server that provides MySQL database operations. This server allows AI models to interact with MySQL databases through a standardized interface.

Installation & Setup for Cursor IDE

Installing via Smithery

  • Install MySQL Database Server for Claude Desktop via Smithery.

Installing Manually

  1. Clone and build the project.
  2. Add the server in Cursor IDE settings.

Database Configuration

  • Configure the database connection using URL in .env, individual parameters in .env, or direct connection via tool.

Available Tools

  • connect_db: Connect to MySQL database.
  • query: Execute SELECT queries.
  • execute: Execute INSERT, UPDATE, or DELETE queries.
  • list_tables: List all tables.
  • describe_table: Describe a specific table.
  • create_table: Create a new table.
  • add_column: Add a new column to a table.

Features

  • Multiple connection methods
  • Secure connection handling
  • Prepared statement support
  • Schema management tools
  • Detailed error handling

Security

  • Prevents SQL injection
  • Secure password handling
  • Queries validation

Error Handling

  • Provides detailed error messages for configuration and database errors.

Contributing

  • Contributions are welcome via Pull Requests.

License

  • MIT