Skip to main content

MCP Server to connect the MySQL database

Project description

MySQL MCP Server Documentation

Overview

This repository contains the MySQL database configuration for the MCP (Model Context Protocol) server. This MCP server handles data fetching from the connected database.

Prerequisites

  • Python 3.10 or above
  • pip or uv package installer
  • mysql-connector-python

Installation Steps

  1. Install the MCP package using either pip or uv package installer. The MCP package version should be 1.6.0 or higher with the CLI components included.
  2. Install the required MySQL connector package. This package is essential as it establishes the connection between your MCP server and the MySQL database, enabling data querying capabilities.
  3. Set up your environment variables by creating a .env file in your project directory. This file should contain your database connection details including host, username, password, and database name.
  4. After completing the installation and configuration, you can start the server and connect it to any MCP client for use. The server will handle database operations through the configured MySQL connection. For detailed setup instructions and additional configuration options, refer to the official MCP Python SDK documentation.

Environment Variables

Required environment variables for database connection:

  • DB_HOST - Database host address
  • DB_USER - Database username
  • DB_PASSWORD - Database password
  • DB_NAME - Target database name

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_mysql_connect-1.0.1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

mcp_mysql_connect-1.0.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file mcp_mysql_connect-1.0.1.tar.gz.

File metadata

  • Download URL: mcp_mysql_connect-1.0.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for mcp_mysql_connect-1.0.1.tar.gz
Algorithm Hash digest
SHA256 e064ac08a767e52d4c92e66d9fce23f97452474855f3e28d35e887e2475250c3
MD5 ed7289d993d69e144c0245ed25165fc5
BLAKE2b-256 ccd91f6c8ae8391537d3c813747411abb1ae386a2fecb47e8312ddcb71c7f19d

See more details on using hashes here.

File details

Details for the file mcp_mysql_connect-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_mysql_connect-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 33364f8ab565caccc8756f70ea490cabaf86a6b4793ad67daf626e50639de5a7
MD5 6dc433b01fbbbf6b1ce7815468d4b6ac
BLAKE2b-256 e4c6b863d02236c29bdcd2c250053abcaafc04e7dd63155eeecaf5ed79c70b3c

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