Skip to content
MCP server

GaussDB Read-Only MCP

Read-only MCP server letting coding agents inspect Huawei GaussDB databases safely

Actively maintainedStatus and history

The repository was last updated 22 days ago and is published under Apache-2.0.

Pricing
Open source
Platforms
CLI, Linux, macOS
GitHub stars
1
Last commit
22 days ago
Language
Go
License
Apache-2.0

Similar MCP servers

About GaussDB Read-Only MCP

GaussDB Read-Only MCP is an open-source MCP server for databases. It is available on CLI, Linux, macOS, Windows and self-hosted.

The README describes a Go binary that gives coding agents such as Claude Code and OpenCode a set of read-only tools for exploring GaussDB instances over stdio. Queries pass a static SQL check that accepts only a single SELECT or WITH statement, then run inside a transaction forced into READ ONLY mode on the server, so writes are refused even if the static check is bypassed.

The server is configured through a YAML file that can hold several GaussDB instances, with one marked as default and tools selecting others by an instance parameter. It targets intranet deployments where SSL is not used, with sslmode defaulting to disable. The README also recommends a database account granted only SELECT privileges.

It suits teams who want an agent to query or read schema from production-like GaussDB or openGauss databases without giving it write access. The README notes that the driver speaks the GaussDB extended protocol, so it will not connect to native PostgreSQL.

Tools this server provides (5)

Taken from the project documentation; the running server may differ.

test_connection
Connectivity test reporting server version, current database and user, read-only status and latency.
list_schemas
Lists schemas with object counts and comments, optionally including system schemas.
list_tables
Lists tables and views with type, estimated row count and comments, filterable by schema.
describe_table
Describes columns, keys, constraints, indexes, view definitions and partition lists.
execute_select
Runs a single SELECT or WITH statement subject to row and timeout limits.

What it does

Static SQL validation
Rejects DML, DDL, SELECT INTO, row locks, multi-statement input and a configurable list of dangerous functions before execution.
Server-side read-only transactions
Each query runs in an explicit transaction set to READ ONLY, with a statement timeout applied.
Multi-instance configuration
A single YAML file defines several database instances, and tools pick one through the instance argument.
Schema and table inspection
Tools list schemas and tables and describe columns, constraints, indexes, views and partitions.
Row-limited SELECT execution
Returns column names, rows and a truncation flag, with default and capped row limits.
Single static binary
Built with CGO disabled and an embedded driver copy, so it can be deployed offline on intranet hosts.

Good for

  • Letting a coding agent explore a GaussDB schema while writing application code
  • Checking table structure, indexes and partitions before writing a migration
  • Running ad hoc read queries against a production-like database without write risk
  • Giving analysts an agent-driven read path to multiple intranet GaussDB instances

Pricing

Open source

Free, Apache-2.0 licensed open source

GaussDB Read-Only MCP FAQ

Can it write data to the database?

No. The README describes static checks that block DML and DDL, and server-side READ ONLY transactions that reject writes.

Does it work with native PostgreSQL?

The README says it will not connect to native PostgreSQL because the driver uses the GaussDB extended protocol, and integration tests need a real GaussDB or openGauss instance.

Which agents are supported?

The README gives configuration examples for Claude Code and OpenCode.

How is it installed?

The README covers Homebrew, direct binary downloads for Linux, macOS and Windows, and building from source with Go 1.26.10 or later.

Is GaussDB Read-Only MCP free?

Yes. GaussDB Read-Only MCP is open source, so you can use and self-host it for free.

What are the best alternatives to GaussDB Read-Only MCP?

The closest alternatives to GaussDB Read-Only MCP are Pg Readonly MCP, Mysql, Mcpg, Db Conn MCP and BigQuery MCP.

Where this comes from

  • Description: written from the project's README and its MCP Registry entry.

How AIPoweredBot checks servers