{"type":"mcp_server","name":"mcp-server-mysql","description":"This repository provides a Model Context Protocol (MCP) server for read-only access to MySQL databases, enabling LLMs to inspect schemas and execute secure, parameterized queries with configurable timeouts and pagination.","category":"Database","language":"TypeScript","stars":1890,"forks":18,"owner":"benborla","github_url":"https://github.com/benborla/mcp-server-mysql","homepage":null,"setup":"## Setup\n\n**Using Smithery:**\nInstall using Smithery with `npx -y @smithery/cli@latest install @benborla29/mcp-server-mysql --client claude` and follow the prompts.\n\n**Using MCP Get:**\nInstall using MCP Get with `npx @michaellatman/mcp-get@latest install @benborla29/mcp-server-mysql`.\n\n**Using NPM/PNPM:**\nInstall globally using `npm install -g @benborla29/mcp-server-mysql` or `pnpm add -g @benborla29/mcp-server-mysql`.\n\n**Manual Configuration for Claude Desktop App:**\nAdd the MCP server configuration to your `claude_desktop_config.json` file, including command, arguments, and environment variables for MySQL connection.\n\n**Advanced Configuration Options:**\nCustomize the MCP server's behavior by modifying the `mcpServers` configuration in your `claude_desktop_config.json` file, adjusting environment variables for performance, security, and monitoring.\n\n**Testing Database Setup:**\n1. Create a test database and user in MySQL.\n2. Run the database setup script using `pnpm run setup:test:db`.\n3. Configure the test environment by creating a `.env.test` file with MySQL connection details.\n4. Add scripts to your `package.json` for database setup and testing.\n\n**Running Tests:**\nRun tests using `pnpm test` after setting up the test database.","tools":"## Available Tools\n\n1.  **mysql_query** (Execute read-only SQL queries against the connected database.)\n2.  **Table Schemas** (Provides JSON schema information for each table, including column names, data types, index information, constraints, and foreign key relationships.)\n3.  **SQL injection prevention** (Prevents SQL injection through prepared statements.)\n4.  **Query whitelisting/blacklisting capabilities** (Provides query whitelisting/blacklisting capabilities.)\n5.  **Rate limiting** (Implements rate limiting for query execution.)\n6.  **Optimized connection pooling** (Offers optimized connection pooling.)\n7.  **Query result caching** (Supports query result caching.)\n8.  **Comprehensive query logging** (Provides comprehensive query logging.)","faq":null,"created_at":"2024-12-09T14:02:55+00:00","updated_at":"2025-03-28T21:47:39+00:00","source_url":"https://model-context-protocol.com/servers/mcp-server-mysql-llm-read-only","related_articles":[]}