my-sql-interface-for-claude
Facilitates direct execution of structured query language (SQL) against MySQL databases via the Claude AI interface, enabling retrieval and presentation of structured dataset outputs. Offers introspection capabilities for database schema discovery, including table dimensions and layouts.
Author

elber-code
Quick Info
Actions
Tags
MySQL Interaction Module for Conversational AI
This module constitutes an MCP (Model Context Protocol) server designed to grant Claude AI direct operational access to MySQL persistence layers.
Capabilities
- Facilitate MySQL data interaction powered by Claude's reasoning.
- Permit the execution of any syntactically correct SQL statement.
- Provide schema awareness, specifically detailing table organization and storage footprint.
- Render query results in a format optimized for readability within the Claude environment.
Deployment Instructions
Installation via Smithery Utility
To automate the setup of this component on Claude Desktop using Smithery:
bash npx -y @smithery/cli install @elber-code/database-tools --client claude
For manual setup and utilization, follow these sequence points:
- Acquire the source code Use Git to clone the repository structure:
git clone [repository-url]
Alternatively, download and decompress the source archive.
- Resolve dependencies Navigate into the project root directory and invoke:
npm install
Configuration Protocol
For Claude to successfully invoke this service, the following configuration block must be incorporated into your claude_desktop_config.json file, typically situated at:
C:\Users\YOUR_USER\AppData\Roaming\Claude\claude_desktop_config.json
With the specific structure defined as:
{ "mcpServers": { // Pre-existing entries... "database-tools": { "command": "node", "args": [ "C:\path\to\index.js" ] } } }
Operational Guidelines
Once integrated, you can direct your MySQL environment interactions from Claude using prompts such as:
-
Inventory Databases
"Issue an SQL command against MySQL to enumerate available databases." -
Inspect Schema
"Direct MySQL to return the structural definition for the table namedname_table." -
Measure Table Capacity
"Query MySQL for the storage volume occupied by the tablename_table." -
Arbitrary Command Execution
"Execute SQL command in MySQL: 'Describe the precise operation you wish to perform.'"
Security Considerations
This utility executes operations under the security context defined within the mysql.js credential file. Ensure that the supplied credentials possess only the minimal requisite privileges for the intended operational scope.
Diagnostics
Should connection difficulties arise, verify the following elements:
- Confirmation that the MySQL service daemon is active.
- Accuracy of the connection parameters stored in
mysql.js. - Correctness of the file path specified in the Claude configuration manifest.
Implementation Detail
To initiate database interrogation, prompt Claude with requests akin to: "Display all schema repositories within my MySQL instance" or "Ascertain the capacity footprint of the 'users' data container?"
