JUHE API Marketplace
xianzong85 avatar
MCP Server

MySQL Server MCP Server

A TypeScript-based MCP server that facilitates SQL query execution and MySQL database connectivity using environment variables.

0
GitHub Stars
11/21/2025
Last Updated
MCP Server Configuration
1{
2 "name": "mysql",
3 "command": "/path/to/mysql-server/build/index.js",
4 "env": {
5 "MYSQL_HOST": "your-mysql-host",
6 "MYSQL_USER": "your-mysql-user",
7 "MYSQL_PASSWORD": "your-mysql-password",
8 "MYSQL_DATABASE": "your-mysql-database"
9 }
10}
JSON10 lines
  1. Home
  2. MCP Servers
  3. mysql-server-MCP-Server

README Documentation

mysql-server MCP Server

A Model Context Protocol server for MySQL database access

This is a TypeScript-based MCP server that provides tools for querying MySQL databases. It demonstrates core MCP concepts by providing:

  • Tools for executing SQL queries
  • Connection to MySQL databases via environment variables

Features

Tools

  • query - Execute SQL queries
    • Takes SQL query string as required parameter
    • Returns query results

Configuration

Set the following environment variables in your MCP server configuration:

  • MYSQL_HOST: MySQL server host
  • MYSQL_USER: MySQL username
  • MYSQL_PASSWORD: MySQL password
  • MYSQL_DATABASE: MySQL database name

Development

Install dependencies:

npm install

Build the server:

npm run build

For development with auto-rebuild:

npm run watch

Installation

To use with Claude Desktop, add the server config:

On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json On Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "mysql": {
      "command": "/path/to/mysql-server/build/index.js",
      "env": {
        "MYSQL_HOST": "your-mysql-host",
        "MYSQL_USER": "your-mysql-user",
        "MYSQL_PASSWORD": "your-mysql-password",
        "MYSQL_DATABASE": "your-mysql-database"
      }
    }
  }
}

Debugging

Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:

npm run inspector

The Inspector will provide a URL to access debugging tools in your browser.

Quick Install

Quick Actions

View on GitHubView All Servers

Key Features

Model Context Protocol
Secure Communication
Real-time Updates
Open Source

Boost your projects with Wisdom Gate LLM API

Supporting GPT-5, Claude-4, DeepSeek v3, Gemini and more.

Enjoy a free trial and save 20%+ compared to official pricing.

Learn More
JUHE API Marketplace

Accelerate development, innovate faster, and transform your business with our comprehensive API ecosystem.

JUHE API VS

  • vs. RapidAPI
  • vs. API Layer
  • API Platforms 2025
  • API Marketplaces 2025
  • Best Alternatives to RapidAPI

For Developers

  • Console
  • Collections
  • Documentation
  • MCP Servers
  • Free APIs
  • Temp Mail Demo

Product

  • Browse APIs
  • Suggest an API
  • Wisdom Gate LLM
  • Global SMS Messaging
  • Temp Mail API

Company

  • What's New
  • Welcome
  • About Us
  • Contact Support
  • Terms of Service
  • Privacy Policy
Featured on Startup FameFeatured on Twelve ToolsFazier badgeJuheAPI Marketplace - Connect smarter, beyond APIs | Product Huntai tools code.marketDang.ai
Copyright © 2025 - All rights reserved