MySQL MCP Server
Provides MySQL database connectivity with tools for querying table schemas and structures in MySQL databases.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MySQL MCP Servershow me the schema for the users table"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MySQL MCP Server
A Model Context Protocol (MCP) server that provides MySQL database connectivity and tools.
Installation
npm install
npm run buildRelated MCP server: MySQL MCP Server
Usage
Configuration
The server can be configured using either environment variables or command-line arguments. Environment variables take precedence over command-line arguments.
Environment Variables
MYSQL_HOST: MySQL host (default: localhost)MYSQL_PORT: MySQL port (default: 3306)MYSQL_USER: MySQL user (default: root)MYSQL_PASSWORD: MySQL password (default: empty)MYSQL_DATABASE: MySQL database (default: test)
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:
crimson-mysql-mcpSpecify custom host and database:
crimson-mysql-mcp --host db.example.com --database myappUsing short flags:
crimson-mysql-mcp -h 192.168.1.100 -u myuser -P mypass -d productionClaude Desktop Configuration
Using environment variables (recommended):
{
"mcpServers": {
"mysql": {
"command": "npx",
"args": [
"-y",
"crimson-mysql-mcp@1.0.2"
],
"env": {
"MYSQL_HOST": "your-mysql-host",
"MYSQL_PORT": "3306",
"MYSQL_USER": "your-username",
"MYSQL_PASSWORD": "your-password",
"MYSQL_DATABASE": "your-database"
}
}
}
}For local development:
{
"mcpServers": {
"mysql": {
"command": "node",
"args": [
"/path/to/your/crimson-mysql-mcp/build/index.js"
],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_USER": "root",
"MYSQL_DATABASE": "test"
}
}
}
}Available Tools
get-schema: Get the schema/structure of a MySQL table
Parameters:
schemaName(string) - The name of the table to describe
Development
# Install dependencies
npm install
# Run in development mode
npm run server:dev
# Build the project
npm run build
# Watch and rebuild on changes
npm run server:build:watch
# Run with MCP Inspector (for debugging)
npm run server:inspectPublishing to npm
To make this package available via npx:
Update the package.json with your npm account details
Run:
npm publish
License
ISC
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI models to perform MySQL database operations through a standardized interface, supporting secure connections, query execution, and comprehensive schema management.Last updated77933MIT
- Flicense-quality-maintenanceEnables direct interaction with MySQL databases through SQL queries, table exploration, and schema inspection with support for prepared statements and connection pooling.Last updated
- Flicense-qualityDmaintenanceEnables interaction with MySQL databases through tools for listing tables, querying table schemas, executing queries, viewing indexes, and analyzing query execution plans.Last updated
- Alicense-qualityCmaintenanceEnables interaction with MySQL databases through connection management, SQL execution, and schema exploration. It features multi-connection support and a safety-focused 'dangerous mode' for write operations.Last updated393MIT
Related MCP Connectors
Connect to PlanetScale databases, branches, schema, query insights, and execute SQL
Explore your Messages SQLite database to browse tables and inspect schemas with ease. Run flexible…
Stripe MCP Pack — read-only access to Stripe data via API key.
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/irwantocrimson/mysql-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server