NM

neverinfamous/mysql-mcp

分析与监控

本页由 AI 翻译,技术细节请以原文为准。 查看原文

11 stars 2 forks 质量 84 趋势 32MIT

Secure MySQL Administration & Observability Featuring Code Mode— One Tool Replacing All 242 Specialized Tools for up to 90% Token Savings. Includes Connection Pooling, HTTP/SSE, OAuth 2.

概览

Integrate your AI agents with a production-ready MySQL environment. Deploy MCP v2 stateless architecture via HTTP transport. Optimize token efficiency via Code Mode. Secure your database with OAuth 2.1. This server includes for guided workflows: : This is a subset of available prompts. Use mysql_tool_index to discover the full list of guided workflows. This server exposes for database observability and telemetry: - Node.js >= 24.0.0 (See .node-version for the pinned local development version) - Bun (for executing repository automation scripts) - MySQL server - pnpm The Docker image uses the writenotenow namespace. The GitHub repo uses neverinfamous. For host.docker.internal on Linux, run the container with --add-host host.docker.internal:host-gateway. Launch the full observability stack using the included template. This includes Datadog, OpenTelemetry, Prometheus, and Grafana. This spins up the MCP server, MySQL database, Redis, and observability sidecars:

README

以下为原文 README 节选,完整内容请查看原文。

MySQL MCP Server (mysql-mcp)

📚 Full Documentation (Wiki) • Changelog • Security • Release Article

💎 Value Proposition

Integrate your AI agents with a production-ready MySQL environment. Deploy MCP v2 stateless architecture via HTTP transport. Optimize token efficiency via Code Mode. Secure your database with OAuth 2.1.

🎯 Leverage Core Benefits

Feature Description
Specialized Tools Access specialized tools for core CRUD, JSON, spatial data, document stores, and clusters.
Resources Monitor schema, performance metrics, process lists, replication status, and InnoDB diagnostics in real-time.
AI-Powered Prompts Execute guided workflows for query building, schema design, performance tuning, and infrastructure setup.
Code Mode Reduce LLM token consumption by consolidating operations inside a secure, sandboxed V8 isolate.
Token-Optimized Payloads Maximize token efficiency. Use optional flags to reduce response size for large payloads.
OAuth 2.1 Security Enforce granular access control with RFC compliance, strict scopes, and Keycloak integration.
Smart Tool Filtering Use tool groups and shortcuts to stay within IDE tool limits.
在 GitHub 查看完整 README

安装

npx -y @neverinfamous/mysql-mcp --transport stdio --tool-filter codemode
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "mysql-mcp": { "command": "npx", "args": [ "-y", "@neverinfamous/mysql-mcp", "--transport", "stdio", "--tool-filter", "codemode" ], "env": { "MYSQL_HOST": "localhost", "MYSQL_PORT": "3306", "MYSQL_USER": "mcp_user", "MYSQL_PASSWORD": "secure_password", "MYSQL_DATABASE": "testdb" }, "timeout": 600 } } }