MySQL MCP Server
Supports connections to DigitalOcean managed MySQL databases for remote database operations.
Enables connections to Google Cloud SQL MySQL instances for database operations and management.
Supports OAuth 2.1 authentication integration with Keycloak for enterprise-grade security with granular access control scopes and RFC-compliant identity provider integration.
Provides comprehensive MySQL database management with 191 specialized tools for CRUD operations, JSON functions, spatial/GIS, schema management, performance tuning, replication monitoring, and cluster administration. Includes 18 observability resources for real-time metrics and InnoDB diagnostics.
Provides connectivity to PlanetScale MySQL databases with SSL support for serverless database operations.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MySQL MCP Servershow me the top 5 customers by total purchase amount"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mysql-mcp
📚 Full Documentation (Wiki) • Changelog • Security • Release Article
The Most Comprehensive MySQL MCP Server Available
mysql-mcp is the definitive Model Context Protocol server for MySQL — empowering AI assistants like AntiGravity, Claude, Cursor, and other MCP clients with unparalleled database capabilities. Features Code Mode — a revolutionary approach that provides access to all 224 tools through a single JavaScript sandbox, eliminating the massive token overhead of multi-step tool calls. Also includes deterministic error handling, process-isolated code execution, and enterprise-grade features without sacrificing ease of use.
Related MCP server: MCP MySQL Server
🎯 What Sets Us Apart
Feature | Description |
224 Specialized Tools | The largest MySQL tool collection for MCP — from core CRUD and native JSON functions (MySQL 5.7+) to advanced spatial/GIS, document store, and cluster management |
18 Observability Resources | Real-time schema, performance metrics, process lists, status variables, replication status, and InnoDB diagnostics |
19 AI-Powered Prompts | Guided workflows for query building, schema design, performance tuning, and infrastructure setup |
Code Mode (Massive Token Savings) | Execute complex operations locally inside a separate V8 isolate ( |
Token-Optimized Payloads | Every tool response is audited for token efficiency. Tools with large payloads offer optional flags ( |
OAuth 2.1 + Access Control | Enterprise-ready security with RFC 9728/8414 compliance, granular scopes ( |
Smart Tool Filtering | 25 tool groups + 11 shortcuts let you stay within IDE limits while exposing exactly what you need |
Dual HTTP Transport | Streamable HTTP ( |
High-Performance Pooling | Built-in connection pooling for efficient, concurrent database access |
Ecosystem Integrations | First-class support for MySQL Router, ProxySQL, and MySQL Shell utilities |
Advanced Encryption | Full TLS/SSL support for secure connections, plus tools for managing data masking, encryption monitoring, and compliance |
Production-Ready Security | SQL injection protection, parameterized queries, input validation, and audit capabilities |
Deterministic Error Handling | Every tool returns structured |
Strict TypeScript | 100% type-safe codebase with 2185 tests and 90% coverage |
MCP 2025-11-25 Compliant | Full protocol support with tool safety hints, resource priorities, and progress notifications |
🚀 Quick Start
Prerequisites
Node.js 24+
MySQL 5.7+ or 8.0+ server
npm or yarn
Installation
NPM (Recommended)
npm install -g @neverinfamous/mysql-mcpRun the server:
mysql-mcp --transport stdio --mysql mysql://user:password@localhost:3306/databaseOr use npx without installing:
npx @neverinfamous/mysql-mcp --transport stdio --mysql mysql://user:password@localhost:3306/databaseDocker
docker run -i --rm writenotenow/mysql-mcp:latest \
--transport stdio \
--mysql mysql://user:password@host.docker.internal:3306/databaseFrom Source
git clone https://github.com/neverinfamous/mysql-mcp.git
cd mysql-mcp
npm install
npm run build
node dist/cli.js --transport stdio --mysql mysql://user:password@localhost:3306/databaseCode Mode: Maximum Efficiency
Code Mode (mysql_execute_code) dramatically reduces token usage (70–90%) and is included by default in all presets.
Code executes in a worker-thread sandbox — a separate V8 isolate with its own memory space. All mysql.* API calls are forwarded to the main thread via a MessagePort-based RPC bridge, where the actual database operations execute. This provides:
V8 code generation restrictions —
eval()andFunction()construction from strings disabled at the engine level viacodeGeneration: { strings: false, wasm: false }Frozen prototypes — all built-in prototypes frozen inside the vm context to prevent dynamic constructor chain escapes
18 blocked patterns — static regex rules blocking
require(),process,eval(),Reflect.*,Symbol.*,new Proxy(), and filesystem/network accessRPC allowlist — host-side validation prevents workers from invoking unauthorized API methods
Egress boundary enforcement — result serialization aborted mid-flight when exceeding configurable limit (default 100KB)
Readonly enforcement — when
readonly: true, write methods return structured errors instead of executingHard timeouts — worker termination if execution exceeds the configured limit
Full API access — all 25 tool groups are available via
mysql.*(e.g.,mysql.core.readQuery(),mysql.json.extract())
Set CODEMODE_ISOLATION=vm to fall back to the in-process vm module sandbox if needed.
⚡ Code Mode Only (Maximum Token Savings)
If you control your own setup, you can run with only Code Mode enabled — a single tool that provides access to all 224 tools' worth of capability through the mysql.* API:
{
"mcpServers": {
"mysql-mcp": {
"command": "node",
"args": [
"/path/to/mysql-mcp/dist/cli.js",
"--transport",
"stdio",
"--tool-filter",
"codemode"
],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_PORT": "3306",
"MYSQL_USER": "your_user",
"MYSQL_PASSWORD": "your_password",
"MYSQL_DATABASE": "your_database"
}
}
}
}This exposes just mysql_execute_code. The agent writes JavaScript against the typed mysql.* SDK — composing queries, chaining operations across all 25 tool groups, and returning exactly the data it needs — in one execution. This mirrors the Code Mode pattern pioneered by Cloudflare for their entire API: fixed token cost regardless of how many capabilities exist.
Maximize Token Savings: Instruct your AI agent to prefer Code Mode over individual tool calls:
"When using mysql-mcp, prefer mysql_execute_code (Code Mode) for multi-step database operations to minimize token usage."
For maximum savings, use --tool-filter codemode to run with Code Mode as your only tool. See the Code Mode wiki for full API documentation.
🌐 HTTP/SSE Transport (Remote Access)
For remote access, web-based clients, or HTTP-compatible MCP hosts, use the HTTP transport:
node dist/cli.js \
--transport http \
--port 3000 \
--mysql "mysql://user:pass@localhost:3306/db"Docker:
docker run --rm -p 3000:3000 \
-e MYSQL_URL=mysql://user:pass@host:3306/db \
writenotenow/mysql-mcp:latest \
--transport http --port 3000The server supports two MCP transport protocols simultaneously, enabling both modern and legacy clients to connect:
Streamable HTTP (Recommended)
Modern protocol (MCP 2025-03-26) — single endpoint, session-based:
Method | Endpoint | Purpose |
|
| JSON-RPC requests (initialize, tools/list, etc.) |
|
| SSE stream for server notifications |
|
| Session termination |
Sessions are managed via the `Mcp-Session-Id header.
Stateless Mode
For serverless/stateless deployments where sessions are not needed:
node dist/cli.js --transport http --port 3000 --stateless --mysql "mysql://..."In stateless mode: GET /mcp returns 405, DELETE /mcp returns 204, /sse and /messages return 404. Each POST /mcp creates a fresh transport.
Legacy SSE (Backward Compatibility)
Legacy protocol (MCP 2024-11-05) — for clients like Python mcp.client.sse:
Method | Endpoint | Purpose |
|
| Opens SSE stream, returns |
|
| Send JSON-RPC messages to the session |
Utility Endpoints
Method | Endpoint | Purpose |
|
| Health check (bypasses rate limiting, always available for monitoring) |
🔐 Authentication
mysql-mcp supports two authentication mechanisms for HTTP transport:
Simple Bearer Token (--auth-token)
Lightweight authentication for development or single-tenant deployments:
node dist/cli.js --transport http --port 3000 --auth-token my-secret --mysql "mysql://..."
# Or via environment variable
export MCP_AUTH_TOKEN=my-secret
node dist/cli.js --transport http --port 3000 --mysql "mysql://..."Clients must include Authorization: Bearer my-secret on all requests. /health and / are exempt. Unauthenticated requests receive 401 with WWW-Authenticate: Bearer headers per RFC 6750.
OAuth 2.1 (Enterprise)
Full OAuth 2.1 with RFC 9728/8414 compliance for production multi-tenant deployments:
node dist/cli.js \
--transport http \
--port 3000 \
--mysql "mysql://user:pass@localhost:3306/db" \
--oauth-enabled \
--oauth-issuer http://localhost:8080/realms/mysql-mcp \
--oauth-audience mysql-mcp-clientAdditional flags:
--oauth-jwks-uri <url>(auto-discovered if omitted),--oauth-clock-tolerance <seconds>(default: 60).
OAuth Scopes
Access control is managed through OAuth scopes:
Scope | Access Level |
| Read-only queries (SELECT, EXPLAIN) |
| Read + write operations |
| Full administrative access |
| Grants all access |
| Access to specific database |
| Access to specific schema |
| Access to specific table |
RFC Compliance
This implementation follows:
RFC 9728 — OAuth 2.1 Protected Resource Metadata
RFC 8414 — OAuth 2.1 Authorization Server Metadata
RFC 7591 — OAuth 2.1 Dynamic Client Registration
The server exposes metadata at /.well-known/oauth-protected-resource.
Note for Keycloak users: Add an Audience mapper to your client (Client → Client scopes → dedicated scope → Add mapper → Audience) to include the correct
audclaim in tokens.
Per-tool scope enforcement: Scopes are enforced at the tool level — each tool group maps to a required scope (read, write, or admin). When OAuth is enabled, every tool invocation checks the calling token's scopes before execution. When OAuth is not configured, scope checks are skipped entirely.
HTTP without authentication: When using --transport http without enabling OAuth or --auth-token, all clients have full unrestricted access. Always enable authentication for production HTTP deployments. See SECURITY.md for details.
Cursor IDE / Claude Desktop
{
"mcpServers": {
"mysql-mcp": {
"command": "node",
"args": [
"C:/path/to/mysql-mcp/dist/cli.js",
"--transport",
"stdio",
"--mysql",
"mysql://user:password@localhost:3306/database"
]
}
}
}Using Environment Variables (Recommended)
{
"mcpServers": {
"mysql-mcp": {
"command": "node",
"args": ["C:/path/to/mysql-mcp/dist/cli.js", "--transport", "stdio"],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_PORT": "3306",
"MYSQL_USER": "your_user",
"MYSQL_PASSWORD": "your_password",
"MYSQL_DATABASE": "your_database",
"MYSQL_XPORT": "33060"
}
}
}
}Note:
MYSQL_XPORT(X Protocol port) defaults to33060if omitted. Only needed formysqlsh_import_jsonanddocstoretools. Set to your MySQL Router X Protocol port (e.g.,6448) when using InnoDB Cluster.
📖 See the Configuration Wiki for more configuration options.
🔗 Database Connection Scenarios
Scenario | Host to Use | Example Connection String |
MySQL on host machine |
|
|
MySQL in Docker | Container name or network |
|
Remote/Cloud MySQL | Hostname or IP |
|
MySQL on Host Machine
If MySQL is installed directly on your computer (via installer, Homebrew, etc.):
"--mysql", "mysql://user:password@host.docker.internal:3306/database"MySQL in Another Docker Container
Add both containers to the same Docker network, then use the container name:
Create a network and run MySQL:
docker network create mynet
docker run -d --name mysql-db --network mynet -e MYSQL_ROOT_PASSWORD=pass mysql:8Run MCP server on the same network:
docker run -i --rm --network mynet writenotenow/mysql-mcp:latest \
--transport stdio --mysql mysql://root:pass@mysql-db:3306/mysqlRemote/Cloud MySQL (RDS, Cloud SQL, etc.)
Use the remote hostname directly:
"--mysql", "mysql://user:password@your-instance.region.rds.amazonaws.com:3306/database"Provider | Example Hostname |
AWS RDS |
|
Google Cloud SQL |
|
Azure MySQL |
|
PlanetScale |
|
DigitalOcean |
|
Tip: For remote connections, ensure your MySQL server allows connections from Docker's IP range and that firewalls/security groups permit port 3306.
🛠️ Tool Filtering
AI IDEs like Cursor have tool limits (typically 40-50 tools). With 224 tools available, you MUST use tool filtering to stay within your IDE's limits. All shortcuts and tool groups include Code Mode (mysql_execute_code) by default for token-efficient operations. To exclude it, add -codemode to your filter: --tool-filter core,json,-codemode
What Can You Filter?
The --tool-filter argument accepts shortcuts, groups, or tool names — mix and match freely:
Filter Pattern | Example | Tools | Description |
Shortcut only |
| 39 | Use a predefined bundle |
Groups only |
| 33 | Combine individual groups |
Shortcut + Group |
| 51 | Extend a shortcut |
Shortcut - Tool |
| 38 | Remove specific tools |
Shortcuts (Predefined Bundles)
Shortcut | Tools | Use Case | What's Included |
| 39 | Standard Package | core, json, transactions, text, codemode |
| 16 | Minimal footprint | core, transactions, codemode |
| 63 | Power Developer | core, schema, performance, stats, fulltext, transactions, codemode |
| 46 | AI Data Analyst | core, json, docstore, text, fulltext, codemode |
| 59 | AI Spatial Analyst | core, spatial, stats, performance, transactions, codemode |
| 39 | DBA Monitoring | core, monitoring, performance, sysschema, optimization, codemode |
| 38 | DBA Management | core, admin, backup, replication, partitioning, events, codemode |
| 33 | DBA Security | core, security, roles, transactions, codemode |
| 32 | DBA Schema | core, schema, introspection, migration, codemode |
| 50 | Base Ops | core, json, transactions, text, schema, codemode |
| 53 | Advanced Features | docstore, spatial, stats, fulltext, events, codemode |
| 41 | External Tools | cluster, proxysql, router, shell, codemode |
Tool Groups (27 Available)
Note: Tool counts below do NOT include Code Mode (
mysql_execute_code), which is automatically added to all groups.
Group | Tools | Description |
| 1 | Code Mode (sandboxed code execution) 🌟 Recommended |
| 8 | Read/write queries, tables, indexes |
| 7 | BEGIN, COMMIT, ROLLBACK, savepoints |
| 17 | JSON functions, merge, diff, stats |
| 6 | REGEXP, LIKE, SOUNDEX |
| 5 | Natural language & boolean search |
| 11 | EXPLAIN, query analysis, anomaly detection |
| 4 | Index hints, recommendations |
| 7 | OPTIMIZE, ANALYZE, CHECK, insights |
| 7 | PROCESSLIST, status variables |
| 7 | Export, import, mysqldump, audit backups |
| 5 | Master/slave, binlog |
| 4 | Partition management |
| 11 | Views, procedures, triggers, constraints |
| 6 | Dependency graphs, cascade simulation, snapshots |
| 6 | Schema versioning, apply, rollback, history |
| 10 | MySQL Shell utilities |
| 6 | Event Scheduler management |
| 8 | sys schema diagnostics |
| 20 | Statistical analysis, window functions, sampling |
| 12 | Spatial/GIS operations |
| 9 | Audit, SSL, encryption, masking |
| 8 | MySQL 8.0 role management |
| 9 | Document Store collections |
| 10 | Group Replication, InnoDB Cluster |
| 11 | ProxySQL management |
| 9 | MySQL Router REST API |
Quick Start: Recommended IDE Configuration
Add one of these configurations to your IDE's MCP settings file (e.g., cline_mcp_settings.json, .cursorrules, or equivalent):
Option 1: Code Mode (Maximum Token Savings, 🌟 Recommended)
Best for: General MySQL database work with an AI agent. Exposes a single tool (mysql_execute_code) that provides access to all 224 tools via a JavaScript sandbox.
{
"mcpServers": {
"mysql-mcp": {
"command": "node",
"args": [
"/path/to/mysql-mcp/dist/cli.js",
"--transport",
"stdio",
"--tool-filter",
"codemode"
],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_PORT": "3306",
"MYSQL_USER": "your_username",
"MYSQL_PASSWORD": "your_password",
"MYSQL_DATABASE": "your_database"
}
}
}
}Option 2: Cluster (11 Tools for InnoDB Cluster Monitoring)
Best for: Monitoring InnoDB Cluster, Group Replication status, and cluster topology.
⚠️ Prerequisites:
InnoDB Cluster must be configured and running with Group Replication enabled
Connect to a cluster node directly (e.g.,
localhost:3307) — NOT a standalone MySQL instanceUse
cluster_adminorrootuser with appropriate privilegesSee MySQL Ecosystem Setup Guide for cluster setup instructions
{
"mcpServers": {
"mysql-mcp-cluster": {
"command": "node",
"args": [
"/path/to/mysql-mcp/dist/cli.js",
"--transport",
"stdio",
"--tool-filter",
"cluster"
],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_PORT": "3307",
"MYSQL_USER": "cluster_admin",
"MYSQL_PASSWORD": "cluster_password",
"MYSQL_DATABASE": "mysql"
}
}
}
}Option 3: Ecosystem (41 Tools for InnoDB Cluster Deployments)
Best for: MySQL Router, ProxySQL, MySQL Shell, and InnoDB Cluster deployments.
⚠️ Prerequisites:
InnoDB Cluster with MySQL Router requires the cluster to be running for Router REST API authentication (uses
metadata_cachebackend)Router REST API uses HTTPS with self-signed certificates by default — set
MYSQL_ROUTER_INSECURE=trueto bypass certificate verificationX Protocol: InnoDB Cluster includes the MySQL X Plugin by default. Set
MYSQL_XPORTto the Router's X Protocol port (e.g.,6448) formysqlsh_import_jsonanddocstoretoolsSee MySQL Ecosystem Setup Guide for detailed instructions
{
"mcpServers": {
"mysql-mcp-ecosystem": {
"command": "node",
"args": [
"/path/to/mysql-mcp/dist/cli.js",
"--transport",
"stdio",
"--tool-filter",
"ecosystem"
],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_PORT": "3307",
"MYSQL_XPORT": "6448",
"MYSQL_USER": "cluster_admin",
"MYSQL_PASSWORD": "cluster_password",
"MYSQL_DATABASE": "testdb",
"MYSQL_ROUTER_URL": "https://localhost:8443",
"MYSQL_ROUTER_USER": "rest_api",
"MYSQL_ROUTER_PASSWORD": "router_password",
"MYSQL_ROUTER_INSECURE": "true",
"PROXYSQL_HOST": "localhost",
"PROXYSQL_PORT": "6032",
"PROXYSQL_USER": "radmin",
"PROXYSQL_PASSWORD": "radmin",
"MYSQLSH_PATH": "/usr/local/bin/mysqlsh"
}
}
}
}Customization Notes:
Replace
/path/to/mysql-mcp/with your actual installation pathUpdate credentials with your actual values
For Windows: Use forward slashes (e.g.,
C:/mysql-mcp/dist/cli.js) or escape backslashesFor Windows MySQL Shell:
"MYSQLSH_PATH": "C:\\Program Files\\MySQL\\MySQL Shell 9.5\\bin\\mysqlsh.exe"Router Authentication: Router REST API authenticates against the InnoDB Cluster metadata. The cluster must be running for authentication to work.
Cluster Resource: The
mysql://clusterresource is only available when connected to an InnoDB Cluster node
Legacy Syntax (still supported):
If you start with a negative filter (e.g., -ecosystem), it assumes you want to start with all tools enabled and then subtract.
Syntax Reference
Prefix | Target | Example | Effect |
(none) | Shortcut |
| Whitelist Mode: Enable ONLY this shortcut |
(none) | Group |
| Whitelist Mode: Enable ONLY this group |
(none) | Tool |
| Whitelist Mode: Enable ONLY this tool |
| Group |
| Add tools from this group to current set |
| Group |
| Remove tools in this group from current set |
| Tool |
| Add one specific tool |
| Tool |
| Remove one specific tool |
Custom Tool Selection
You can list individual tool names (without + prefix) to create a fully custom whitelist — only the tools you specify will be enabled:
# Enable exactly 3 tools (whitelist mode)
--tool-filter "mysql_read_query,mysql_write_query,mysql_list_tables"
# Mix tools from different groups
--tool-filter "mysql_read_query,mysql_explain,mysql_json_extract"
# Combine with a shortcut or group
--tool-filter "starter,+mysql_spatial_distance,+mysql_json_diff"This is useful for scripted or automated clients that need a minimal, precise set of capabilities.
📖 See the Tool Filtering Wiki for advanced examples.
🤖 AI-Powered Prompts
This server includes 19 intelligent prompts for guided workflows:
Prompt | Description |
| Construct SQL queries with security best practices |
| Design table schemas with indexes and relationships |
| Analyze slow queries with optimization recommendations |
| Generate migration scripts with rollback options |
| Comprehensive database health assessment |
| Enterprise backup planning with RTO/RPO |
| Index analysis and optimization workflow |
| MySQL Router configuration guide |
| ProxySQL configuration guide |
| Replication setup guide |
| MySQL Shell usage guide |
| Complete tool index with categories |
| Quick query execution shortcut |
| Quick schema exploration |
| Event Scheduler setup guide |
| sys schema usage and diagnostics |
| Spatial/GIS data setup guide |
| InnoDB Cluster/Group Replication guide |
| Document Store / X DevAPI guide |
📊 Resources
This server exposes 18 resources for database observability:
Resource | Description |
| Full database schema |
| Table listing with metadata |
| Server configuration variables |
| Server status metrics |
| Active connections and queries |
| Connection pool statistics |
| Server version, features, tool categories |
| Comprehensive health status |
| Query performance metrics |
| Index usage and statistics |
| Replication status and lag |
| InnoDB buffer pool and engine metrics |
| Event Scheduler status and scheduled events |
| sys schema diagnostics summary |
| InnoDB lock contention detection |
| Group Replication/InnoDB Cluster status |
| Spatial columns and indexes |
| Document Store collections |
🔧 Advanced Configuration
For specialized setups, see these Wiki pages:
Topic | Description |
Configure Router REST API access for InnoDB Cluster | |
Configure ProxySQL admin interface access | |
Configure MySQL Shell for dump/load operations |
⚡ Performance Tuning
Schema metadata is cached to reduce repeated queries during tool/resource invocations.
Variable | Default | Description |
|
| Cache TTL for schema metadata (milliseconds) |
|
| Log verbosity: |
|
| Maximum Code Mode result payload in bytes (default 100KB, cap 50MB) |
Tip: Lower
METADATA_CACHE_TTL_MSfor development (e.g.,5000), or increase it for production with stable schemas (e.g.,300000= 5 min).
Built-in payload optimization: Many tools support optional
summary: truefor condensed responses andlimitparameters to cap result sizes. These are particularly useful for cluster status, monitoring, and sys schema tools where full responses can be large. See the code map for per-tool details.
CLI Options
Option | Environment Variable | Description |
|
| Host to bind HTTP transport to (default: localhost) |
|
| Simple bearer token for HTTP authentication |
| — | Enable stateless HTTP mode (no sessions, no SSE) |
|
| Trust X-Forwarded-For for client IP |
|
| Log level: debug, info, warn, error |
|
| Enable OAuth 2.1 authentication |
|
| Authorization server URL |
|
| Expected token audience |
|
| JWKS URI (auto-discovered) |
|
| Clock tolerance in seconds |
Priority: When both
--auth-tokenand--oauth-enabledare set, OAuth 2.1 takes precedence. If neither is configured, the server warns and runs without authentication.
Scopes
Scope | Access Level |
| Read-only queries |
| Read + write operations |
| Administrative operations |
| All operations |
📖 See the OAuth Wiki for Keycloak setup and detailed configuration.
Development
See From Source above for setup. After cloning:
npm run lint && npm run typecheck # Run checks
npm test # Run testsMCP Inspector
Use MCP Inspector to visually test and debug mysql-mcp:
Build the server first:
npm run buildLaunch Inspector with mysql-mcp:
npx @modelcontextprotocol/inspector node dist/cli.js \
--transport stdio \
--mysql mysql://user:password@localhost:3306/databaseOpen http://localhost:6274 to browse all 224 tools, 18 resources, and 19 prompts interactively.
CLI mode for scripting:
List all tools:
npx @modelcontextprotocol/inspector --cli node dist/cli.js \
--transport stdio --mysql mysql://... \
--method tools/listCall a specific tool:
npx @modelcontextprotocol/inspector --cli node dist/cli.js \
--transport stdio --mysql mysql://... \
--method tools/call --tool-name mysql_list_tables📖 See the MCP Inspector Wiki for detailed usage.
Unit Testing
The project maintains high test coverage (~90%) using Vitest.
npm testRun coverage report:
npm run test:coverageTest Infrastructure:
Centralized mock factories in
src/__tests__/mocks/All 111 test files use shared mocks for consistency
Tests run without database connection (fully mocked)
Benchmarking
The project includes a performance benchmarking suite to track the efficiency of critical paths like Code Mode sandbox initialization, tool filtering, and URI routing.
npm run benchContributing
Contributions are welcome! Please read our Contributing Guidelines before submitting a pull request.
Security
For security concerns, please see our Security Policy.
⚠️ Never commit credentials - Store secrets in
.env(gitignored)
License
This project is licensed under the MIT License - see the LICENSE file for details.
Code of Conduct
Please read our Code of Conduct before participating in this project.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Appeared in Searches
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/neverinfamous/mysql-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server