MCP ExplorerExplorer

Db Mcp Demo

@zhangshuaibao922on a year ago
1 MIT
FreeCommunity
AI Systems
A demo project for CRUD operations on MySQL and Redis using AI.

Overview

What is Db Mcp Demo

db-mcp-demo is a demonstration project that enables quick implementation of CRUD operations for MySQL and Redis databases using AI.

Use cases

Use cases include rapid prototyping of applications that require database interactions, educational purposes for learning database operations, and as a backend service for AI-driven applications.

How to use

To use db-mcp-demo, set up a Java 21 environment and configure Maven 3.9.5. Run the command ‘mvn clean install’ to build the project and obtain the JAR file. Then, use the provided command template to run the MCP server with the JAR file path.

Key features

Key features include CRUD operations for both MySQL and Redis, and the ability to quickly generate template code based on query results with customizable rulers.

Where to use

db-mcp-demo can be used in various fields such as web development, data management, and application development where database interactions are required.

Content

在项目中快速通过ai来实现mysql、redis(等后续补充)的增删改查

功能

  • 数据库增删改查
  • redis增删改查
  • 查询出结果后,快速实现模版代码(自定义配置rulers)

项目运行所必要环境

  • java环境java21(spring-ai要求)
  • maven环境配置3.9.5(与java21适配)

运行

  • 本地运行命令
    mvn clean install
    拿到jar包的绝对地址路径
  • cursor中引入mcp

"名称": {
  "command": "java",
  "args": [
    "-Dspring.ai.mcp.server.stdio=true",
    "-Dspring.main.web-application-type=none",
    "-Dlogging.pattern.console=",
    "-jar",
    "jar包地址"
  ]
}

具体功能展示

img.png
img.png

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers