opengauss-mcp
I open-sourced opengauss-mcp, an openGauss database tooling service built on Spring AI MCP Server.
Why Build This?
While exploring the MCP ecosystem recently, I noticed that “let the model compose SQL and execute it directly” easily conflates two questions: whether the model understands the schema, and whether the account should be allowed to perform the operation. Something running does not mean its boundary is clear.
I wanted to package common openGauss capabilities into structured, composable, and auditable MCP tools, so database tasks can be handled more reliably.
That is how opengauss-mcp came to life.
What Does It Do?
opengauss-mcp is a tooling service built on Spring AI MCP Server, focused on openGauss database use cases.
After connecting through an MCP client via stdio, you can call database tools directly for common tasks. Before doing so, configure a least-privilege database account; do not hand an Agent a connection with production write access.
Current core capabilities include:
- Schema Inspection: Quickly read table fields and types before making changes.
- Statistics Queries: Retrieve database statistics to support analysis and optimization.
- SQL Execution: Execute SQL for debugging, validation, and automation workflows. The deployer must still limit account privileges, target environments, and allowed operations.
Technical Approach
The project goal is not to add another thin JDBC wrapper, but to expose database interactions as clear MCP tool interfaces:
- Use Spring AI MCP Server to manage tool registration and invocation flows.
- Use stdio as the MCP transport for convenient local development and desktop client integration.
- Keep tool boundaries clear, so schema inspection, stats queries, and SQL execution remain independent and composable.
This design separates “what to inspect first” from “what to execute next” into reviewable calls. It does not automatically make a deployment secure or auditable: log retention, account authorization, transaction behavior, and whether DDL/DML is permitted must still be decided explicitly.
Open Source and Next Steps
The repository is open source now. Issues and PRs are very welcome.
- GitHub Repository: Sanjeever/opengauss-mcp
Next, I plan to improve both capabilities and developer experience, including richer metadata queries, clearer error feedback, and configuration and invocation examples that readers can verify from zero.
