Skip to content
Download Longwave

MySQL

MySQL is an MCP server for reading and querying MySQL with schema awareness. Its connected implementation exposes 0 tools when the server starts successfully.

Add to Longwave Source

Install elsewhere

Install MySQL

Choose a harness. These instructions start the same local MCP server shown on this page.

Claude Code

Run this in your terminal. It adds a user-scoped server; use --scope project instead if it should apply only to the current project.

terminal
claude mcp add --scope user --transport stdio --env MYSQL_HOST=YOUR_MYSQL_HOST --env MYSQL_USER=YOUR_MYSQL_USER --env MYSQL_PASS=YOUR_MYSQL_PASS mysql -- npx -y @benborla29/mcp-server-mysql

Replace each YOUR_… value with the required secret before running the command.

What it does

MySQL MCP connects an agent to a MySQL database with its schema in reach. It is for questions about the real tables, columns and data—not a schema the agent has reconstructed from memory.

  • Inspect MySQL schemas and tables.
  • Run database queries through the MCP connection.
  • Use schema information when forming a query.
  • Pass MySQL host and credentials through environment variables.
  • Review the live function arguments before a database call.

Skills that ship with it

The skill is a pointer rather than a method. The server's own tool descriptions carry the detail of how to query. Longwave installs it with the server, and each name below opens the skill's source.

Questions people ask

How do I use MySQL MCP in Cursor?

Add the local MySQL server to Cursor's MCP settings and provide the database host, user and password through the server environment. Cursor can use the schema and query operations after startup.

Which MySQL MCP server should I use?

The catalog entry is a local server for schema-aware MySQL queries. Check its live launch details and required credentials before substituting a different package from a search result.

Can MySQL MCP connect to a MySQL database?

Yes. Provide the MySQL host and credentials to the local process. The process must be able to reach the database from the machine where the MCP client starts it.

Can MySQL MCP run in Docker?

Yes, if the container can reach the MySQL host and receives the required connection values. Use a database account with only the permissions the agent needs.

Can MySQL MCP run in Python?

The catalog includes a Python-oriented server launch path. Use the resolved command shown for this entry and let it manage the runtime instead of mixing it with an unrelated global Python installation.

Can MySQL MCP run SELECT queries?

The entry is for reading and querying MySQL. Check the live function schema before relying on a specific SELECT operation or query argument.

What credentials does MySQL MCP need?

It needs a MySQL host, user and password. Keep those values in the server environment and use a database account with limited permissions.

Give the agent the real MySQL schema.

Let it query the database you actually run instead of guessing from a pasted example.