MySQLMCP
by liyq0307
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DEBUG | No | 启用调试模式,默认值: false | |
| NODE_ENV | No | Node环境 (development, production, test),默认值: development | |
| CACHE_TTL | No | 缓存过期时间(秒),默认值: 300 | |
| LOG_LEVEL | No | 日志级别 (debug, info, warn, error),默认值: info | |
| MYSQL_SSL | No | 是否启用SSL连接,默认值: false | |
| BATCH_SIZE | No | 批量操作大小,默认值: 1000 | |
| MYSQL_HOST | Yes | 数据库主机地址,默认值: localhost | |
| MYSQL_PORT | No | 数据库端口,默认值: 3306 | |
| MYSQL_USER | Yes | 数据库用户名,默认值: root | |
| SERVER_NAME | No | 服务器名称,默认值: MySQL-MCP-Server | |
| MCP_TRANSPORT | No | MCP传输协议,默认值: stdio | |
| MYSQL_CHARSET | No | 数据库字符集,默认值: utf8mb4 | |
| QUERY_TIMEOUT | No | 查询执行超时时间(毫秒),默认值: 30000 | |
| MEMORY_AUTO_GC | No | 启用自动垃圾回收,默认值: true | |
| MYSQL_DATABASE | Yes | 数据库名称,默认值: test | |
| MYSQL_PASSWORD | Yes | 数据库密码,默认值: "" | |
| MYSQL_TIMEZONE | No | 数据库时区,默认值: +00:00 | |
| RATE_LIMIT_MAX | No | 时间窗口内最大请求数,默认值: 100 | |
| SERVER_VERSION | No | 服务器版本,默认值: 1.0.0 | |
| INDEX_CACHE_SIZE | No | 索引信息缓存大小,默认值: 64 | |
| RATE_LIMIT_WINDOW | No | 频率限制时间窗口(毫秒),默认值: 60000 | |
| SCHEMA_CACHE_SIZE | No | 表结构缓存大小,默认值: 128 | |
| MONITORING_ENABLED | No | 启用性能监控,默认值: true | |
| MYSQL_IDLE_TIMEOUT | No | 空闲连接超时时间(毫秒),默认值: 300000 | |
| RATE_LIMIT_ENABLED | No | 启用频率限制,默认值: true | |
| MEMORY_HISTORY_SIZE | No | 内存历史记录大小,默认值: 100 | |
| MYSQL_CONNECT_TIMEOUT | No | 连接超时时间(毫秒),默认值: 60000 | |
| MYSQL_CONNECTION_LIMIT | No | 连接池最大连接数,默认值: 20 | |
| SECURITY_QUERY_TIMEOUT | No | 查询执行超时时间(毫秒),默认值: 30000 | |
| MONITORING_HISTORY_SIZE | No | 指标历史记录大小,默认值: 1000 | |
| TABLE_EXISTS_CACHE_SIZE | No | 表存在性缓存大小,默认值: 64 | |
| SECURITY_MAX_RESULT_ROWS | No | 每次查询最大返回行数,默认值: 1000 | |
| MEMORY_MONITORING_ENABLED | No | 启用内存监控,默认值: true | |
| MEMORY_PRESSURE_THRESHOLD | No | 内存压力阈值(0-1),默认值: 0.8 | |
| SECURITY_MAX_INPUT_LENGTH | No | 最大输入长度(字符数),默认值: 1000 | |
| SECURITY_MAX_QUERY_LENGTH | No | 最大查询长度(字符数),默认值: 10000 | |
| MEMORY_MONITORING_INTERVAL | No | 内存监控间隔(毫秒),默认值: 30000 | |
| SYSTEM_MONITORING_INTERVAL | No | 系统监控间隔(毫秒),默认值: 30000 | |
| MEMORY_CACHE_CLEAR_THRESHOLD | No | 内存缓存清除阈值(0-1),默认值: 0.85 | |
| MONITORING_SNAPSHOT_INTERVAL | No | 性能快照间隔(毫秒),默认值: 30000 | |
| SECURITY_ALLOWED_QUERY_TYPES | No | 允许的查询类型(逗号分隔),默认值: SELECT,INSERT,UPDATE,DELETE,SHOW,DESCRIBE,EXPLAIN,CREATE,DROP,ALTER | |
| SECURITY_MAX_TABLE_NAME_LENGTH | No | 最大表名长度(字符数),默认值: 64 | |
| MONITORING_SLOW_QUERY_THRESHOLD | No | 慢查询阈值(毫秒),默认值: 1000 | |
| SECURITY_ENABLE_QUERY_TYPE_RESTRICTIONS | No | 启用查询类型限制,默认值: true |
Capabilities
Server capabilities have not been inspected yet.
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
No tools | |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
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/liyq0307/MySQLMCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server