mysql-mcp-server3


Namemysql-mcp-server3 JSON
Version 1.0.3 PyPI version JSON
download
home_pageNone
SummaryA Model Context Protocol (MCP) server that enables secure interaction with MySQL/MariaDB/TiDB/AWS OceanBase/RDS/Aurora MySQL DataBases.
upload_time2025-08-17 01:55:28
maintainerNone
docs_urlNone
authorNone
requires_python>=3.12
licenseNone
keywords mcp mysql tidb oceanbase model-context-protocol async connection-pool
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # MySQL MCP Server

A Model Context Protocol (MCP) server that enables secure interaction with MySQL/MariaDB/TiDB/AWS OceanBase/RDS/Aurora MySQL databases.

## ๐Ÿš€ Features

- **MCP Protocol Support**: Built on FastMCP framework with standard MCP tools and resources
- **Multi-Database Compatibility**: Support for MySQL, MariaDB, TiDB, OceanBase, AWS RDS, and Aurora MySQL
- **Asynchronous Architecture**: Built with `aiomysql` for high-performance database operations
- **Connection Pooling**: Efficient connection management with configurable pool settings
- **Security Features**: Query type restrictions, automatic LIMIT enforcement, and parameter validation
- **Comprehensive Tools**: SQL execution, table structure queries, and test data generation

## ๐Ÿ“‹ Prerequisites

- Python >= 3.12
- MySQL/MariaDB/TiDB/OceanBase database instance
- Network access to database server

## ๐Ÿ› ๏ธ Installation

### 1. Install from PyPI (Recommended)
```bash
pip install mysql-mcp-server3
```

### 2. Configure database connection

Edit `dbconfig.json` with your database credentials:

```bash
{
    "dbPoolSize": 5,
    "dbMaxOverflow": 10,
    "dbPoolTimeout": 30,
    "dbType-Comment": "The database currently in use,such as MySQL/MariaDB/TiDB OceanBase/RDS/Aurora MySQL DataBases",
    "dbList": [
        {   "dbInstanceId": "oceanbase_1",
            "dbHost": "localhost",
            "dbPort": 2281,
            "dbDatabase": "oceanbase_db",
            "dbUsername": "root",
            "dbPassword": "123456",
            "dbType": "OceanBase",
            "dbVersion": "V4.0.0",
            "dbActive": true
        },
        {   "dbInstanceId": "mysql_2",
            "dbHost": "localhost",
            "dbPort": 3306,
            "dbDatabase": "mysql_db",
            "dbUsername": "root",
            "dbPassword": "123456",
            "dbType": "MySQL",
            "dbVersion": "8.0",
            "dbActive": false
        },
        {   "dbInstanceId": "tidb_3",
            "dbHost": "localhost",
            "dbPort": 4000,
            "dbDatabase": "tidb_db",
            "dbUsername": "root",
            "dbPassword": "123456",
            "dbType": "TiDB",
            "dbVersion": "8.5.3",
            "dbActive": false
        }
    ],
    "logPath": "/Volumes/store/mysql_mcp_server",
    "logLevel": "info"
}
# dbActive
Only database instances with dbActive set to true in the dbList configuration list are available. 
# logPath
Mcp server log is stored in /Volumes/store/mysql_mcp_server/logs/mcp_server.log.
# logLevel
TRACE, DEBUG, INFO, SUCCESS, WARNING, ERROR, CRITICAL
```

### 3. Configure mcp json

```bash
{
  "mcpServers": {
    "mysql-mcp-client": {
      "command": "mysql-mcp-server3",
      "env": {
        "config_file": "/Users/frank/store/dbconfig.json"
      },
      "disabled": false
    }
  }
}

# config_file
dbconfig.json file path in your device
```

### 4. Clone the repository
```bash
git clone <repository-url>
cd mysql_mcp_server
import current project into your IDE Tool

```

### 5. Configure mcp json By IDE Tool
```bash
{
  "mcpServers": {
    "mysql-mcp-client": {
      "command": "uv",
      "args": [
        "run",
        "src/server.py"
      ],
      "cwd": "/Volumes/store/mysql_mcp_server",
      "env": {
        "config_file": "/Volumes/store/dbconfig.json"
      },
      "disabled": false,
      "autoApprove": [
        "describe_table",
        "sql_exec",
        "generate_demo_data"
      ]
    }
  }
}
```

