# ROUA: read-only database accounts

> ROUA: read-only database accounts is an open-source MCP server for databases. Creates and audits read-only database accounts for AI agents, demos and reviewers. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** Web, CLI, API, Self-hosted
- **Website:** https://kaizam.com
- **Repository:** https://github.com/promisegithub/roua
- **MCP Registry name:** io.github.PromiseGithub/roua
- **Categories:** [databases](https://ai-powered.com/categories/databases)
- **Listing updated:** 2026-11-27

## About

Handing a database to an AI agent, a demo or an app reviewer usually means a user that is supposed to be read-only but often inherits write paths, can see secret columns, and never expires. This toolkit builds accounts from nothing, granting read access per object as it exists today, hiding secret-looking columns, denying writes where the engine allows it, and setting an owner and an expiry date.

The same checks are available as an audit that only reads, so an existing account can be tested before it is trusted. Output is one PASS, WARN or FAIL line per check, with a suggested fix. The PostgreSQL edition ships a command line tool, a Docker image, a GitHub Action and an MCP server, while the other engines get generated setup, audit, revoke and drop scripts that can live in version control.

It suits developers wiring up text-to-SQL agents, teams preparing app store review accounts, and security staff who need to prove an account cannot change data. Support is full for PostgreSQL, tested in CI for MySQL, MariaDB, SQL Server, Oracle, MongoDB and Redis, and in preview for Snowflake and BigQuery.

## Features

- **Write-path detection:** The audit follows table grants, inherited roles, ownership, functions and other routes by which an account could write.
- **Secret column hiding:** Columns that look like password hashes, tokens or card numbers are excluded automatically, and extra entries can be added.
- **Automatic expiry:** Accounts carry an owner and an expiry date and are locked by the database or by a scheduled revoke script.
- **Instant revoke:** A single script locks the account and ends its open sessions.
- **Generated scripts:** Setup, audit, revoke and clean-up scripts are produced per database and can be run in a pipeline.
- **CI and MCP integration:** A GitHub Action fails builds when an account stops being read-only, and an MCP server lets agents run audits.

## Good for

- Giving a text-to-SQL or coding agent read access to a schema without write or secret exposure
- Creating a time-limited database account for an app store reviewer
- Auditing an existing account labelled readonly before production use
- Failing a CI build when a database role gains write privileges
- Issuing short-lived access for a vendor support session

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add roua --env ADMIN_DATABASE_URL='<ADMIN_DATABASE_URL>' -- npx -y @roua-dev/cli
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "roua": {
      "command": "npx",
      "args": [
        "-y",
        "@roua-dev/cli"
      ],
      "env": {
        "ADMIN_DATABASE_URL": "<ADMIN_DATABASE_URL>"
      }
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "roua": {
      "command": "npx",
      "args": [
        "-y",
        "@roua-dev/cli"
      ],
      "env": {
        "ADMIN_DATABASE_URL": "<ADMIN_DATABASE_URL>"
      }
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "roua": {
      "command": "npx",
      "args": [
        "-y",
        "@roua-dev/cli"
      ],
      "env": {
        "ADMIN_DATABASE_URL": "<ADMIN_DATABASE_URL>"
      }
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "roua": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@roua-dev/cli"
      ],
      "env": {
        "ADMIN_DATABASE_URL": "<ADMIN_DATABASE_URL>"
      }
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add roua --env ADMIN_DATABASE_URL='<ADMIN_DATABASE_URL>' -- npx -y @roua-dev/cli
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.roua]
command = "npx"
args = ["-y", "@roua-dev/cli"]
env = { ADMIN_DATABASE_URL = "<ADMIN_DATABASE_URL>" }
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "roua": {
      "command": "npx",
      "args": [
        "-y",
        "@roua-dev/cli"
      ],
      "env": {
        "ADMIN_DATABASE_URL": "<ADMIN_DATABASE_URL>"
      }
    }
  }
}
```

Or run: gemini mcp add -s user -e ADMIN_DATABASE_URL='<ADMIN_DATABASE_URL>' roua npx -- -y @roua-dev/cli

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "roua": {
      "command": "npx",
      "args": [
        "-y",
        "@roua-dev/cli"
      ],
      "env": {
        "ADMIN_DATABASE_URL": "<ADMIN_DATABASE_URL>"
      }
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "roua": {
      "command": "npx",
      "args": [
        "-y",
        "@roua-dev/cli"
      ],
      "env": {
        "ADMIN_DATABASE_URL": "<ADMIN_DATABASE_URL>"
      }
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "roua": {
      "command": "npx",
      "args": [
        "-y",
        "@roua-dev/cli"
      ],
      "env": {
        "ADMIN_DATABASE_URL": "<ADMIN_DATABASE_URL>"
      }
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "roua": {
      "command": "npx",
      "args": [
        "-y",
        "@roua-dev/cli"
      ],
      "env": {
        "ADMIN_DATABASE_URL": "<ADMIN_DATABASE_URL>"
      }
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "roua": {
      "command": "npx",
      "args": [
        "-y",
        "@roua-dev/cli"
      ],
      "env": {
        "ADMIN_DATABASE_URL": "<ADMIN_DATABASE_URL>"
      }
    }
  }
}
```

