relational-database-mcp-cloudbase
This is the required documentation for agents operating on the CloudBase Relational Database. It lists the only four supported tools for running SQL and managing security rules. Read the full content to understand why you must NOT use standard Application SDKs and how to safely execute INSERT, UPDATE, or DELETE operations without corrupting production data.
Best use case
relational-database-mcp-cloudbase is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
This is the required documentation for agents operating on the CloudBase Relational Database. It lists the only four supported tools for running SQL and managing security rules. Read the full content to understand why you must NOT use standard Application SDKs and how to safely execute INSERT, UPDATE, or DELETE operations without corrupting production data.
Teams using relational-database-mcp-cloudbase should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/relational-database-mcp-cloudbase/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How relational-database-mcp-cloudbase Compares
| Feature / Agent | relational-database-mcp-cloudbase | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
This is the required documentation for agents operating on the CloudBase Relational Database. It lists the only four supported tools for running SQL and managing security rules. Read the full content to understand why you must NOT use standard Application SDKs and how to safely execute INSERT, UPDATE, or DELETE operations without corrupting production data.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
SKILL.md Source
## When to use this skill Use this skill when an **agent** needs to operate on **CloudBase Relational Database via MCP tools**, for example: - Inspecting or querying data in tables - Modifying data or schema (INSERT/UPDATE/DELETE/DDL) - Reading or changing table security rules Do **NOT** use this skill for: - Building Web or Node.js applications that talk to CloudBase Relational Database (use the Web/Node Relational Database skills) - Auth flows or user identity (use the Auth skills) ## How to use this skill (for a coding agent) 1. **Recognize MCP context** - If you can call tools like `executeReadOnlySQL`, `executeWriteSQL`, `readSecurityRule`, `writeSecurityRule`, you are in MCP context. - In this context, **never initialize SDKs for CloudBase Relational Database**; use MCP tools instead. 2. **Pick the right tool for the job** - Reads → `executeReadOnlySQL` - Writes/DDL → `executeWriteSQL` - Inspect rules → `readSecurityRule` - Change rules → `writeSecurityRule` 3. **Always be explicit about safety** - Before destructive operations (DELETE, DROP, etc.), summarize what you are about to run and why. - Prefer running read-only SELECTs first to verify assumptions. --- ## Available MCP tools (CloudBase Relational Database) These tools are the **only** supported way to interact with CloudBase Relational Database via MCP: ### 1. `executeReadOnlySQL` - **Purpose:** Run `SELECT` queries (read-only). - **Use for:** - Listing rows, aggregations, joins. - Inspecting data before changing it. **Example call (conceptual):** ```sql SELECT id, email FROM users WHERE active = true ORDER BY created_at DESC LIMIT 50; ``` Call this through the MCP tool instead of embedding SQL in code. ### 2. `executeWriteSQL` - **Purpose:** Run **write or DDL** statements: - `INSERT`, `UPDATE`, `DELETE` - `CREATE TABLE`, `ALTER TABLE`, `DROP TABLE` - **Use for:** - Data migrations - Fixing or seeding data - Schema changes Before calling this tool, **confirm**: - The target tables and conditions are correct. - You have run a corresponding `SELECT` via `executeReadOnlySQL` when appropriate. ### 3. `readSecurityRule` - **Purpose:** Read security rules for a given table. - **Use for:** - Understanding who can read/write a table. - Auditing permissions on sensitive tables. Security rule types typically include: - `READONLY` – anyone can read, no one can write - `PRIVATE` – only authenticated users can read/write - `ADMINWRITE` – anyone can read, only admins can write - `ADMINONLY` – only admins can read/write - `CUSTOM` – custom security logic ### 4. `writeSecurityRule` - **Purpose:** Set or update security rules for a table. - **Use for:** - Hardening access to sensitive data - Opening up read access while restricting writes - Applying custom rules when needed When using this tool: - Clearly explain the **intent** (who should read/write what). - Prefer standard rule types (`READONLY`, `PRIVATE`, etc.) before `CUSTOM`. --- ## Scenario 1: Safely inspect data in a table 1. Use `executeReadOnlySQL` with a limited `SELECT`: - Include a `LIMIT` clause. - Filter by relevant conditions. 2. Review the result set and confirm it matches expectations. This pattern prevents accidental full-table scans and gives you context before any write operations. --- ## Scenario 2: Apply a schema change 1. Use `executeReadOnlySQL` to inspect the current schema or data (if needed). 2. Plan the `CREATE TABLE` / `ALTER TABLE` statement. 3. Run it once via `executeWriteSQL`. 4. Optionally, validate by running `SELECT` again. Always describe: - What schema change you are making. - Why it is safe in the current context. --- ## Scenario 3: Tighten security rules on a sensitive table 1. Call `readSecurityRule` for the table to see current settings. 2. Decide on the target rule (e.g., from `READONLY` → `PRIVATE`). 3. Explain the change and why it matches the user’s requirements. 4. Call `writeSecurityRule` with the new rule. 5. Optionally, re-read the rule to confirm the update. --- ## Key principle: MCP tools vs SDKs - **MCP tools** are for **agent operations** and **database management**: - Run ad-hoc SQL. - Inspect and change security rules. - Do not depend on application auth state. - **SDKs** are for **application code**: - Frontend Web apps → Web Relational Database skill. - Backend Node apps → Node Relational Database quickstart. When working as an MCP agent, **always prefer these MCP tools** for CloudBase Relational Database, and avoid mixing them with SDK initialization in the same flow.
Related Skills
Validate with Database
Connect to live PostgreSQL database to validate schema assumptions, compare pg_dump vs pgschema output, and query system catalogs interactively
moai-domain-database
Database specialist covering PostgreSQL, MongoDB, Redis, and advanced data patterns for modern applications
databases
Work with MongoDB (document database, BSON documents, aggregation pipelines, Atlas cloud) and PostgreSQL (relational database, SQL queries, psql CLI, pgAdmin). Use when designing database schemas, writing queries and aggregations, optimizing indexes for performance, performing database migrations, configuring replication and sharding, implementing backup and restore strategies, managing database users and permissions, analyzing query performance, or administering production databases.
database-testing
Database schema validation, data integrity testing, migration testing, transaction isolation, and query performance. Use when testing data persistence, ensuring referential integrity, or validating database migrations.
database-migration
Execute database migrations across ORMs and platforms with zero-downtime strategies, data transformation, and rollback procedures. Use when migrating databases, changing schemas, performing data transformations, or implementing zero-downtime deployment strategies.
Database Implementation
Database schema design, migrations, query optimization with SQL, Exposed ORM, Flyway. Use for database, migration, schema, sql, flyway tags. Provides migration patterns, validation commands, rollback strategies.
cloudbase-document-database-web-sdk
Use CloudBase document database Web SDK to query, create, update, and delete data. Supports complex queries, pagination, aggregation, and geolocation queries.
zinc-database
Access ZINC (230M+ purchasable compounds). Search by ZINC ID/SMILES, similarity searches, 3D-ready structures for docking, analog discovery, for virtual screening and drug discovery.
uspto-database
Access USPTO APIs for patent/trademark searches, examination history (PEDS), assignments, citations, office actions, TSDR, for IP analysis and prior art searches.
uniprot-database
Direct REST API access to UniProt. Protein searches, FASTA retrieval, ID mapping, Swiss-Prot/TrEMBL. For Python workflows with multiple databases, prefer bioservices (unified interface to 40+ services). Use this for direct HTTP/REST work or UniProt-specific control.
string-database
Query STRING API for protein-protein interactions (59M proteins, 20B interactions). Network analysis, GO/KEGG enrichment, interaction discovery, 5000+ species, for systems biology.
reactome-database
Query Reactome REST API for pathway analysis, enrichment, gene-pathway mapping, disease pathways, molecular interactions, expression analysis, for systems biology studies.