## ๐Ÿš€ Quick Start

### Start the MCP Server
```bash
# Using the installed package
mysql-mcp-server

# Using fastmcp CLI
fastmcp run src/server.py

# Or directly with Python
python src/server.py
```

### Using with MCP Clients
The server provides the following MCP tools and resources:

#### Tools
- `sql_exec`: Execute any SQL statement
- `describe_table`: Get table structure information
- `generate_demo_data`: Generate test data for tables

#### Resources
- `database://tables`: Database table metadata
- `database://config`: Database configuration information

## ๐Ÿ“š API Reference

### SQL Execution Tool
```python
await sql_exec("SELECT * FROM users WHERE age > 18")
```

**Parameters:**
- `sql` (str): SQL statement to execute

**Returns:**
- `success` (bool): Execution status
- `result`: Query results or affected rows
- `message` (str): Status description

### Table Structure Tool
```python
await describe_table("users")
```

**Parameters:**
- `table_name` (str): Table name (supports `database.table` format)

**Returns:**
- Table structure information including columns, types, and constraints

### Test Data Generation
```python
await generate_demo_data("users", ["name", "email"], 50)
```

**Parameters:**
- `table_name` (str): Target table name
- `columns_name` (List[str]): Column names to populate
- `num` (int): Number of test records to generate

## โš™๏ธ Configuration

### Database Configuration
The `dbconfig.json` file supports multiple database instances:

```json
{
    "dbPoolSize": 5,           // Minimum connection pool size
    "dbMaxOverflow": 10,       // Maximum overflow connections
    "dbPoolTimeout": 30,       // Connection timeout in seconds
    "dbList": [
        {
            "dbInstanceId": "unique_id",
            "dbHost": "hostname",
            "dbPort": 3306,
            "dbDatabase": "database_name",
            "dbUsername": "username",
            "dbPassword": "password",
            "dbType": "MySQL",
            "dbVersion": "8.0",
            "dbActive": true    // Only one instance should be active
        },
        {
            "dbInstanceId": "unique_id",
            "dbHost": "hostname",
            "dbPort": 3306,
            "dbDatabase": "database_name",
            "dbUsername": "username",
            "dbPassword": "password",
            "dbType": "MySQL",
            "dbVersion": "5.7",
            "dbActive": false    // othre one instance should be unactive
        }
    ],
    "logPath": "/path/to/logs",
    "logLevel": "info"
}
```

### Logging Configuration
- **Log Levels**: TRACE, DEBUG, INFO, SUCCESS, WARNING, ERROR, CRITICAL
- **Log Rotation**: 10 MB per file, 7 days retention
- **Output**: Both stderr (for MCP) and file logging

## ๐Ÿ”’ Security Features

### Query Restrictions
- **Read-only Queries**: `execute_query_with_limit` only allows SELECT statements
- **Automatic LIMIT**: Prevents excessive data retrieval (max 10,000 rows)
- **Parameter Validation**: Input validation for all parameters

### Configuration Security
- **Password Hiding**: Sensitive information is masked in responses
- **Instance Isolation**: Only active database configuration is exposed
- **Environment Override**: Secure configuration file path management

## ๐Ÿ—๏ธ Architecture

### Project Structure
```
src/
โ”œโ”€โ”€ server.py              # MCP server main entry point
โ”œโ”€โ”€ utils/                 # Utility modules
โ”‚   โ”œโ”€โ”€ db_config.py       # Database configuration management
โ”‚   โ”œโ”€โ”€ db_pool.py         # Connection pool management
โ”‚   โ”œโ”€โ”€ db_operate.py      # Database operations
โ”‚   โ”œโ”€โ”€ logger_util.py     # Logging management
โ”‚   โ””โ”€โ”€ __init__.py        # Module initialization
โ”œโ”€โ”€ resources/             # MCP resources
โ”‚   โ””โ”€โ”€ db_resources.py    # Database resources
โ””โ”€โ”€ tools/                 # MCP tools
    โ””โ”€โ”€ db_tool.py         # Database tools
```

### Key Components

