MySQL MCP Server
Overview
MySQL MCP Server is a Spring Boot server that implements the Model Context Protocol (MCP) for performing MySQL database operations.
To use the MySQL MCP Server, configure it in your MCP server config file with the necessary MySQL connection details and run the server using Maven.
- Execute SELECT queries to retrieve data from the database. - List all tables present in the database. - Get detailed schema information for specific tables.
- Retrieving data from MySQL databases for applications.
- Managing and exploring database schemas.
- Integrating with other applications that require database access.
Add to your AI client
Use these steps to connect MySQL MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"mysql-mcp-server-java-kioyong": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mysql-mcp-server-java-kioyong"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"mysql-mcp-server-java-kioyong": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mysql-mcp-server-java-kioyong"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"mysql-mcp-server-java-kioyong": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mysql-mcp-server-java-kioyong"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"mysql-mcp-server-java-kioyong": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mysql-mcp-server-java-kioyong"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"mysql-mcp-server-java-kioyong": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mysql-mcp-server-java-kioyong"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"mysql-mcp-server-java-kioyong": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mysql-mcp-server-java-kioyong"
]
}
}
}FAQ
What types of queries can be executed?
Only SELECT queries are allowed to be executed through this server.
How do I build the project?
You can build the project using Maven with the command `mvn install`.
Is there a license for this project?
Yes, the project is licensed under the MIT License, allowing free use, modification, and distribution.