阿里云百炼MCP服务器 - MySQL业务查询服务
Project description
阿里云百炼MCP服务器 - MySQL业务查询服务
这是一个专为阿里云百炼平台设计的MCP(Model Context Protocol)服务器,提供MySQL数据库的业务查询功能。
功能特性
- 🚀 支持HTTP传输协议,兼容阿里云百炼
- 🗄️ 提供7个核心业务查询工具
- 🔧 支持跨数据库查询
- 📊 返回中文字段名,便于理解
- 🛡️ 安全的数据库连接管理
业务工具
- get_user_info - 获取用户基本信息
- get_user_courses - 获取用户课程列表
- get_user_cases - 获取用户案例分析
- get_user_orders - 获取用户订单信息
- get_user_invoices - 获取用户发票信息
- get_user_study_plans - 获取用户学习计划
- get_course_study_plans - 获取课程学习计划
安装
pip install mcp-mysql-bailian-licai
配置
环境变量
export MYSQL_HOST="your-mysql-host"
export MYSQL_PORT="3306"
export MYSQL_USER="your-username"
export MYSQL_PASSWORD="your-password"
export MYSQL_DATABASES="database1,database2"
export MCP_SERVICE_PORT="8001"
MCP配置文件
{
"mcpServers": {
"licai_mysql_mcp": {
"type": "http",
"command": "uvx",
"args": [
"main:mcp.run",
"--transport", "http",
"--host", "0.0.0.0",
"--port", "8001"
],
"env": {
"MCP_SERVICE_NAME": "licai_mysql_mcp",
"MCP_SERVICE_PORT": "8001",
"MYSQL_HOST": "your-mysql-host",
"MYSQL_PORT": "3306",
"MYSQL_USER": "your-username",
"MYSQL_PASSWORD": "your-password",
"MYSQL_DATABASES": "database1,database2"
}
}
}
}
使用方法
直接启动
mcp-mysql-bailian-licai
程序化使用
from mcp_mysql_server.server import main
# 设置环境变量后启动
main()
许可证
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp-mysql-bailian-licai-202509111610-66e8a1-2.0.0.tar.gz.
File metadata
- Download URL: mcp-mysql-bailian-licai-202509111610-66e8a1-2.0.0.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4c04933998fef1c03a16d61a870dd29e1075528830e8bb28fb2f15c5e4d1ad4
|
|
| MD5 |
cd69b6c53bd55a334214dc8195164176
|
|
| BLAKE2b-256 |
137f60702b6e10068c79c600fb531e9f7c79c4c3615d88c63c43b8d1268c3e34
|
File details
Details for the file mcp_mysql_bailian_licai_202509111610_66e8a1-2.0.0-py3-none-any.whl.
File metadata
- Download URL: mcp_mysql_bailian_licai_202509111610_66e8a1-2.0.0-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
249d26c752ad321073e5844eeff6c406f7a8802f7780b3e118faf924ec9a939f
|
|
| MD5 |
1019d254d30e93cc8628812b85761ac8
|
|
| BLAKE2b-256 |
14a177e6146563e990f6a585331f7063196c82125b5d03fdd1f80fe20ddf3137
|