返回市场
mcp-mysql-模拟数据

mcp-mysql-模拟数据

作者:renatogroffe2 星标更新:2025-11-10

项目介绍

mcp-mysql-fakedata

使用MCP服务器进行MySQL测试(设计计算机/mysql_mcp_server),同时使用第二个MCP服务器生成假数据(镜像renatogroffe/dotnet9-consoleapp-mcp-fakedata)。包含Docker Compose脚本。

要执行此仓库中指示的MCP服务器测试,请首先运行位于scripts文件夹中的脚本docker-compose.yaml

参考资料:

在以下列表中,我们有一个示例的mcp.json文件,其中配置了用于测试的2个MCP服务器:

{
	"servers": {
		"mcp-mysql": {
			"type": "stdio",
			"command": "uvx",
			"args": [
				"mysql_mcp_server==0.2.2",
				"mysql_mcp_server"
			],
			"env": {
				"MYSQL_HOST": "${input:mysql_host}",
				"MYSQL_PORT": "${input:mysql_port}",
				"MYSQL_USER": "${input:mysql_user}",
				"MYSQL_PASSWORD": "${input:mysql_password}",
				"MYSQL_DATABASE": "${input:mysql_database}"
			}
		},
		"mcp-fakedata": {
			"type": "stdio",
			"command": "docker",
			"args": [
				"run",
				"-i",
				"--rm",
				"renatogroffe/dotnet9-consoleapp-mcp-fakedata"
			],
			"env": {}
		}
	},
	"inputs": [
		{
			"id": "mysql_host",
			"type": "promptString",
			"description": "MySQL主机名"
		},
		{
			"id": "mysql_port",
			"type": "promptString",
			"description": "MySQL端口"
		},
		{
			"id": "mysql_user",
			"type": "promptString",
			"description": "MySQL用户名"
		},
		{
			"id": "mysql_password",
			"type": "promptString",
			"description": "MySQL密码"
		},
		{
			"id": "mysql_database",
			"type": "promptString",
			"description": "MySQL数据库名称"
		}
	]
}

在下面的截图中,我们可以观察到使用Visual Studio Code + GitHub Copilot生成的结果:

在VS Code中使用的MySQL MCP