惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
V2EX
人人都是产品经理
人人都是产品经理
WordPress大学
WordPress大学
博客园 - Franky
小众软件
小众软件
酷 壳 – CoolShell
酷 壳 – CoolShell
Apple Machine Learning Research
Apple Machine Learning Research
爱范儿
爱范儿
IT之家
IT之家
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
Visual Studio Blog
S
SegmentFault 最新的问题
美团技术团队
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
有赞技术团队
有赞技术团队
B
Blog RSS Feed
Last Week in AI
Last Week in AI
Jina AI
Jina AI
博客园 - 司徒正美
The Cloudflare Blog
博客园_首页
博客园 - 聂微东
宝玉的分享
宝玉的分享
大猫的无限游戏
大猫的无限游戏

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Talk to Your MySQL Database with Claude — No SQL Required
Dylan Ngo · 2026-06-28 · via DEV Community

Dylan Ngo

If you use Claude daily, you already know it's great for writing, coding, and answering questions. But what if Claude could also query your live MySQL database — in plain English?

That's exactly what the MySQL MCP Server plugin makes possible. In this tutorial, I'll show you how to install it and start having real conversations with your database in under five minutes.


What is MCP?

MCP (Model Context Protocol) is an open standard that lets AI assistants like Claude connect to external tools and data sources. Think of it as a plugin system: instead of copy-pasting data into Claude's chat window, you connect Claude directly to the source.

With an MCP server running, Claude can read and write data in real time — no manual exports, no SQL gymnastics.


What Can You Do With This Plugin?

Once connected, you can ask Claude things like:

  • "What tables are in my database?"
  • "Show me all orders placed in the last 7 days."
  • "How many users signed up this month compared to last month?"
  • "Update the status of order #1042 to 'shipped'."

Claude translates your plain-English request into the right SQL query, runs it, and gives you a human-readable answer. You stay in the conversation — no switching to a SQL client.


Prerequisites

  • Node.js 18+ installed on your machine
  • A running MySQL instance (local or remote)
  • Claude Desktop or Claude Code (CLI)

Step 1: Download the Plugin

Head to the Releases page and download the latest .mcpb file:

mysql-mcp-server-v1.0.1.mcpb

.mcpb is Claude's plugin bundle format — a single file that contains everything needed to run the server.


Step 2: Install the Plugin

Option A — Claude Code (CLI):

claude plugin install mysql-mcp-server-v1.0.1.mcpb

Option B — Claude Desktop:

Double-click the .mcpb file. Claude Desktop will detect it and open an install prompt.


Step 3: Configure Your Database Connection

After installation, Claude will ask for your connection details. Fill in the fields:

Field Example Notes
Database Host 127.0.0.1 Use your server IP for remote databases
Database Port 3306 Default MySQL port
Database User root Use a least-privilege user in production
Database Password •••••• Stored securely
Database Name mydb The specific database to connect to
Connection Pool Limit 10 Max concurrent connections

Tip: For production use, create a dedicated read-only MySQL user for Claude. This prevents accidental writes if you only need to query data.

You can update these settings at any time from Claude's plugin settings under MySQL MCP Server.


Step 4: Try It Out

Once connected, start a new conversation in Claude and try these prompts:

Explore your schema:

"What tables do I have? Give me a quick summary of what each one stores."

Query data in plain English:

"Show me the 10 most recent signups with their email and created date."

Get aggregations without writing SQL:

"How many orders are in each status? Show me a breakdown."

Write data when you need to:

"Set the is_active flag to false for all users who haven't logged in since January."

Claude will show you the SQL it's about to run before executing write operations, so you're always in control.


Available Tools

The plugin exposes five tools that Claude uses behind the scenes:

Tool What it does
select_mysql_version Returns the MySQL server version
list_tables Lists all tables in the connected database
describe_table Shows columns, types, and constraints for a table
query Runs a read-only SELECT query
mutate Runs INSERT, UPDATE, or DELETE statements

mutate rejects SELECT statements — reads and writes are intentionally separated.


Want to Build on It?

The source is on GitHub: iamdylanngo/mysql-mcp-server

It's built with TypeScript, the MCP SDK, mysql2, and Zod for input validation. PRs and issues are welcome.


Wrapping Up

The MySQL MCP Server bridges the gap between Claude's language understanding and your real data. If you've ever wanted to ask questions about your database the same way you'd ask a colleague, this is the plugin to try.

Download it from the Releases page and let me know what you build with it in the comments.


Tags: claude mcp mysql ai database