Skip to main content

项目说明

本项目为 MCP MySQL Server,提供数据库知识和数据查询能力。

  • 主逻辑文件:mcp_mysql/server.py
  • 示例知识文件:knowledge.txt
  • 测试用例:tests/test_server.py

安装依赖

pip install pymysql

运行方式

方法1:使用Python模块方式(推荐)

python -m mcp_mysql

方法2:使用安装后的命令

mcp-mysql

方法3:直接运行server.py

python mcp_mysql/server.py

服务配置(Server config)

服务通过环境变量进行数据库连接配置(仅环境变量)。

环境变量 说明 默认值
DB_USER 数据库用户名 readonly_user
DB_PASS 数据库密码 readonly_pass
DB_HOST 数据库主机 localhost
DB_PORT 数据库端口 3306
DB_NAME 数据库名称 mcp

示例:

set DB_USER=readonly_user
set DB_PASS=readonly_pass

set DB_HOST=127.0.0.1
set DB_PORT=3306
set DB_NAME=mcp
python -m mcp_mysql

Metadata

Release files for mcp-mysql 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-mysql 0.1.1
File Size Uploaded Provenance Actions
mcp_mysql-0.1.1.tar.gz 7.6 kB Without provenance Details for mcp_mysql-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mcp-mysql 0.1.1
File Interpreter ABI Platform Actions
mcp_mysql-0.1.1-py3-none-any.whl Python 3 none any Details for mcp_mysql-0.1.1-py3-none-any.whl

Total release size: 12.2 kB

Release files / mcp_mysql-0.1.1.tar.gz

Download URL mcp_mysql-0.1.1.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
71373a399d958003166083f944e79226f1f64667ba4b3a8453f4a90120251178
BLAKE2b-256 checksum
How to use checksums
aa56eae2de8a3ac7a72488b7457295428914094669383e4e3e5ea5fb37ec319f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.4

Release files / mcp_mysql-0.1.1-py3-none-any.whl

Download URL mcp_mysql-0.1.1-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b9caeffeef3a108a671b0de6c2d6869638e88a62d0bf33a93dc1e1b2044dbe7d
BLAKE2b-256 checksum
How to use checksums
fe7966c301d8540f66035f3cdb1e354ba2a448b1e724f71e917b7712d8aab5ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.4

Security for mcp-mysql 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page