MySQL MCP Server

by vitalyDV

MySQL MCP Server

This project implements an MCP (Model Context Protocol) server for working with MySQL database.

Repository

This project is available on GitHub: https://github.com/vitalyDV/mysql-mcp

Clone the repository

git clone https://github.com/vitalyDV/mysql-mcp.git cd mysql-mcp npm install

add config to mcp.json

{ "mcpServers": { "mysql_mcp_readonly": { "command": "node", "args": [ "./mysql-mcp/index.js" ], "env": { "MYSQL_HOST": "127.0.0.1", "MYSQL_PORT": "3306", "MYSQL_USER": "root", "MYSQL_PASS": "", "MYSQL_DB": "db", } } } }

Environment Variables

  • MYSQL_HOST - MySQL server host
  • MYSQL_PORT - MySQL server port
  • MYSQL_USER - MySQL username
  • MYSQL_PASS - MySQL password
  • MYSQL_DB - MySQL database name

Available MCP tools

  • query - execute SQL queries (only SELECT, SHOW, EXPLAIN, DESCRIBE)
  • table-schema - get table structure
  • list-tables - get list of all tables in the database

Available MCP resources

  • table://{name} - get data from the specified table (up to 100 rows)
-
security - not tested
-
license - not tested
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

An MCP server that allows working with MySQL databases by providing tools for executing read-only SQL queries, getting table schemas, and listing database tables.

  1. Repository
    1. Clone the repository
  2. add config to mcp.json
    1. Environment Variables
      1. Available MCP tools
        1. Available MCP resources

          Related MCP Servers

          • -
            security
            A
            license
            -
            quality
            An MCP server that integrates with MySQL databases, enabling secure read and write operations through LLM-driven interfaces with support for transaction handling and performance monitoring.
            Last updated -
            48
            3
            JavaScript
            MIT License
          • A
            security
            A
            license
            A
            quality
            An MCP server that provides read-only access to MySQL databases.
            Last updated -
            4
            695
            17
            JavaScript
            MIT License
            • Linux
            • Apple
          • -
            security
            A
            license
            -
            quality
            An MCP server that enables MySQL database integration with Claude. You can execute SQL queries and manage database connections.
            Last updated -
            1
            Python
            MIT License
            • Apple
          • A
            security
            F
            license
            A
            quality
            MCP server that allows Claude AI to interact directly with MySQL databases, enabling query execution and table information retrieval through natural language.
            Last updated -
            1
            6
            3
            JavaScript

          View all related MCP servers

          ID: n6vmu55uov