# Smithery configuration file: https://smithery.ai/docs/config#smitheryyaml
startCommand:
type: stdio
configSchema:
# JSON Schema defining the configuration options for the MCP.
type: object
required:
- mysqlHost
- mysqlUser
properties:
mysqlHost:
type: string
description: MySQL server hostname
mysqlPort:
type: number
default: 3306
description: MySQL server port
mysqlUser:
type: string
description: MySQL username
mysqlPassword:
type: string
description: MySQL password (optional)
mysqlDatabase:
type: string
description: Default database (optional)
mysqlConnectionLimit:
type: number
default: 10
description: Maximum number of connections in the pool (optional)
mysqlQueueLimit:
type: number
default: 0
description: Maximum number of connection requests to queue (optional)
mysqlConnectTimeout:
type: number
default: 10000
description: Connection timeout in milliseconds (optional)
mysqlIdleTimeout:
type: number
description: How long a connection can be idle before being released in milliseconds (optional)
mysqlMaxIdle:
type: number
description: Maximum number of idle connections to keep in the pool (optional)
commandFunction:
# A JS function that produces the CLI command based on the given config to start the MCP on stdio.
|-
(config) => ({
command: 'node',
args: ['./build/index.js'],
env: {
MYSQL_HOST: config.mysqlHost,
MYSQL_PORT: config.mysqlPort ? config.mysqlPort.toString() : '3306',
MYSQL_USER: config.mysqlUser,
MYSQL_PASSWORD: config.mysqlPassword || '',
MYSQL_DATABASE: config.mysqlDatabase || '',
MYSQL_CONNECTION_LIMIT: config.mysqlConnectionLimit ? config.mysqlConnectionLimit.toString() : '',
MYSQL_QUEUE_LIMIT: config.mysqlQueueLimit ? config.mysqlQueueLimit.toString() : '',
MYSQL_CONNECT_TIMEOUT: config.mysqlConnectTimeout ? config.mysqlConnectTimeout.toString() : '',
MYSQL_IDLE_TIMEOUT: config.mysqlIdleTimeout ? config.mysqlIdleTimeout.toString() : '',
MYSQL_MAX_IDLE: config.mysqlMaxIdle ? config.mysqlMaxIdle.toString() : ''
}
})
exampleConfig:
mysqlHost: 127.0.0.1
mysqlPort: 3306
mysqlUser: test_user
mysqlPassword: test_password
mysqlDatabase: test_db
mysqlConnectionLimit: 10
mysqlQueueLimit: 0
mysqlConnectTimeout: 10000
mysqlIdleTimeout: 60000
mysqlMaxIdle: 10