database-tools
MCP tool that allows you to interact with MySQL databases
claude mcp add --transport stdio elber-code-database-tools node C:\path\to\index.js
How to use
Database Tools for Claude is an MCP server that enables Claude to interact directly with MySQL databases. It exposes a set of capabilities that let Claude query databases, inspect schemas, and retrieve formatted results suitable for reading within Claude’s interface. Key features include listing databases, listing tables within a database, retrieving size or structure information for tables, and executing arbitrary SQL queries. To use it, Claude issues structured requests that are translated by this MCP server into MySQL queries, and the results are returned in a readable format for Claude to present.
With this tool, you can: (1) list all databases, (2) view tables in a chosen database, (3) query the size of a specific table, and (4) run custom SQL queries. For example, you can ask Claude to show databases, describe a table’s structure, or execute a SELECT query and receive the results formatted for easy consumption. Security and access controls depend on the credentials configured in your mysql.js file and the permissions granted there.
How to install
Prerequisites:
- Node.js and npm installed on your system
- Git (for cloning the repository, if desired)
- Access to the MCP server environment where Claude is configured
Option A: Install via Smithery (recommended for Claude integration)
- Ensure you have npx available (comes with npm).
- Run: npx -y @smithery/cli install @elber-code/database-tools --client claude
Option B: Local development setup
- Clone the repository or download the package: git clone [repository-url]
- Navigate to the project directory: cd database-tools
- Install dependencies: npm install
- Start the server locally (adjust as needed for your environment): node index.js
Configuration notes:
- After installation, configure Claude to reference this MCP server in claude_desktop_config.json with the provided mcpServers.nametag entry and the path to the server script (index.js).
- Ensure your mysql.js (or equivalent credential file) is properly configured with credentials that grant only the necessary permissions.
Additional notes
Tips and considerations:
- Use the provided configuration example as a starting point and replace the path to index.js with the actual path in your environment.
- Ensure MySQL is reachable from the machine running the MCP server and that network/firewall rules allow the connections.
- Keep credentials in mysql.js minimal and scoped to required databases/tables.
- If you update the server code, restart the MCP service to pick up changes.
- On Windows, ensure proper escaping for file paths (use double backslashes in JSON strings).
Related MCP Servers
mcp-read-website-fast
Quickly reads webpages and converts to markdown for fast, token efficient web scraping
mcp-arr
MCP server for *arr media management suite
MCP_Atom_of_Thoughts
Atom of Thoughts (AoT) MCP is a server that decomposes complex problems into independent atomic units of thought, using the dependencies between these units to deliver more robust reasoning and validated insights.
whois
MCP Server for whois lookups.
options-chain
Option Chain MCP server
mcp -mysql
这是一款增强型MySQL MCP服务,专为 MySQL 数据库提供完善的只读访问能力。高性能的MCP服务能让大语言模型全面查看数据库结构,高效执行查询、分析,还具备更多高级特性。