Back to Home
lianekai icon

mcp-opengauss-server

Verified Safe

by lianekai

Overview

Provides a secure, read-only Model Context Protocol (MCP) server for openGauss database operations, intended for integration with AI clients like Claude Desktop.

Installation

Run Command
npm start

Environment Variables

  • OPENGAUSS_HOST
  • OPENGAUSS_PORT
  • OPENGAUSS_DATABASE
  • OPENGAUSS_USER
  • OPENGAUSS_PASSWORD
  • OPENGAUSS_SCHEMA
  • QUERY_TIMEOUT
  • RATE_LIMIT_MAX
  • CONNECTION_POOL_MAX
  • CONNECTION_POOL_MIN
  • LOG_LEVEL
  • NODE_ENV

Security Notes

The server, after applying the recommended security fixes (indicated by the `db.fixed.ts` and `validation.fixed.ts` files and outlined in the `README_SECURITY_FIXES.md`), demonstrates strong security practices. It effectively addresses critical SQL injection vulnerabilities through robust identifier normalization, parameterization (using a connection pool), and comprehensive read-only query validation. The enhanced validation logic includes checks for multiple statements, dangerous functions (e.g., file system access), subquery write operations, NULL byte injections, and input length limits. Connection pooling, query timeouts, and a rate limiter are implemented to prevent resource exhaustion and Denial-of-Service attacks. Logging is structured with `pino` and redacts sensitive information, mitigating information leakage. The project's security rating is reported to have improved from 68/100 to 90/100 post-fix, and it is deemed 'production-ready'.

Similar Servers

Stats

Interest Score0
Security Score9
Cost ClassMedium
Avg Tokens200
Stars0
Forks0
Last Update2025-12-25

Tags

MCPopenGaussdatabaseread-onlysecurity