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-0.1.0.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-0.1.0-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mcp_mysql_connect-0.1.0.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-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9aa630f88da5c60f3ccb357bcbd330c4dbe31fe0ee13bd7124fc5020698cb9fc
MD5 f43ab77e121a44131392b95586903b4c
BLAKE2b-256 dc145eb4e8029168ea75a10ab198e1c9ef8710ef5ed0ee8eb21ce11ebbbc58fe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mcp_mysql_connect-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 96527b675fc2705bb28bd336ab82871b220189cbb2b17949ba6c3ba3521aed09
MD5 b94f81534f642d26b65af6c5460e61eb
BLAKE2b-256 63583897257f9f7ad0811075db4c043b9d5d13750f1dc61370d33ef92200ede7

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