Skip to main content
Glama
Hamzah-Muhammad

SafeDataBaseMCP

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
SAFEDB_BACKENDNoBackend to use: sqlite or postgres. Defaults to sqlite.sqlite
SAFEDB_PG_HOSTNoPostgres host. Defaults to 127.0.0.1.127.0.0.1
SAFEDB_PG_PORTNoPostgres port. Defaults to 5432.5432
SAFEDB_PG_SCHEMANoPostgres schema. Defaults to public.public
SAFEDB_AWS_REGIONNoAWS region for secretsmanager/rds-iam. Defaults to AWS_REGION.
SAFEDB_PG_SSLMODENoPostgres SSL mode. Defaults to require. Use verify-full with RDS.require
SAFEDB_CREDENTIALSNoCredential source: env, secretsmanager, or rds-iam. Defaults to env.env
SAFEDB_PG_DATABASENoPostgres database. Defaults to safedb.safedb
SAFEDB_AWS_SECRET_IDNoSecrets Manager secret ID for credentials. Defaults to unset.
SAFEDB_DATABASE_PATHNoPath to the SQLite database file. Defaults to data/library.db.data/library.db
SAFEDB_PG_READER_USERNoReader role username. Defaults to safedb_reader.safedb_reader
SAFEDB_PG_SSLROOTCERTNoPath to CA certificate for SSL. Defaults to unset.
SAFEDB_PG_WRITER_USERNoWriter role username. Defaults to safedb_writer.safedb_writer
SAFEDB_PG_READER_PASSWORDNoPassword for reader role when using env credentials.
SAFEDB_PG_WRITER_PASSWORDNoPassword for writer role when using env credentials.
SAFEDB_PROPOSAL_TTL_SECONDSNoHow 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

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Hamzah-Muhammad/SafeDataBaseMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server