#### Database Connection Pool
- **Singleton Pattern**: Ensures single pool instance
- **Async Management**: Non-blocking connection handling
- **Automatic Cleanup**: Connection release and pool management

#### Configuration Management
- **JSON-based**: Human-readable configuration format
- **Environment Override**: Flexible configuration management
- **Validation**: Required field validation and error handling

#### Logging System
- **Unified Interface**: Single logger instance across modules
- **Configurable Output**: File and console logging
- **Structured Format**: Timestamp, level, module, function, and line information

## ๐Ÿงช Testing

### Generate Test Data
```python
# Generate 100 test records for users table
await generate_demo_data("users", ["name", "email", "phone"], 100)
```

### Test Database Connection
```python
# Test basic SQL execution
result = await sql_exec("SELECT 1 as test")
print(result)  # {'success': True, 'result': [{'test': 1}]}
```

## ๐Ÿ“Š Monitoring

### Database Status
```python
# Get database configuration
config = await get_database_config()
print(f"Database: {config['dbType']} {config['dbVersion']}")

# Get table information
tables = await get_database_tables()
print(f"Total tables: {len(tables)}")
```

### Connection Pool Status
- Pool size and overflow configuration
- Connection timeout settings
- Active connection count

## ๐Ÿšจ Troubleshooting

### Common Issues

#### Connection Errors
```bash
# Check database connectivity
mysql -h localhost -P 3306 -u username -p database_name

# Verify configuration
python -c "from src.utils.db_config import load_db_config; print(load_db_config())"
```

#### Permission Issues
- Ensure database user has necessary privileges
- Check firewall and network access
- Verify database server is running

#### Configuration Errors
- Validate JSON syntax in `dbconfig.json`
- Check file permissions
- Verify environment variables

### Debug Mode
Set log level to DEBUG in configuration:
```json
{
    "logLevel": "debug"
}
```

## ๐Ÿค Contributing

1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Add tests if applicable
5. Submit a pull request

### Development Setup
```bash
# Install in development mode with all dependencies
pip install -e ".[dev,test,docs]"

# Run with debug logging
export LOG_LEVEL=debug
python src/server.py
```

### Code Quality Tools
```bash
# Format code
black src/
isort src/

# Lint code
flake8 src/
mypy src/

# Run tests
pytest

# Run tests with coverage
pytest --cov=src --cov-report=html

# Pre-commit hooks
pre-commit install
pre-commit run --all-files
```

## ๐Ÿ“„ License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## ๐Ÿ‘ฅ Authors

- **Frank Jin** - *Initial work* - [j00131120@163.com](mailto:j00131120@163.com)

## ๐Ÿ™ Acknowledgments

