Skip to content

Installation

Chris edited this page Jun 6, 2026 · 7 revisions

Installation

Prerequisites

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

Installation Methods

Method 1: NPM / PNPM (Recommended)

# Install globally
pnpm add -g @neverinfamous/mysql-mcp

# Run
mysql-mcp --transport stdio --mysql mysql://user:password@localhost:3306/database

# Or use npx without installing
npx @neverinfamous/mysql-mcp --transport stdio --mysql mysql://user:password@localhost:3306/database

Method 2: Clone from GitHub

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

# Navigate to directory
cd mysql-mcp

# Install dependencies
pnpm install

# Build the project
pnpm run build

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

Method 3: 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.

Verifying Installation

Test the server responds to MCP initialization:

echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","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