mysql-mcp-server

mysql-mcp-server

1

The MySQL MCP Server is designed to provide read-only access to MySQL databases, allowing users to inspect schemas and execute read-only queries through a Model Context Protocol server. It includes features for querying and accessing schema information, with a focus on security and ease of use with tools like Cursor.

MySQL MCP Server

A Model Context Protocol server providing read-only access to MySQL databases. Allows LLMs to inspect database schemas and execute read-only queries.

Components

Tools

  • query: Execute read-only SQL queries against the connected database.

Resources

  • Table Schemas: JSON schema information for each table, including column names and data types.

Installation

  1. Clone the repository and install dependencies.
  2. Create a global link to use the mysql-mcp-server command universally.

Usage with Cursor

Configure MCP in Cursor to use the MySQL server with the mysql-mcp-server command.

Security Best Practices

  • Use environment variables for credentials.
  • Ensure MySQL users have minimal permissions.
  • Adopt strong passwords and security measures.
  • Avoid committing credentials to version control.

License

Licensed under the MIT License, allowing free use, modification, and distribution.