MCP MySQL Server

MCP MySQL Server is an MCP server that executes arbitrary SQL queries against configured MySQL databases using Spring AI. It connects AI clients to local or remote MySQL instances, providing developers, data analysts, and automated agents with the capability to run SQL operations and retrieve structured relational data directly during conversation. The server supports multiple data source configurations defined in a YAML configuration file, enabling dynamic switching between different database environments at runtime. To protect database integrity, MCP MySQL Server integrates SQL security controls designed to prevent models from executing potentially dangerous database commands. In addition to core querying capabilities, it provides an extension mechanism powered by Groovy scripts, allowing users to define custom behaviors and tasks that integrate directly into the Spring AI execution context.

Category: Databases & Data Stores

Tags: database, mysql, spring-ai, SQL

Visit MCP MySQL Server

How to install and configure MCP MySQL Server

  1. Ensure system prerequisites are installed: JDK 21+ and Maven 3.6+. 2. Configure your database connections in mcp-mysql-server/src/main/resources/datasource.yml under the datasource.datasources section with your MySQL URL, credentials, and default selection. 3. Build the project executable JAR by running ./mvnw clean package. 4. Register the server in your MCP client configuration (such as Claude Desktop) under mcpServers: json { "mcpServers": { "mcp-mysql-server": { "command": "java", "args": [ "-jar", "/absolute/path/to/mcp-mysql-server/target/mcp-mysql-server-0.0.1-SNAPSHOT.jar" ] } } } Alternatively, specify the Maven Wrapper command to run with spring-boot:run.

What you can do with MCP MySQL Server

  • Running ad-hoc SQL read queries through natural language prompts to inspect table structures, schemas, and relational records directly. - Dynamically switching between configured staging, testing, and production MySQL data sources during active AI agent sessions. - Enforcing SQL security control rules to block dangerous commands, preventing unauthorized record deletions or accidental table drops. - Extending server execution capabilities with custom Groovy scripts to handle domain-specific database procedures and data manipulations.

Key facts

  • Open Source
  • https://github.com/JamesSmith888/mcp-mysql-server
  • Databases & Data Stores
  • database, mysql, spring-ai, 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 is MCP MySQL Server?

MCP MySQL Server is an open source Model Context Protocol server built with Spring AI. It exposes tools allowing AI assistants to execute arbitrary SQL statements against configured MySQL database instances.

What are the system requirements for MCP MySQL Server?

MCP MySQL Server requires Java Development Kit (JDK) version 21 or higher and Apache Maven version 3.6 or higher to compile and run the application.

How do I configure database connections in MCP MySQL Server?

You define your connection strings, usernames, passwords, and default targets inside the datasource.yml file located under the src/main/resources directory of the project repository.

Does MCP MySQL Server support multiple databases?

Yes, it supports multi-datasource management. Multiple MySQL database profiles can be defined simultaneously in the YAML configuration, and the server can switch between them at runtime.

Is MCP MySQL Server open source?

Yes, MCP MySQL Server is an open source project available on GitHub under the repository JamesSmith888/mcp-mysql-server.

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