mysql-mcp-server
mcp model-context-protocol mysql cursor n8n
Documentation
@davewind/mysql-mcp-server
A Model Context Protocol server that provides read-only access to Mysql databases. This server enables LLMs to inspect database schemas and execute read-only queries.
Key Features
1.Read-Only Database Access: Enforces read-only operations through SQL validation and READ ONLY transactions
2.Schema Discovery: Automatically identifies and exposes database table structures
3.SQL Query Execution: Provides a query tool that accepts and executes SELECT statements
4.Model Context Protocol Compliance: Implements the MCP specification for seamless integration with compatible LLMs
5.Simple Configuration: Easy setup with minimal configuration required
Tools
- query
- Execute read-only SQL queries against the connected database
- Input: `sql` (string): The SQL query to execute
- All queries are executed within a READ ONLY transaction
Resources
The server provides schema information for each table in the database:
- Table Schemas (`mysql://user:password@localhost:3306/database`)
- JSON schema information for each table
- Includes column names and data types
- Automatically discovered from database metadata
Install
npm install @davewind/mysql-mcp-server -gConfiguration
MCP settings configuration file:
> recommended use
{
"mcpServers": {
"mysql": {
"command": "npx",
"args": ["-y", "@davewind/mysql-mcp-server", "mysql://user:password@localhost:port/database"],
}
}
}Test
> Replace mysql://user:password@localhost:port/ and npm run inspector
"scripts": {
"inspector": "npx @modelcontextprotocol/inspector@0.10.2 build/index.js mysql://user:password@localhost:port/database
}Env
node v18 +System Architecture
> The MySQL MCP Server acts as an intermediary between LLMs and MySQL databases, processing requests according to the Model Context Protocol.
Component Interaction
Component Interaction
Security Model
> The MySQL MCP Server implements a strict security model to ensure that database access is read-only.
Security measures include:
1.SQL query validation to allow only SELECT statements
2.Execution of all queries within READ ONLY transactions
3.No support for data modification operations (INSERT, UPDATE, DELETE, etc.)
4. No support for database schema modification (CREATE, ALTER, DROP, etc.)
Integration with LLMs
> The MySQL MCP Server is designed to work with any LLM system that supports the Model Context Protocol. It communicates through JSON-RPC over stdio, following the MCP specification.
License
MIT
Frequently asked questions
What is mysql-mcp-server?
mysql-mcp-server is mcp model-context-protocol mysql cursor n8n
How do I install mysql-mcp-server?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is mysql-mcp-server open source?
Yes — it is hosted on GitHub at https://github.com/dave-wind/mysql-mcp-server and has 14 stars.
Related MCP tools
🔥 Official Firecrawl MCP Server - Adds powerful web scraping and search to Cursor, Claude and any other LLM clients.
Use any LLMs (Large Language Models) for Deep Research. Support SSE API and MCP server.
Enhanced MCP server for interactive user feedback and command execution in AI-assisted development, featuring dual interface support (Web UI and Desktop Application) with intelligent environment detection and cross-platform compatibility.
A powerful Zotero AI and MCP plugin with ChatGPT, Gemini 3.7, Claude Fable 5, Claude Opus 5, DeepSeek V4, Grok, OpenRouter, Kimi k3, GLM 5.3, SiliconFlow, GPT-oss, Gemma 4, Qwen 3.8
Connect your browser to AI models. Just use Dia on Chrome, Arc or Firefox.
文颜 MCP Server 可以让 AI 自动将 Markdown 文章排版后发布至微信公众号。
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP