mcp-safebase

v0.3.0
mcp-safebase Checked 11 hours ago Published 2 months ago

Encrypted file-based storage MCP server with per-bucket passwords and human-only secret editing.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_databases

List all databases (top-level folders) in the storage root. Returns a JSON array of database names. A database is a folder directly under the storage root. Hidden folders (starting with a dot) are excluded.

create_database

Create a new database (folder) in the storage root. Args: database: Name of the database to create. Must start with an alphanumeric character and contain only alphanumeric, hyphen, or underscore characters. Returns a confirmation message. If the database already exists, returns a message saying so (idempotent operation).

ParameterTypeDescription
database *string

list_buckets

List all buckets (subfolders) in a database. Args: database: Name of the database to list buckets from. Returns a JSON array of bucket names. A bucket is a subfolder inside a database. Hidden folders (starting with a dot) are excluded.

ParameterTypeDescription
database *string

create_bucket

Create a new bucket (subfolder) in a database. The bucket has no password until the first put_file call, at which point a dialog will appear on the human's screen to create one. Args: database: Name of the database to create the bucket in. bucket: Name of the bucket to create. Must start with an alphanumeric character and contain only alphanumeric, hyphen, or underscore characters. Returns a confirmation message. If the bucket already exists, returns a message saying so (idempotent operation).

ParameterTypeDescription
bucket *string
database *string

list_files

List all files in a bucket. Args: database: Name of the database. bucket: Name of the bucket. Returns a JSON array of filenames (without the .enc extension). Each filename corresponds to one encrypted JSON file in the bucket.

ParameterTypeDescription
bucket *string
database *string

put_file

Write an encrypted JSON file to a bucket. If the file already exists, it is overwritten. The content is serialized to JSON, encrypted with Fernet, and written to disk as {filename}.enc. If this is the first write to the bucket, a dialog will appear on the human's screen to create a password for the bucket. On subsequent writes, if the key is not in memory (or has expired), a dialog will appear to enter the password. Args: database: Name of the database. bucket: Name of the bucket. filename: Name of the file (must end with .json). The store…

ParameterTypeDescription
bucket *string
content *object
database *string
filename *string

get_file

Read and decrypt a file from a bucket. If the key is not in memory (or has expired), a dialog will appear on the human's screen to enter the bucket password. Args: database: Name of the database. bucket: Name of the bucket. filename: Name of the file (must end with .json). Returns the decrypted JSON content as a formatted string. If the file does not exist, returns an error message. If the human cancels the password dialog, returns an access-denied message.

ParameterTypeDescription
bucket *string
database *string
filename *string

edit_file

Open a GUI editor so the human can edit a stored secret directly. The AI never sees the file content. The server unlocks the bucket (showing a password dialog on the human's screen if the key is not cached), decrypts the file, and opens a tkinter editor pre-filled with the decrypted JSON. The human edits the content and clicks Save; the server validates the edited text is a JSON object, re-encrypts it, and writes it to disk. Use this instead of put_file when a secret needs to be rotated or updated without the new value passing through the AI conversation. Arg…

ParameterTypeDescription
bucket *string
database *string
filename *string

delete_file

Delete a file from a bucket. No password required. Args: database: Name of the database. bucket: Name of the bucket. filename: Name of the file (must end with .json). Returns a confirmation message. If the file does not exist, returns an error message.

ParameterTypeDescription
bucket *string
database *string
filename *string

delete_bucket

Delete a bucket and all its contents. No password required. Removes the bucket folder, all encrypted files inside it, and the bucket's password metadata file. Clears the bucket's key from the in-memory cache if present. This is irreversible. Args: database: Name of the database. bucket: Name of the bucket to delete. Returns a confirmation message. If the bucket does not exist, returns an error message.

ParameterTypeDescription
bucket *string
database *string

query_bucket

List all files in a bucket with optional field filtering. Loads and decrypts every file in the bucket, then optionally filters by matching fields. This is a linear scan (no indexes) - fine for small buckets, slower for large ones. If the key is not in memory (or has expired), a dialog will appear on the human's screen to enter the bucket password. Args: database: Name of the database. bucket: Name of the bucket. filter_fields: Optional dict of field-value pairs to filter by. Only files where all specified fields match the specified…

ParameterTypeDescription
bucket *string
database *string
filter_fields

change_bucket_password

Change a bucket's password. Re-encrypts all files with the new key. The human will be prompted (via a dialog on their screen) to enter the current password (verified against the stored bcrypt hash), then to enter and confirm a new password. All encrypted files in the bucket are decrypted with the old key and re-encrypted with the new key. If any file fails to decrypt with the old password, the operation aborts and no files are changed. Args: database: Name of the database. bucket: Name of the bucket. Returns a confirmation message, or an erro…

ParameterTypeDescription
bucket *string
database *string