Skip to main content

阿里云百炼MCP服务器 - MySQL业务查询服务

Project description

阿里云百炼MCP服务器 - MySQL业务查询服务

这是一个专为阿里云百炼平台设计的MCP(Model Context Protocol)服务器,提供MySQL数据库的业务查询功能。

功能特性

  • 🚀 支持HTTP传输协议,兼容阿里云百炼
  • 🗄️ 提供7个核心业务查询工具
  • 🔧 支持跨数据库查询
  • 📊 返回中文字段名,便于理解
  • 🛡️ 安全的数据库连接管理

业务工具

  1. get_user_info - 获取用户基本信息
  2. get_user_courses - 获取用户课程列表
  3. get_user_cases - 获取用户案例分析
  4. get_user_orders - 获取用户订单信息
  5. get_user_invoices - 获取用户发票信息
  6. get_user_study_plans - 获取用户学习计划
  7. 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


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

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file mcp-mysql-bailian-licai-202509111610-66e8a1-2.0.0.tar.gz.

File metadata

File hashes

Hashes for mcp-mysql-bailian-licai-202509111610-66e8a1-2.0.0.tar.gz
Algorithm Hash digest
SHA256 a4c04933998fef1c03a16d61a870dd29e1075528830e8bb28fb2f15c5e4d1ad4
MD5 cd69b6c53bd55a334214dc8195164176
BLAKE2b-256 137f60702b6e10068c79c600fb531e9f7c79c4c3615d88c63c43b8d1268c3e34

See more details on using hashes here.

File details

Details for the file mcp_mysql_bailian_licai_202509111610_66e8a1-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_mysql_bailian_licai_202509111610_66e8a1-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 249d26c752ad321073e5844eeff6c406f7a8802f7780b3e118faf924ec9a939f
MD5 1019d254d30e93cc8628812b85761ac8
BLAKE2b-256 14a177e6146563e990f6a585331f7063196c82125b5d03fdd1f80fe20ddf3137

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page