AWS Labs MySQL MCP Server

1.0.17 · active · verified Thu Apr 16

The AWS Labs MySQL Model Context Protocol (MCP) server enables AI agents and LLM applications to interact with MySQL databases, converting natural language questions into MySQL-compatible SQL queries. It's an active project by AWS Labs, with frequent updates, and currently at version 1.0.17. It integrates with various MCP-compatible AI clients/IDEs like Kiro, Cursor, and VS Code, extending their capabilities to manage and query MySQL databases securely.

Common errors

Warnings

Install

Imports

Quickstart

The AWS Labs MySQL MCP Server is designed to be executed as a server, which MCP-compatible AI clients connect to. The `uvx` command, as shown above, is the recommended way to run it, optionally specifying connection details for either RDS Data API or direct MySQL. Prior to running, ensure AWS credentials are configured (e.g., via `AWS_PROFILE` environment variable or `aws configure`), and your database credentials are securely stored in AWS Secrets Manager.

# The awslabs.mysql-mcp-server is intended to be run as an executable, often managed by an MCP client or 'uvx'.
# This command starts the server, which an MCP client can then connect to.
# Ensure your AWS credentials (e.g., via AWS_PROFILE) are configured and Secrets Manager
# contains your MySQL credentials.

# Example for RDS Data API connection (replace with your actual ARN and secret name):
# export AWS_PROFILE="your-aws-profile"
# export AWS_REGION="your-aws-region"
# uvx awslabs.mysql-mcp-server@latest \
#     --resource_arn "arn:aws:rds:your-aws-region:123456789012:cluster:your-db-cluster" \
#     --secret_arn "arn:aws:secretsmanager:your-aws-region:123456789012:secret:your-db-credentials-XXXXXX"

# Example for Direct MySQL connection (replace with your actual host, port, user, and secret name):
# export AWS_PROFILE="your-aws-profile"
# export AWS_REGION="your-aws-region"
# uvx awslabs.mysql-mcp-server@latest \
#     --hostname "your-mysql-host.com" \
#     --port 3306 \
#     --database "your_database_name" \
#     --secret_arn "arn:aws:secretsmanager:your-aws-region:123456789012:secret:your-db-credentials-XXXXXX"

view raw JSON →