MySQL MCP Server

MySQL MCP Server is an MCP server that provides read-only access to MySQL databases for Model Context Protocol clients. It connects directly to a specified MySQL database instance using standard connection strings, enabling AI assistants such as Cursor to inspect schema structures and execute analytical queries. Developers, data analysts, and software engineers use this server to explore existing database schemas, understand table relations, and debug data issues within conversational coding workflows. All queries sent through the server are restricted to read-only transactions, preventing unauthorized data modification, deletion, or schema altering operations. By exposing table metadata and column types as MCP resources, the server helps language models contextualize database structures before querying. This setup enables quick troubleshooting, data exploration, and automated reporting without manually switching between database management tools and coding environments.

Category: Databases & Data Stores

Tags: database, mysql, query, SQL

Visit MySQL MCP Server

How to install and configure MySQL MCP Server

Follow these steps to install and configure the server for use with Cursor: 1. Clone the repository and install dependencies: sh git clone https://github.com/shreyansh-ghl/mysql-mcp-server.git cd mysql-mcp-server npm run prepare npm install 2. Create a global command-line link: sh npm link 3. Open Cursor settings by clicking the gear icon or pressing Shift + Cmd + J on macOS, navigate to MCP in the left sidebar, and click Add Global MCP Server. 4. Add the server configuration to your MCP configuration block: json { "mcpServers": { "mysql": { "command": "mysql-mcp-server", "args": ["mysql://user:password@localhost:3306/mydb"] } } } 5. Save the configuration and restart Cursor.

What you can do with MySQL MCP Server

  • Inspecting MySQL table structures and column types directly from Cursor to understand data schemas without manual database lookups. * Running read-only SQL queries in conversational chat to verify application records, test query logic, and debug data discrepancies. * Providing live database context to AI coding assistants to generate accurate SQL joins and application models based on existing tables. * Gathering analytical metrics and business data securely using strictly enforced read-only database transactions within developer workflows.

Key facts

  • Open Source
  • https://github.com/shreyansh-ghl/mysql-mcp-server
  • Databases & Data Stores
  • database, mysql, query, SQL

Part of MCP Servers

Related MCP servers

  • MCP Memory Keeper — MCP Memory Keeper is an MCP server that provides persistent context management and memory storage for Claude AI coding assistants.…
  • MCP Notes — MCP Notes is an MCP server that provides note-taking and note-management capabilities to AI models using Amazon Web Services DynamoDB…
  • MCP Neo4j Server — MCP Neo4j Server is an MCP server that provides an integration between the Neo4j graph database and Model Context Protocol…
  • MCP Memory Toolkit — MCP Memory Toolkit is an MCP server that provides persistent memory capabilities for Claude and other compatible assistants using ChromaDB.…
  • MCP Memory Server — MCP Memory Server is an MCP server that integrates Claude Desktop with Azure Cosmos DB and OpenAI embeddings to provide…
  • MCP MS SQL Server — MCP MS SQL Server is an MCP server that provides a standardized Model Context Protocol interface for AI models to…

What can MySQL MCP Server do?

MySQL MCP Server allows AI clients to interact with MySQL databases in a safe, read-only mode. It exposes resources that describe table schemas and column data types, and it provides a tool to run read-only SQL queries within automated read-only transactions.

How do I install MySQL MCP Server?

Clone the repository from GitHub, run npm run prepare, and run npm install inside the project folder. Then run npm link to make the mysql-mcp-server command accessible globally across your system.

Which MCP clients work with MySQL MCP Server?

It is documented for use with Cursor, but it works with any Model Context Protocol client that supports local command execution and standard MCP tools and resources.

Does MySQL MCP Server allow modifying database records?

No. The server executes all SQL queries within an enforced read-only transaction. Additionally, it is best practice to configure the database connection string using a MySQL user with read-only permissions.

Is MySQL MCP Server open source?

Yes, MySQL MCP Server is open source software distributed under the MIT License. You are free to inspect, modify, and distribute the code according to the repository terms.

  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories