MCP Server
MCP
MySQL MCP
MCP server for one MySQL database: schema, read-only queries and guarded writes.
Install
npx -y [email protected]
Configuration Example
{
"remotes": [],
"packages": [
{
"registryType": "npm",
"registryBaseUrl": "https://registry.npmjs.org",
"identifier": "mcp-mysql-client",
"version": "1.0.0",
"transport": {
"type": "stdio"
},
"environmentVariables": [
{
"description": "Database host.",
"default": "127.0.0.1",
"name": "MYSQL_HOST"
},
{
"description": "Database port.",
"default": "3306",
"name": "MYSQL_PORT"
},
{
"description": "MySQL user. Use one with the least privileges the task needs, never root.",
"isRequired": true,
"name": "MYSQL_USER"
},
{
"description": "Password for that user. Treat it as a secret; MYSQL_PASS_FILE reads it from a file instead.",
"isSecret": true,
"name": "MYSQL_PASS"
},
{
"description": "The one database this server is bound to. No tool can leave it.",
"isRequired": true,
"name": "MYSQL_DB"
},
{
"description": "Require a TLS connection to the server.",
"default": "false",
"name": "MYSQL_SSL"
},
{
"description": "Path to the CA bundle verifying the server certificate; implies MYSQL_SSL.",
"name": "MYSQL_SSL_CA"
},
{
"description": "Allow INSERT statements through the execute tool.",
"default": "false",
"name": "ALLOW_INSERT_OPERATION"
},
{
"description": "Allow UPDATE statements through the execute tool.",
"default": "false",
"name": "ALLOW_UPDATE_OPERATION"
},
{
"description": "Allow DELETE statements through the execute tool.",
"default": "false",
"name": "ALLOW_DELETE_OPERATION"
},
{
"description": "Row cap for one read; the result is marked truncated when it is hit.",
"default": "1000",
"name": "MYSQL_MAX_ROWS"
},
{
"description": "Statement timeout in milliseconds; the connection is dropped on expiry.",
"default": "30000",
"name": "MYSQL_TIMEOUT_MS"
}
]
}
]
}
mcp
model-context-protocol
npm
By
Comments
Sign in to leave a comment