Skip to content
VS Code

tokenlite mysql mcp for VS Code

io.github.andezdev/tokenlite-mysql-mcp

A secure, efficient, and intelligent MySQL server for the Model Context Protocol

client:VS Code transport:stdio runtime:npm

Install tokenlite mysql mcp in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "db-host",
      "description": "DB_HOST",
      "password": true
    },
    {
      "type": "promptString",
      "id": "db-port",
      "description": "DB_PORT",
      "password": true
    },
    {
      "type": "promptString",
      "id": "db-user",
      "description": "DB_USER",
      "password": true
    },
    {
      "type": "promptString",
      "id": "db-password",
      "description": "DB_PASSWORD",
      "password": true
    },
    {
      "type": "promptString",
      "id": "db-name",
      "description": "DB_NAME",
      "password": true
    },
    {
      "type": "promptString",
      "id": "mcp-explain-max-scan-rows",
      "description": "MCP_EXPLAIN_MAX_SCAN_ROWS",
      "password": true
    },
    {
      "type": "promptString",
      "id": "mcp-query-row-limit",
      "description": "MCP_QUERY_ROW_LIMIT",
      "password": true
    },
    {
      "type": "promptString",
      "id": "mcp-safe-query-max-rows",
      "description": "MCP_SAFE_QUERY_MAX_ROWS",
      "password": true
    },
    {
      "type": "promptString",
      "id": "mcp-safe-query-enable-blocking",
      "description": "MCP_SAFE_QUERY_ENABLE_BLOCKING",
      "password": true
    },
    {
      "type": "promptString",
      "id": "mcp-metadata-path",
      "description": "MCP_METADATA_PATH",
      "password": true
    },
    {
      "type": "promptString",
      "id": "mcp-templates-path",
      "description": "MCP_TEMPLATES_PATH",
      "password": true
    },
    {
      "type": "promptString",
      "id": "tool-prefix",
      "description": "TOOL_PREFIX",
      "password": true
    },
    {
      "type": "promptString",
      "id": "mcp-rate-limit-rpm",
      "description": "MCP_RATE_LIMIT_RPM",
      "password": true
    },
    {
      "type": "promptString",
      "id": "mysql-query-timeout",
      "description": "MYSQL_QUERY_TIMEOUT",
      "password": true
    },
    {
      "type": "promptString",
      "id": "mysql-connection-limit",
      "description": "MYSQL_CONNECTION_LIMIT",
      "password": true
    },
    {
      "type": "promptString",
      "id": "mysql-connect-timeout",
      "description": "MYSQL_CONNECT_TIMEOUT",
      "password": true
    },
    {
      "type": "promptString",
      "id": "mysql-retry-attempts",
      "description": "MYSQL_RETRY_ATTEMPTS",
      "password": true
    },
    {
      "type": "promptString",
      "id": "mysql-retry-delay-ms",
      "description": "MYSQL_RETRY_DELAY_MS",
      "password": true
    },
    {
      "type": "promptString",
      "id": "mysql-queue-limit",
      "description": "MYSQL_QUEUE_LIMIT",
      "password": true
    },
    {
      "type": "promptString",
      "id": "mcp-ddl-cache-ttl",
      "description": "MCP_DDL_CACHE_TTL",
      "password": true
    },
    {
      "type": "promptString",
      "id": "mcp-log-level",
      "description": "MCP_LOG_LEVEL",
      "password": true
    },
    {
      "type": "promptString",
      "id": "allow-insert-operation",
      "description": "ALLOW_INSERT_OPERATION",
      "password": true
    },
    {
      "type": "promptString",
      "id": "allow-update-operation",
      "description": "ALLOW_UPDATE_OPERATION",
      "password": true
    },
    {
      "type": "promptString",
      "id": "allow-delete-operation",
      "description": "ALLOW_DELETE_OPERATION",
      "password": true
    },
    {
      "type": "promptString",
      "id": "allow-ddl-operation",
      "description": "ALLOW_DDL_OPERATION",
      "password": true
    },
    {
      "type": "promptString",
      "id": "db-ssl",
      "description": "DB_SSL",
      "password": true
    },
    {
      "type": "promptString",
      "id": "db-ssl-reject-unauthorized",
      "description": "DB_SSL_REJECT_UNAUTHORIZED",
      "password": true
    }
  ],
  "servers": {
    "tokenlite-mysql-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@andezdev/tokenlite-mysql-mcp"
      ],
      "env": {
        "DB_HOST": "${input:db-host}",
        "DB_PORT": "${input:db-port}",
        "DB_USER": "${input:db-user}",
        "DB_PASSWORD": "${input:db-password}",
        "DB_NAME": "${input:db-name}",
        "MCP_EXPLAIN_MAX_SCAN_ROWS": "${input:mcp-explain-max-scan-rows}",
        "MCP_QUERY_ROW_LIMIT": "${input:mcp-query-row-limit}",
        "MCP_SAFE_QUERY_MAX_ROWS": "${input:mcp-safe-query-max-rows}",
        "MCP_SAFE_QUERY_ENABLE_BLOCKING": "${input:mcp-safe-query-enable-blocking}",
        "MCP_METADATA_PATH": "${input:mcp-metadata-path}",
        "MCP_TEMPLATES_PATH": "${input:mcp-templates-path}",
        "TOOL_PREFIX": "${input:tool-prefix}",
        "MCP_RATE_LIMIT_RPM": "${input:mcp-rate-limit-rpm}",
        "MYSQL_QUERY_TIMEOUT": "${input:mysql-query-timeout}",
        "MYSQL_CONNECTION_LIMIT": "${input:mysql-connection-limit}",
        "MYSQL_CONNECT_TIMEOUT": "${input:mysql-connect-timeout}",
        "MYSQL_RETRY_ATTEMPTS": "${input:mysql-retry-attempts}",
        "MYSQL_RETRY_DELAY_MS": "${input:mysql-retry-delay-ms}",
        "MYSQL_QUEUE_LIMIT": "${input:mysql-queue-limit}",
        "MCP_DDL_CACHE_TTL": "${input:mcp-ddl-cache-ttl}",
        "MCP_LOG_LEVEL": "${input:mcp-log-level}",
        "ALLOW_INSERT_OPERATION": "${input:allow-insert-operation}",
        "ALLOW_UPDATE_OPERATION": "${input:allow-update-operation}",
        "ALLOW_DELETE_OPERATION": "${input:allow-delete-operation}",
        "ALLOW_DDL_OPERATION": "${input:allow-ddl-operation}",
        "DB_SSL": "${input:db-ssl}",
        "DB_SSL_REJECT_UNAUTHORIZED": "${input:db-ssl-reject-unauthorized}"
      }
    }
  }
}

VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs

tokenlite mysql mcp in other clients