SafeDataBaseMCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| SAFEDB_BACKEND | No | Backend to use: sqlite or postgres. Defaults to sqlite. | sqlite |
| SAFEDB_PG_HOST | No | Postgres host. Defaults to 127.0.0.1. | 127.0.0.1 |
| SAFEDB_PG_PORT | No | Postgres port. Defaults to 5432. | 5432 |
| SAFEDB_PG_SCHEMA | No | Postgres schema. Defaults to public. | public |
| SAFEDB_AWS_REGION | No | AWS region for secretsmanager/rds-iam. Defaults to AWS_REGION. | |
| SAFEDB_PG_SSLMODE | No | Postgres SSL mode. Defaults to require. Use verify-full with RDS. | require |
| SAFEDB_CREDENTIALS | No | Credential source: env, secretsmanager, or rds-iam. Defaults to env. | env |
| SAFEDB_PG_DATABASE | No | Postgres database. Defaults to safedb. | safedb |
| SAFEDB_AWS_SECRET_ID | No | Secrets Manager secret ID for credentials. Defaults to unset. | |
| SAFEDB_DATABASE_PATH | No | Path to the SQLite database file. Defaults to data/library.db. | data/library.db |
| SAFEDB_PG_READER_USER | No | Reader role username. Defaults to safedb_reader. | safedb_reader |
| SAFEDB_PG_SSLROOTCERT | No | Path to CA certificate for SSL. Defaults to unset. | |
| SAFEDB_PG_WRITER_USER | No | Writer role username. Defaults to safedb_writer. | safedb_writer |
| SAFEDB_PG_READER_PASSWORD | No | Password for reader role when using env credentials. | |
| SAFEDB_PG_WRITER_PASSWORD | No | Password for writer role when using env credentials. | |
| SAFEDB_PROPOSAL_TTL_SECONDS | No | How long a change_id stays confirmable. Defaults to 300. | 300 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_tablesA | List every table in the database with its row count and columns. Read-only. Runs immediately, no confirmation needed. |
| describe_tableA | Show the columns, types, constraints and foreign keys of one table. Read-only. Runs immediately, no confirmation needed. Args: table: Name of the table to describe. |
| run_queryA | Run one read-only SELECT and return the rows. Only a single SELECT is accepted. Anything else - a write, DDL, PRAGMA, ATTACH, a stacked statement, a comment - is rejected before it reaches the database, and the connection used here is opened read-only anyway. Args: sql: A single SELECT statement. |
| propose_changeA | Preview a write without committing it, and get a change_id back. The statement is validated, executed inside a transaction to compute a real preview, then rolled back. Nothing is written. Show the returned preview to the human and call confirm_change with the change_id to commit it. The id is single use and expires. Accepts one INSERT, UPDATE or DELETE against an existing table. UPDATE and DELETE must have a WHERE clause. Args: sql: A single INSERT, UPDATE or DELETE statement. |
| confirm_changeA | Commit a change that propose_change previewed. The statement is re-validated and re-executed, then committed. The change_id must be one propose_change returned, still unused and not yet expired. There is no way to commit a write without one. Args: change_id: The id returned by propose_change. |
| list_pending_changesA | List the proposed changes that are still awaiting confirmation. Read-only. Shows each pending change_id, its SQL and how long it has left before it expires. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 6 tools
Each tool has a clearly distinct role: schema discovery, read-only querying, and the two-phase write flow are separated without overlap. The read/write boundary between run_query and propose_change is especially well-defined.
All tools follow a consistent verb_noun snake_case pattern: list_tables, describe_table, run_query, propose_change, confirm_change, list_pending_changes. The naming makes the action and target immediately predictable.
Six tools is a well-scoped size for a safe database interface. Each tool earns its place, covering schema browsing, read-only access, write previewing, confirmation, and pending-change inspection without unnecessary bloat.
The core workflow is complete: browse schema, query data, propose changes, review pending changes, and commit. The only notable gap is the lack of an explicit way to cancel a pending change, though expiration partially covers this.