Skip to content

Installation

Temp edited this page Dec 16, 2025 · 2 revisions

Installation

Prerequisites

  • Node.js 18+ - Required for running the MCP server
  • MySQL 5.7+ or 8.0+ - Server to connect to
  • npm or yarn - Package manager

Installation Methods

Method 1: Clone from GitHub (Recommended)

# Clone the repository
git clone https://github.com/neverinfamous/mysql-mcp.git

# Navigate to directory
cd mysql-mcp

# Install dependencies
npm install

# Build the project
npm run build

# Run the server
node dist/cli.js --transport stdio --mysql mysql://user:password@localhost:3306/database

Method 2: Docker

docker run -i --rm writenotenow/mysql-mcp:latest \
  --transport stdio \
  --mysql mysql://user:password@host.docker.internal:3306/database

For Docker setup details, see the Docker Hub page.

Interactive Quickstart

Prefer to learn by doing? We provide a comprehensive Jupyter Notebook that demonstrates how to use the mysql-mcp Python SDK for everything from basic queries to RAG and Spatial Search.

Verifying Installation

Test the server responds to MCP initialization:

echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"0.1.0"}}}' | node dist/cli.js --transport stdio --mysql mysql://user:pass@localhost/db

Next Steps

Clone this wiki locally