Share MCP database tools for MYSQL and MSSQLSERVER,Make your development simpler

MYSQL

npm install -g @liangshanli/mcp-server-mysql

Create .cursor/mcp.json file in your project root:

{
  "mcpServers": {
    "mysql": {
      "command": "npx",
      "args": ["@liangshanli/mcp-server-mysql"],
      "env": {
        "MYSQL_HOST": "your_host",
        "MYSQL_PORT": "3306",
        "MYSQL_USER": "your_user",
        "MYSQL_PASSWORD": "your_password",
        "MYSQL_DATABASE": "your_database",
        "ALLOW_DDL": "false",
        "ALLOW_DROP": "false",
        "ALLOW_DELETE": "false"
      }
    }
  }
}

Link:@liangshanli/mcp-server-mysql - npm

MSSQLSERVER

npm install -g @liangshanli/mcp-server-mssqlserver

Create .cursor/mcp.json in your project root:

{
  "mcpServers": {
    "mssqlserver": {
      "command": "npx",
      "args": ["@liangshanli/mcp-server-mssqlserver"],
      "env": {
        "MSSQL_SERVER": "your_host",
        "MSSQL_PORT": "1433",
        "MSSQL_USER": "your_user",
        "MSSQL_PASSWORD": "your_password",
        "MSSQL_DATABASE": "your_database",
        "MSSQL_SCHEMA": "your_schema",
        "MSSQL_ENCRYPT": "false",
        "MSSQL_TRUST_SERVER_CERTIFICATE": "true",
        "ALLOW_DDL": "false",
        "ALLOW_DROP": "false",
        "ALLOW_DELETE": "false"
      }
    }
  }
}

Link:@liangshanli/mcp-server-mssqlserver - npm

AI can directly perform intelligent database analysis and operations through MCP connection

Core Benefits:

  1. Intelligent Database Operations

    • AI can execute SQL queries directly without manual code writing
    • Full DDL and DML operation support including table creation, structure modification, and data CRUD operations
    • Automatic schema prefixing for multi-tenant environments
  2. Data Analysis and Problem Diagnosis

    • AI can query database information in real-time to quickly identify data issues
    • Support for complex statistical queries and data analysis report generation
    • Through operation logging, AI can analyze performance bottlenecks and error causes
  3. Secure and Controllable Permission Management

    • Granular permission control ensuring AI only performs allowed operations
    • Environment variable configuration for different security levels across environments
    • Complete audit logging with records of all operations
  4. Enterprise-Grade Connection Management

    • Automatic connection pool management for stable and efficient AI operations
    • Health monitoring and automatic failure recovery
    • Support for encrypted connections and certificate validation
  5. Seamless Multi-Editor Integration

    • Support for mainstream editors like Cursor and VS Code
    • AI assistants can directly call database tools through MCP protocol
    • No additional configuration required, ready to use out of the box

Summary:
The core value of this tool lies in enabling AI to directly, securely, and efficiently interact with MSSQL databases, greatly enhancing AI’s capabilities in database analysis and operations, making complex data tasks simple and feasible.