Skip to main content

A Python MCP server for MySQL database queries

Project description

mcp-server-mysql-py

A Python MCP server for MySQL database queries.

Installation

pip install mcp-server-mysql-py

Configuration

Set environment variables:

  • MYSQL_HOST - Database host (default: 127.0.0.1)
  • MYSQL_PORT - Database port (default: 3306)
  • MYSQL_USER - Database user (default: root)
  • MYSQL_PASS - Database password
  • MYSQL_DB - Database name

Usage

MCP Client Configuration

{
  "mcpServers": {
    "mysql": {
      "command": "mcp-server-mysql-py",
      "env": {
        "MYSQL_HOST": "127.0.0.1",
        "MYSQL_PORT": "3306",
        "MYSQL_USER": "root",
        "MYSQL_PASS": "password",
        "MYSQL_DB": "mydb"
      }
    }
  }
}

Tools

  • mysql_query - Execute SQL queries
  • mysql_tables - List all tables
  • mysql_describe - Show table columns

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

mcp_server_mysql_py-0.1.0.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

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

mcp_server_mysql_py-0.1.0-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file mcp_server_mysql_py-0.1.0.tar.gz.

File metadata

  • Download URL: mcp_server_mysql_py-0.1.0.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for mcp_server_mysql_py-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c52eec9ccf03ae3536e86b905791aee38cf50e7cfa439f7054c61222d3abb7cc
MD5 372f3805e185499a07328cfbb6b6d75d
BLAKE2b-256 750d684d39bcc1630ad3160cdeabba273563bd5e30a2e5d1a0c652bda967c1d3

See more details on using hashes here.

File details

Details for the file mcp_server_mysql_py-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_server_mysql_py-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1a022e05c8e0970faecb26abaeed3340bb66454c943634af1ab968eebf1f8b15
MD5 06200aa3e6e26a97f0593b1d3af5d997
BLAKE2b-256 e61871c0039a6f538157a6a033395c5a24717b3360db3fb01cac751d13d9a87c

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