
Mysql Mcp Server For Java
@6000fish
About Mysql Mcp Server For Java
Java 生态的 MCP 基础设施,包含 SDK + 常用 Server 实现
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mysql": {
"type": "stdio",
"command": "java",
"args": [
"-jar",
"/absolute/path/to/mcp-java/mcp-server-collection/mcp-server-mysql/target/mcp-server-mysql-0.1.1.jar"
],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_PORT": "3306",
"MYSQL_DATABASE": "mcp_demo",
"MYSQL_USERNAME": "root",
"MYSQL_PASSWORD": "your_password"
}
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is Mysql Mcp Server For Java?
Mysql Mcp Server For Java is a ready-to-run MySQL database server implementation for the Model Context Protocol (MCP), built with the MCP Java SDK. It allows MCP clients (e.g., Claude Code, Codex) to connect to a MySQL database and perform SQL operations through natural language.
How to use Mysql Mcp Server For Java?
Build the jar with mvn package -pl mcp-server-collection/mcp-server-mysql -am -DskipTests. Then configure your MCP client’s mcpServers entry with "type": "stdio", the java command pointing to the generated jar, and environment variables MYSQL_HOST, MYSQL_PORT, MYSQL_DATABASE, MYSQL_USERNAME, MYSQL_PASSWORD. Restart the client and the server tools become available.
Key features of Mysql Mcp Server For Java
- Built with the MCP Java SDK for custom MCP servers.
- Uses stdio transport for local Agent integration.
- Exposes seven MySQL tools: query, execute, list_databases, list_tables, describe_table, explain_query, get_table_status.
- Ready-to-run jar with no additional project setup.
- Verified compatibility with Claude Code and Codex clients.
Use cases of Mysql Mcp Server For Java
- Allow AI agents to run natural-language SQL queries against a MySQL database.
- Enable schema exploration (list databases, tables, describe columns) through MCP.
- Execute administrative SQL commands via an MCP-enabled chat interface.
- Integrate MySQL data access into MCP-based workflow automation tools.
FAQ from Mysql Mcp Server For Java
What runtime dependencies are required?
Java 17+ and a running MySQL server accessible via the configured environment variables.
How does Mysql Mcp Server For Java handle authentication?
Credentials are passed through environment variables (MYSQL_USERNAME, MYSQL_PASSWORD) at configuration time. No secrets are stored in the jar.
Where does the data live?
Data remains in the MySQL database. The server only sends SQL queries and receives results; it does not store any data locally.
What transport does it support?
Only stdio transport is supported. The server communicates over standard input/output, suitable for local MCP clients.
Is it compatible with all MCP clients?
It has been verified with Claude Code and Codex. Other clients that follow the standard stdio JSON-RPC MCP protocol should work with the documented configuration.
Frequently asked questions
What runtime dependencies are required?
Java 17+ and a running MySQL server accessible via the configured environment variables.
How does Mysql Mcp Server For Java handle authentication?
Credentials are passed through environment variables (`MYSQL_USERNAME`, `MYSQL_PASSWORD`) at configuration time. No secrets are stored in the jar.
Where does the data live?
Data remains in the MySQL database. The server only sends SQL queries and receives results; it does not store any data locally.
What transport does it support?
Only stdio transport is supported. The server communicates over standard input/output, suitable for local MCP clients.
Is it compatible with all MCP clients?
It has been verified with Claude Code and Codex. Other clients that follow the standard stdio JSON-RPC MCP protocol should work with the documented configuration.
Basic information
More Databases MCP servers
MCP Alchemy
runekaagaardA MCP (model context protocol) server that gives the LLM access to and knowledge about relational databases like SQLite, Postgresql, MySQL & MariaDB, Oracle, and MS-SQL.
Database Gateway
centralmindUniversal MCP-Server for your Databases optimized for LLMs and AI-Agents.
MySQL MCP Server
designcomputerA Model Context Protocol (MCP) server that enables secure interaction with MySQL databases
mcp_mysql_server
xwb602625136Model Context Protocol (MCP) server that supports secure interaction with MySQL databases and has anomaly analysis capabilities.更加牛逼!更加好用!不仅止于mysql的增删改查功能; 还包含了数据库异常分析能力;且便于开发者们进行个性化的工具扩展
Xata MCP Server
The Xata MCP server lets AI assistants and agents interact with your Xata organizations, projects, and Postgres database branches.
Comments