mcp-opengauss-server
Verified Safeby 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
npm startEnvironment 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
mcp-openapi-server
A Model Context Protocol (MCP) server that exposes OpenAPI endpoints as MCP tools, along with optional support for MCP prompts and resources, enabling Large Language Models to interact with REST APIs.
opensearch-mcp-server-py
Enables AI assistants and LLMs to interact with OpenSearch clusters by providing a standardized Model Context Protocol (MCP) interface through built-in and dynamic tools.
boilerplate-mcp-server
Provides a production-ready foundation for developing custom Model Context Protocol (MCP) servers in TypeScript to connect AI assistants with external APIs and data sources, exemplified by an IP geolocation tool.
mcp-server-playground
A playground and reference implementation for a Model Context Protocol (MCP) server, featuring streamable HTTP transport, OAuth proxy for third-party authorization servers like Auth0, and stateful session management.