Feedback

MCP MySQL Server — by JamesSmith888

@jamessmith888 Claim

Basic information

Runtime
java
Category
License
Not specified
Transports
stdio
Author
jamessmith888
Submitted by
Community
Quality
35
Stars
26

About MCP MySQL Server

A Spring AI-based MCP capable of executing any SQL query. 一个基于 Spring AI 的MCP服务,可执行任意 SQL。

MCP MySQL Server is a MCP server in the Databases category listed in the AddMCP.net directory, published by JamesSmith888. Supported transport: stdio. Runtime: java. The repository has 26 GitHub stars. Source code is hosted on github.com. Related topics: mcp, mysql, springai.

Setup

{
    "mcpServers": {
        "mcp-mysql-server": {
            "command": "/Users/xin.y/IdeaProjects/mcp-mysql-server/mvnw",
            "args": [
                "-q",
                "-f",
                "/Users/xin.y/IdeaProjects/mcp-mysql-server/pom.xml",
                "spring-boot:run"
            ]
        }
    }
}

MCP MySQL Server — by JamesSmith888 config

Add this server to your MCP-compatible client using the configuration below.

{
    "mcpServers": {
        "mcp-mysql-server": {
            "command": "/Users/xin.y/IdeaProjects/mcp-mysql-server/mvnw",
            "args": [
                "-q",
                "-f",
                "/Users/xin.y/IdeaProjects/mcp-mysql-server/pom.xml",
                "spring-boot:run"
            ]
        }
    }
}

MCP MySQL Server — by JamesSmith888 tools

Tool list not available yet

This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.

We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.

Overview

What is MCP MySQL Server?

MCP MySQL Server is a Spring AI based MCP (Model Context Protocol) server that can execute arbitrary SQL queries on MySQL databases. It supports multiple datasources, dynamic switching, Groovy script extensions, and SQL security controls. It is intended for developers integrating AI models with MySQL databases.

How to use MCP MySQL Server?

Configure the MCP server in JSON by either using Maven Wrapper (mvnw spring-boot:run) or running a packaged JAR (java -jar ...). Supply the -Dloader.path argument to enable extended Groovy features. Then set up datasources in datasource.yml, marking one as default with default: true.

Key features of MCP MySQL Server

  • Multi-datasource support (configure multiple MySQL databases)
  • Dynamic datasource switching at runtime
  • Groovy script based extension functionality
  • SQL security control (prevents dangerous operations)
  • Built on Spring AI framework

Use cases of MCP MySQL Server

  • Allow an AI assistant to query a MySQL database on demand.
  • Manage multiple database connections and switch between them dynamically.
  • Extend query capabilities with custom Groovy scripts for specific business logic.
  • Safely expose SQL operations to AI models while preventing harmful statements.

Frequently asked questions

1 What does MCP MySQL Server do?

It is a Spring AI based MCP server that enables AI models to execute arbitrary SQL on configured MySQL databases.

2 How do I configure datasources?

Edit mcp-mysql-server/src/main/resources/datasource.yml and specify the JDBC URL, username, password, and optionally set one datasource as default: true.

3 What are the runtime requirements?

JDK 21+ and Maven 3.6+ are required.

4 Can MCP MySQL Server work with other databases?

No, it is MySQL specific. For other databases, please see the related mcp-db-server project.

5 How do I enable advanced extensions?

Use the -Dloader.path argument when starting via JAR to point to a directory containing Groovy scripts.

Comments

No comments yet

Be the first to share feedback about this listing. Sign in to leave a comment.

Sign In

Feedback 💬