Install
$ agentstack add mcp-myheisenberg-mysql-mcp-server β scanned Β· β verified, works with Claude Code, Cursor, and more.
Security review
β PassedNo issues found. Passed automated security review. Β· v0.1.0 How review works β
- β Prompt-injection patterns
- β Secret / credential exfiltration
- β Dangerous shell & filesystem operations
- β Untrusted network calls
- β Known-malicious package signatures
What it can access
- β Network access No
- β Filesystem access No
- β Shell / process execution No
- β Environment & secrets No
- β Dynamic code execution No
From automated source analysis of v0.1.0. βUsedβ means the capability is present in the source β more access means more to trust, not that itβs unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work βAbout
π§ MySQL MCP Server
A Model Context Protocol (MCP) server for MySQL database operations. Provides 4 powerful tools for database interaction through any MCP-compatible client.
β¨ Features
- π Execute SQL Queries - Run any SELECT, INSERT, UPDATE, DELETE commands
- π List Databases - View all available databases
- π List Tables - Show tables in any database
- ποΈ Describe Tables - Get detailed table structure information
- π Secure - Environment-based configuration, no hardcoded credentials
- β‘ Fast - Built with TypeScript and connection pooling
π Quick Start
Installation
# Clone the repository
git clone https://github.com/myheisenberg/mysql-mcp-server.git
cd mysql-mcp-server
# Install dependencies
npm install
# Build the project
npm run build
Configuration
The server uses environment variables for database configuration:
DB_HOST=localhost # MySQL host (default: localhost)
DB_USER=root # MySQL username (default: root)
DB_PASSWORD= # MySQL password (default: empty)
DB_PORT=3306 # MySQL port (default: 3306)
π Usage
With Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"mysql": {
"command": "node",
"args": ["path/to/mysql-mcp-server/dist/index.js"],
"env": {
"DB_HOST": "localhost",
"DB_USER": "your_username",
"DB_PASSWORD": "your_password",
"DB_PORT": "3306"
}
}
}
}
With Cursor IDE
Add to your MCP configuration:
{
"mcpServers": {
"mysql": {
"command": "node",
"args": ["path/to/mysql-mcp-server/dist/index.js"],
"env": {
"DB_HOST": "localhost",
"DB_USER": "your_username",
"DB_PASSWORD": "your_password",
"DB_PORT": "3306"
}
}
}
}
π οΈ Available Tools
1. mysql_query
Execute any MySQL query and get formatted results.
Example: "Run a SELECT query on the users table"
2. mysql_databases
List all available databases on the MySQL server.
Example: "Show me all databases"
3. mysql_tables
List all tables in a specific database.
Example: "What tables are in the blog database?"
4. mysql_describe
Get detailed information about a table's structure.
Example: "Describe the structure of the users table"
π§ Development
# Install dependencies
npm install
# Development mode (watch for changes)
npm run dev
# Build for production
npm run build
# Start the server
npm start
π¦ Project Structure
mysql-mcp-server/
βββ src/
β βββ index.ts # Main MCP server implementation
βββ dist/ # Compiled JavaScript (auto-generated)
βββ package.json # Project dependencies and scripts
βββ tsconfig.json # TypeScript configuration
βββ .gitignore # Git ignore rules
βββ README.md # This file
π Security
- No hardcoded credentials - All database connection details come from environment variables
- Connection pooling - Efficient and secure database connections
- Error handling - Proper error messages without exposing sensitive information
π€ Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
π License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
π Acknowledgments
- Built with the Model Context Protocol SDK
- Uses mysql2 for MySQL connectivity
- Inspired by the MCP community
π Support
If you encounter any issues or have questions:
- Check the Issues page
- Create a new issue if your problem isn't already reported
- Provide as much detail as possible including error messages and configuration
Made with β€οΈ for the MCP community
Source & license
This open-source MCP server is cataloged on AgentStack and links to its original source β we do not rehost the code.
- Author: myheisenberg
- Source: myheisenberg/mysql-mcp-server
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.