Provides MySQL database connectivity with tools for querying table schemas and structures in MySQL databases.
MySQL MCP Server
A Model Context Protocol (MCP) server that provides MySQL database connectivity and tools.
Installation
Usage
Command-Line Arguments
The server accepts the following command-line arguments:
-h, --host: MySQL host (default: localhost)-p, --port: MySQL port (default: 3306)-u, --user: MySQL user (default: root)-P, --password: MySQL password (default: empty)-d, --database: MySQL database (default: test)
Examples
Basic usage with default settings:
Specify custom host and database:
Using short flags:
Claude Desktop Configuration
Using npx (recommended after publishing to npm):
Or using short flags:
For local development:
Available Tools
get-schema: Get the schema/structure of a MySQL table
Parameters:
schemaName(string) - The name of the table to describe
Development
Publishing to npm
To make this package available via npx:
Update the package.json with your npm account details
Run:
npm publish
License
ISC