Back to Home
yukihito-jokyu icon

mysql-mcp-server

Verified Safe

by yukihito-jokyu

Overview

A Model Context Protocol (MCP) server providing read-only access to MySQL database schema information and sample data for LLM agents or backend development.

Installation

Run Command
npx -y @yukihito/mysql-mcp-server@latest --host localhost --port 3306 --name your_username --password your_password --database your_database

Environment Variables

  • DB_HOST
  • DB_PORT
  • DB_USER
  • DB_PASSWORD
  • DB_DATABASE

Security Notes

The server is explicitly designed for read-only operations, preventing any data modification (INSERT, UPDATE, DELETE). It uses parameterized queries (e.g., `DESCRIBE ??`, `SELECT * FROM ?? LIMIT 5`) in `src/lib/database.ts` to prevent SQL injection for table names. Database credentials are passed via CLI arguments, which is less secure than environment variables for highly sensitive production environments but is a common pattern for local MCP client configurations.

Similar Servers

Stats

Interest Score0
Security Score9
Cost ClassLow
Avg Tokens200
Stars0
Forks0
Last Update2025-11-21

Tags

MySQLMCPRead-onlySchemaSample Data