- [FastMCP](https://github.com/fastmcp/fastmcp) - MCP framework
- [aiomysql](https://github.com/aio-libs/aiomysql) - Async MySQL driver
- [loguru](https://github.com/Delgan/loguru) - Logging library

## ๐Ÿ“ž Support

For support and questions:
- Create an issue in the repository
- Contact: [j00131120@163.com](mailto:j00131120@163.com)

## ๐Ÿ”„ Changelog

### v1.0.0
- Initial release
- MCP protocol support
- Multi-database compatibility
- Async connection pooling
- Security features implementation

## ๐Ÿ“ฆ Building and Distribution

### Build the Package
```bash
# Clean and build
python build.py build

# Build and check
python build.py check

# Build and test installation
python build.py test

# Complete build process
python build.py all
```

### Publish to PyPI
```bash
# Build, test, and publish
python build.py publish

# Or manually
python -m build
python -m twine check dist/*
python -m twine upload dist/*
```

### Package Information
- **Package Name**: `mysql-server-mcp`
- **Entry Point**: `mysql-mcp-server`
- **MCP Server Entry Point**: `mysql`
- **Python Version**: >= 3.12
- **License**: MIT

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "mysql-mcp-server3",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.12",
    "maintainer_email": "Frank Jin <j00131120@163.com>",
    "keywords": "mcp, mysql, tidb, oceanbase, model-context-protocol, async, connection-pool",
    "author": null,
    "author_email": "Frank Jin <j00131120@163.com>",
    "download_url": "https://files.pythonhosted.org/packages/86/10/7360c53c8eca1c352aa1ddd4b1ffbdd53f39d6378cb8f91338925f55db37/mysql_mcp_server3-1.0.3.tar.gz",
    "platform": null,
    "description": "# MySQL MCP Server\n\nA Model Context Protocol (MCP) server that enables secure interaction with MySQL/MariaDB/TiDB/AWS OceanBase/RDS/Aurora MySQL databases.\n\n## \ud83d\ude80 Features\n\n- **MCP Protocol Support**: Built on FastMCP framework with standard MCP tools and resources\n- **Multi-Database Compatibility**: Support for MySQL, MariaDB, TiDB, OceanBase, AWS RDS, and Aurora MySQL\n- **Asynchronous Architecture**: Built with `aiomysql` for high-performance database operations\n- **Connection Pooling**: Efficient connection management with configurable pool settings\n- **Security Features**: Query type restrictions, automatic LIMIT enforcement, and parameter validation\n- **Comprehensive Tools**: SQL execution, table structure queries, and test data generation\n\n## \ud83d\udccb Prerequisites\n\n- Python >= 3.12\n- MySQL/MariaDB/TiDB/OceanBase database instance\n- Network access to database server\n\n## \ud83d\udee0\ufe0f Installation\n\n### 1. Install from PyPI (Recommended)\n```bash\npip install mysql-mcp-server3\n```\n\n### 2. Configure database connection\n\nEdit `dbconfig.json` with your database credentials:\n\n```bash\n{\n    \"dbPoolSize\": 5,\n    \"dbMaxOverflow\": 10,\n    \"dbPoolTimeout\": 30,\n    \"dbType-Comment\": \"The database currently in use,such as MySQL/MariaDB/TiDB OceanBase/RDS/Aurora MySQL DataBases\",\n    \"dbList\": [\n        {   \"dbInstanceId\": \"oceanbase_1\",\n            \"dbHost\": \"localhost\",\n            \"dbPort\": 2281,\n            \"dbDatabase\": \"oceanbase_db\",\n            \"dbUsername\": \"root\",\n            \"dbPassword\": \"123456\",\n            \"dbType\": \"OceanBase\",\n            \"dbVersion\": \"V4.0.0\",\n            \"dbActive\": true\n        },\n        {   \"dbInstanceId\": \"mysql_2\",\n            \"dbHost\": \"localhost\",\n            \"dbPort\": 3306,\n            \"dbDatabase\": \"mysql_db\",\n            \"dbUsername\": \"root\",\n            \"dbPassword\": \"123456\",\n            \"dbType\": \"MySQL\",\n            \"dbVersion\": \"8.0\",\n            \"dbActive\": false\n        },\n        {   \"dbInstanceId\": \"tidb_3\",\n            \"dbHost\": \"localhost\",\n            \"dbPort\": 4000,\n            \"dbDatabase\": \"tidb_db\",\n            \"dbUsername\": \"root\",\n            \"dbPassword\": \"123456\",\n            \"dbType\": \"TiDB\",\n            \"dbVersion\": \"8.5.3\",\n            \"dbActive\": false\n        }\n    ],\n    \"logPath\": \"/Volumes/store/mysql_mcp_server\",\n    \"logLevel\": \"info\"\n}\n# dbActive\nOnly database instances with dbActive set to true in the dbList configuration list are available. \n# logPath\nMcp server log is stored in /Volumes/store/mysql_mcp_server/logs/mcp_server.log.\n# logLevel\nTRACE, DEBUG, INFO, SUCCESS, WARNING, ERROR, CRITICAL\n```\n\n### 3. Configure mcp json\n\n```bash\n{\n  \"mcpServers\": {\n    \"mysql-mcp-client\": {\n      \"command\": \"mysql-mcp-server3\",\n      \"env\": {\n        \"config_file\": \"/Users/frank/store/dbconfig.json\"\n      },\n      \"disabled\": false\n    }\n  }\n}\n\n# config_file\ndbconfig.json file path in your device\n```\n\n### 4. Clone the repository\n```bash\ngit clone <repository-url>\ncd mysql_mcp_server\nimport current project into your IDE Tool\n\n```\n\n### 5. Configure mcp json By IDE Tool\n```bash\n{\n  \"mcpServers\": {\n    \"mysql-mcp-client\": {\n      \"command\": \"uv\",\n      \"args\": [\n        \"run\",\n        \"src/server.py\"\n      ],\n      \"cwd\": \"/Volumes/store/mysql_mcp_server\",\n      \"env\": {\n        \"config_file\": \"/Volumes/store/dbconfig.json\"\n      },\n      \"disabled\": false,\n      \"autoApprove\": [\n        \"describe_table\",\n        \"sql_exec\",\n        \"generate_demo_data\"\n      ]\n    }\n  }\n}\n```\n\n## \ud83d\ude80 Quick Start\n\n### Start the MCP Server\n```bash\n# Using the installed package\nmysql-mcp-server\n\n# Using fastmcp CLI\nfastmcp run src/server.py\n\n# Or directly with Python\npython src/server.py\n```\n\n### Using with MCP Clients\nThe server provides the following MCP tools and resources:\n\n#### Tools\n- `sql_exec`: Execute any SQL statement\n- `describe_table`: Get table structure information\n- `generate_demo_data`: Generate test data for tables\n\n#### Resources\n- `database://tables`: Database table metadata\n- `database://config`: Database configuration information\n\n## \ud83d\udcda API Reference\n\n### SQL Execution Tool\n```python\nawait sql_exec(\"SELECT * FROM users WHERE age > 18\")\n```\n\n**Parameters:**\n- `sql` (str): SQL statement to execute\n\n**Returns:**\n- `success` (bool): Execution status\n- `result`: Query results or affected rows\n- `message` (str): Status description\n\n### Table Structure Tool\n```python\nawait describe_table(\"users\")\n```\n\n**Parameters:**\n- `table_name` (str): Table name (supports `database.table` format)\n\n**Returns:**\n- Table structure information including columns, types, and constraints\n\n### Test Data Generation\n```python\nawait generate_demo_data(\"users\", [\"name\", \"email\"], 50)\n```\n\n**Parameters:**\n- `table_name` (str): Target table name\n- `columns_name` (List[str]): Column names to populate\n- `num` (int): Number of test records to generate\n\n## \u2699\ufe0f Configuration\n\n### Database Configuration\nThe `dbconfig.json` file supports multiple database instances:\n\n```json\n{\n    \"dbPoolSize\": 5,           // Minimum connection pool size\n    \"dbMaxOverflow\": 10,       // Maximum overflow connections\n    \"dbPoolTimeout\": 30,       // Connection timeout in seconds\n    \"dbList\": [\n        {\n            \"dbInstanceId\": \"unique_id\",\n            \"dbHost\": \"hostname\",\n            \"dbPort\": 3306,\n            \"dbDatabase\": \"database_name\",\n            \"dbUsername\": \"username\",\n            \"dbPassword\": \"password\",\n            \"dbType\": \"MySQL\",\n            \"dbVersion\": \"8.0\",\n            \"dbActive\": true    // Only one instance should be active\n        },\n        {\n            \"dbInstanceId\": \"unique_id\",\n            \"dbHost\": \"hostname\",\n            \"dbPort\": 3306,\n            \"dbDatabase\": \"database_name\",\n            \"dbUsername\": \"username\",\n            \"dbPassword\": \"password\",\n            \"dbType\": \"MySQL\",\n            \"dbVersion\": \"5.7\",\n            \"dbActive\": false    // othre one instance should be unactive\n        }\n    ],\n    \"logPath\": \"/path/to/logs\",\n    \"logLevel\": \"info\"\n}\n```\n\n### Logging Configuration\n- **Log Levels**: TRACE, DEBUG, INFO, SUCCESS, WARNING, ERROR, CRITICAL\n- **Log Rotation**: 10 MB per file, 7 days retention\n- **Output**: Both stderr (for MCP) and file logging\n\n## \ud83d\udd12 Security Features\n\n### Query Restrictions\n- **Read-only Queries**: `execute_query_with_limit` only allows SELECT statements\n- **Automatic LIMIT**: Prevents excessive data retrieval (max 10,000 rows)\n- **Parameter Validation**: Input validation for all parameters\n\n### Configuration Security\n- **Password Hiding**: Sensitive information is masked in responses\n- **Instance Isolation**: Only active database configuration is exposed\n- **Environment Override**: Secure configuration file path management\n\n## \ud83c\udfd7\ufe0f Architecture\n\n### Project Structure\n```\nsrc/\n\u251c\u2500\u2500 server.py              # MCP server main entry point\n\u251c\u2500\u2500 utils/                 # Utility modules\n\u2502   \u251c\u2500\u2500 db_config.py       # Database configuration management\n\u2502   \u251c\u2500\u2500 db_pool.py         # Connection pool management\n\u2502   \u251c\u2500\u2500 db_operate.py      # Database operations\n\u2502   \u251c\u2500\u2500 logger_util.py     # Logging management\n\u2502   \u2514\u2500\u2500 __init__.py        # Module initialization\n\u251c\u2500\u2500 resources/             # MCP resources\n\u2502   \u2514\u2500\u2500 db_resources.py    # Database resources\n\u2514\u2500\u2500 tools/                 # MCP tools\n    \u2514\u2500\u2500 db_tool.py         # Database tools\n```\n\n### Key Components\n\n#### Database Connection Pool\n- **Singleton Pattern**: Ensures single pool instance\n- **Async Management**: Non-blocking connection handling\n- **Automatic Cleanup**: Connection release and pool management\n\n#### Configuration Management\n- **JSON-based**: Human-readable configuration format\n- **Environment Override**: Flexible configuration management\n- **Validation**: Required field validation and error handling\n\n#### Logging System\n- **Unified Interface**: Single logger instance across modules\n- **Configurable Output**: File and console logging\n- **Structured Format**: Timestamp, level, module, function, and line information\n\n## \ud83e\uddea Testing\n\n### Generate Test Data\n```python\n# Generate 100 test records for users table\nawait generate_demo_data(\"users\", [\"name\", \"email\", \"phone\"], 100)\n```\n\n### Test Database Connection\n```python\n# Test basic SQL execution\nresult = await sql_exec(\"SELECT 1 as test\")\nprint(result)  # {'success': True, 'result': [{'test': 1}]}\n```\n\n## \ud83d\udcca Monitoring\n\n### Database Status\n```python\n# Get database configuration\nconfig = await get_database_config()\nprint(f\"Database: {config['dbType']} {config['dbVersion']}\")\n\n# Get table information\ntables = await get_database_tables()\nprint(f\"Total tables: {len(tables)}\")\n```\n\n### Connection Pool Status\n- Pool size and overflow configuration\n- Connection timeout settings\n- Active connection count\n\n## \ud83d\udea8 Troubleshooting\n\n### Common Issues\n\n#### Connection Errors\n```bash\n# Check database connectivity\nmysql -h localhost -P 3306 -u username -p database_name\n\n# Verify configuration\npython -c \"from src.utils.db_config import load_db_config; print(load_db_config())\"\n```\n\n#### Permission Issues\n- Ensure database user has necessary privileges\n- Check firewall and network access\n- Verify database server is running\n\n#### Configuration Errors\n- Validate JSON syntax in `dbconfig.json`\n- Check file permissions\n- Verify environment variables\n\n### Debug Mode\nSet log level to DEBUG in configuration:\n```json\n{\n    \"logLevel\": \"debug\"\n}\n```\n\n## \ud83e\udd1d Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Add tests if applicable\n5. Submit a pull request\n\n### Development Setup\n```bash\n# Install in development mode with all dependencies\npip install -e \".[dev,test,docs]\"\n\n# Run with debug logging\nexport LOG_LEVEL=debug\npython src/server.py\n```\n\n### Code Quality Tools\n```bash\n# Format code\nblack src/\nisort src/\n\n# Lint code\nflake8 src/\nmypy src/\n\n# Run tests\npytest\n\n# Run tests with coverage\npytest --cov=src --cov-report=html\n\n# Pre-commit hooks\npre-commit install\npre-commit run --all-files\n```\n\n## \ud83d\udcc4 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## \ud83d\udc65 Authors\n\n- **Frank Jin** - *Initial work* - [j00131120@163.com](mailto:j00131120@163.com)\n\n## \ud83d\ude4f Acknowledgments\n\n- [FastMCP](https://github.com/fastmcp/fastmcp) - MCP framework\n- [aiomysql](https://github.com/aio-libs/aiomysql) - Async MySQL driver\n- [loguru](https://github.com/Delgan/loguru) - Logging library\n\n## \ud83d\udcde Support\n\nFor support and questions:\n- Create an issue in the repository\n- Contact: [j00131120@163.com](mailto:j00131120@163.com)\n\n## \ud83d\udd04 Changelog\n\n### v1.0.0\n- Initial release\n- MCP protocol support\n- Multi-database compatibility\n- Async connection pooling\n- Security features implementation\n\n## \ud83d\udce6 Building and Distribution\n\n### Build the Package\n```bash\n# Clean and build\npython build.py build\n\n# Build and check\npython build.py check\n\n# Build and test installation\npython build.py test\n\n# Complete build process\npython build.py all\n```\n\n### Publish to PyPI\n```bash\n# Build, test, and publish\npython build.py publish\n\n# Or manually\npython -m build\npython -m twine check dist/*\npython -m twine upload dist/*\n```\n\n### Package Information\n- **Package Name**: `mysql-server-mcp`\n- **Entry Point**: `mysql-mcp-server`\n- **MCP Server Entry Point**: `mysql`\n- **Python Version**: >= 3.12\n- **License**: MIT\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A Model Context Protocol (MCP) server that enables secure interaction with MySQL/MariaDB/TiDB/AWS OceanBase/RDS/Aurora MySQL DataBases.",
    "version": "1.0.3",
    "project_urls": {
        "Bug Tracker": "https://github.com/j00131120/mcp_database_server/issues",
        "Changelog": "https://github.com/j00131120/mcp_database_server/blob/main/mysql_mcp_server/CHANGELOG.md",
        "Documentation": "https://github.com/j00131120/mcp_database_server/blob/main/mysql_mcp_server/README.md",
        "Download": "https://github.com/j00131120/mcp_database_server/tree/main/mysql_mcp_server",
        "Homepage": "https://github.com/j00131120/mcp_database_server/tree/main/mysql_mcp_server",
        "Repository": "https://github.com/j00131120/mcp_database_server.git",
        "Source Code": "https://github.com/j00131120/mcp_database_server/tree/main/mysql_mcp_server"
    },
    "split_keywords": [
        "mcp",
        " mysql",
        " tidb",
        " oceanbase",
        " model-context-protocol",
        " async",
        " connection-pool"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c3fc628fc97a3536f1e173ffb061080705a38fc9ddce29be4357db9de9f0adf7",
                "md5": "2de688cf3e204cf43724ef5f0ebf141b",
                "sha256": "b7b27645022cceb918b5f94f926fe6c9bee18c070b3c22c3c1b527197278f526"
            },
            "downloads": -1,
            "filename": "mysql_mcp_server3-1.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2de688cf3e204cf43724ef5f0ebf141b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.12",
            "size": 18651,
            "upload_time": "2025-08-17T01:55:26",
            "upload_time_iso_8601": "2025-08-17T01:55:26.638356Z",
            "url": "https://files.pythonhosted.org/packages/c3/fc/628fc97a3536f1e173ffb061080705a38fc9ddce29be4357db9de9f0adf7/mysql_mcp_server3-1.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "86107360c53c8eca1c352aa1ddd4b1ffbdd53f39d6378cb8f91338925f55db37",
                "md5": "16e9094af6c8bb0b8dfc8dbe277b35b0",
                "sha256": "fdaf4d7879a7d2b613268de336c2f1cf957f1c1f23dc060bffc52f872dae9f1a"
            },
            "downloads": -1,
            "filename": "mysql_mcp_server3-1.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "16e9094af6c8bb0b8dfc8dbe277b35b0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.12",
            "size": 16806,
            "upload_time": "2025-08-17T01:55:28",
            "upload_time_iso_8601": "2025-08-17T01:55:28.216272Z",
            "url": "https://files.pythonhosted.org/packages/86/10/7360c53c8eca1c352aa1ddd4b1ffbdd53f39d6378cb8f91338925f55db37/mysql_mcp_server3-1.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-17 01:55:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "j00131120",
    "github_project": "mcp_database_server",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "mysql-mcp-server3"
}
        
Elapsed time: 1.90392s