Spring Boot MySQL Project

Spring Boot MySQL Project

angelo848

Developer Tools
Visit Server

README

Spring Boot MySQL Project

This is a Spring Boot project configured with MySQL and HikariCP connection pool.

Prerequisites

  • Java 17 or later
  • Maven 3.6 or later
  • MySQL 8.0 or later

Setup

  1. Create a MySQL database named demo:
CREATE DATABASE demo;
  1. Update the database credentials in src/main/resources/application.properties if they differ from the defaults:
  • username: root
  • password: root

Running the Application

  1. Build the project:
mvn clean install
  1. Run the application:
mvn spring-boot:run

OR

java -jar path/to/jar/java-mysql-mcp-0.0.1-SNAPSHOT.jar

The application will start on http://localhost:8080

Configuration

The application uses the following main configurations:

  • Server port: 8080
  • HikariCP connection pool size: 10
  • Hibernate ddl-auto: update (automatically updates database schema)

You can modify these settings in src/main/resources/application.properties

spring.main.web-application-type: none is mandatory for connect to server via stdio, otherwise this error will be thrown:

2025-03-25T09:21:30.352-03:00  WARN 25352 --- [main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'webServerStartStop'

Usage on MCP clients

db.hostenv value is the host and port of the database server, for example: host:port, eg: localhost:3306

{
  "mcpServers": {
    "blue-hero-database": {
      "command": "java",
      "args": [
        "-Dspring.ai.mcp.server.stdio=true",
        "-Dserver.port=8080",
        "-Ddb.hostenv=host:port",
        "-Ddb.schema=/demo",
        "-Ddb.user=username",
        "-Ddb.passwordenv=password",
        "-jar",
        "/path/to/java-mysql-mcp/target/java-mysql-mcp-0.0.1-SNAPSHOT.jar"
      ]
    }
  }
}

Debug

You can use the mcp inspector for testing and debugging with the following command:

npx @modelcontextprotocol/inspector java -Dspring.ai.mcp.server.stdio=true -jar /path/to/project/target/java-mysql-mcp-0.0.1-SNAPSHOT.jar

The logs output will be created in ./mcp-mysql-stdio-server.log

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
MCP Package Docs Server

MCP Package Docs Server

Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.

Featured
Local
TypeScript
Claude Code MCP

Claude Code MCP

An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.

Featured
Local
JavaScript
@kazuph/mcp-taskmanager

@kazuph/mcp-taskmanager

Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.

Featured
Local
JavaScript
Linear MCP Server

Linear MCP Server

Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.

Featured
JavaScript
mermaid-mcp-server

mermaid-mcp-server

A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.

Featured
JavaScript
Jira-Context-MCP

Jira-Context-MCP

MCP server to provide Jira Tickets information to AI coding agents like Cursor

Featured
TypeScript
Linear MCP Server

Linear MCP Server

A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.

Featured
JavaScript
Sequential Thinking MCP Server

Sequential Thinking MCP Server

This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.

Featured
Python