The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "roua": {
      "command": "npx",
      "args": [
        "-y",
        "@roua-dev/cli"
      ],
      "env": {
        "ADMIN_DATABASE_URL": "<ADMIN_DATABASE_URL>"
      }
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "roua": {
      "command": "npx",
      "args": [
        "-y",
        "@roua-dev/cli"
      ],
      "env": {
        "ADMIN_DATABASE_URL": "<ADMIN_DATABASE_URL>"
      }
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "roua": {
      "command": "npx",
      "args": [
        "-y",
        "@roua-dev/cli"
      ],
      "env": {
        "ADMIN_DATABASE_URL": "<ADMIN_DATABASE_URL>"
      }
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 1 of 4 tools reads data; 3 names don't say. From the server's own tool labels and tool names; not verified by us.

- `list_engines` (name suggests: reads): Lists supported database engines.
- `audit_script`: Generates an audit script for an account.
- `generate_account_scripts`: Writes account scripts to a folder, keeping passwords out of the conversation.
- `audit_postgres_role`: Runs a live, read-only audit of a PostgreSQL role.

## FAQ

### Does the audit change anything in the database?

No. The audit only reads and needs nothing installed in the database.

### Which databases are fully supported?

PostgreSQL has the full toolkit with the CLI, masking and live verification. MySQL, MariaDB, SQL Server, Oracle, MongoDB and Redis are tested in CI. Snowflake and BigQuery are in preview.

### Does the password appear in the generated scripts?

Where the database accepts it, the scripts contain only a password hash rather than the password itself.

### Does ROUA: read-only database accounts work with managed database services?

Yes, provided you have an administrator account. Amazon RDS, Google Cloud SQL, Azure, Supabase and Neon are listed among the supported services.

### Is ROUA: read-only database accounts free?

Yes. ROUA: read-only database accounts is open source, so you can use and self-host it for free.

### How do I add ROUA: read-only database accounts to Claude Code?

Run this command in your terminal: claude mcp add roua --env ADMIN_DATABASE_URL='<ADMIN_DATABASE_URL>' -- npx -y @roua-dev/cli

### What are the best alternatives to ROUA: read-only database accounts?

The closest alternatives to ROUA: read-only database accounts are PostgreSQL (hardened, read-only), mssql-readonly-mcp, Universal DB (read-only), Safedb MCP and Pgmoat.

## Where this comes from

- Description: written from the project's README, the project's website and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [PostgreSQL (hardened, read-only)](https://ai-powered.com/mcp/postgresql-hardened-read-only): PostgreSQL (hardened, read-only) is an open-source MCP server for databases.
- [mssql-readonly-mcp](https://ai-powered.com/mcp/mssql-readonly-mcp): mssql-readonly-mcp is an open-source MCP server for databases.
- [Universal DB (read-only)](https://ai-powered.com/mcp/universal-db-read-only): Universal DB (read-only) is an open-source MCP server for databases.
- [Safedb MCP](https://ai-powered.com/mcp/safedb-mcp): Safedb MCP is an open-source MCP server for databases.
- [Pgmoat](https://ai-powered.com/mcp/pgmoat): Pgmoat is an open-source MCP server for databases.
- [PostgreSQL Performance (read-only)](https://ai-powered.com/mcp/postgresql-performance-read-only): PostgreSQL Performance (read-only) is an open-source MCP server for databases.
- [SafeSelect MCP](https://ai-powered.com/mcp/safeselect-mcp): SafeSelect MCP is a free MCP server for databases.
- [SQL Server DBA (read-only)](https://ai-powered.com/mcp/sql-server-dba-read-only): SQL Server DBA (read-only) is an open-source MCP server for databases.

---
Source: https://ai-powered.com/mcp/roua-read-only-database-accounts
