Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
POCKETBASE_URLNoBase URL of the PocketBase instance, e.g. http://localhost:8090
POCKETBASE_TOKENNoPre-issued token for authentication instead of email/password
POCKETBASE_ADMIN_EMAILNoSuperuser email for authentication
POCKETBASE_ADMIN_PASSWORDNoSuperuser password for authentication
POCKETBASE_AUTH_COLLECTIONNoAuth collection to log in against (default '_superusers')

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": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
health_checkA

Check the PocketBase API health status. Does not require authentication. Returns the server code, message and health data.

auth_infoA

Return information about the current MCP authentication: PocketBase URL, the auth collection used, whether the token is valid, and the identity (id/email) of the authenticated superuser or user. The raw token is never exposed.

list_collectionsA

List collections (database tables / schemas) with pagination, filtering and sorting. Includes system collections such as _superusers, _authOrigins, etc. Filter example: 'type = "auth"'. Sort example: '-created'.

get_collectionA

Fetch a single collection by its id or name, including its full field schema, rules and indexes.

get_collection_scaffoldsA

Return default collection templates (scaffolds) for each collection type (base, auth, view). Useful as a starting point before calling create_collection — copy a scaffold, adjust the name and fields, then create it.

create_collectionA

Create a new collection. Provide name and type ('base', 'auth' or 'view'). Use data for the rest of the collection payload: fields (array of field definitions), API rules (listRule, viewRule, createRule, updateRule, deleteRule — string or null), indexes (array of CREATE INDEX statements), viewQuery (for view collections), and auth options for auth collections. Tip: call get_collection_scaffolds first to see the expected shape. Example field: { "name": "title", "type": "text", "required": true }. IMPORTANT (PocketBase 0.23+): 'created'/'updated' timestamps are NOT added automatically — add them explicitly as autodate fields if you need them, e.g. { "name": "created", "type": "autodate", "onCreate": true } and { "name": "updated", "type": "autodate", "onCreate": true, "onUpdate": true }.

update_collectionA

Update an existing collection by id or name. Provide the fields to change in data. To modify the schema, pass the full fields array (existing field ids must be preserved to keep data). You can also update rules, indexes and options.

delete_collectionA

Permanently delete a collection and ALL of its records. This cannot be undone.

import_collectionsA

Bulk import collections from an array of collection definitions (as exported from the PocketBase admin UI). When deleteMissing is true, collections not present in the import list are deleted — use with caution. This is the recommended way to apply a full schema in one call.

truncate_collectionA

Delete ALL records of a collection while keeping the collection/schema itself. Cannot be undone.

list_recordsA

List records of a collection with pagination, filtering, sorting and relation expansion. Filter supports operators like =, !=, >, <, ~ (contains), and functions. Example filter: 'status = "active" && created > "2024-01-01"'. Use expand to inline related records (e.g. 'author,comments_via_post'). Set skipTotal to true for faster queries when you don't need the total count.

get_full_record_listA

Fetch ALL records matching a filter, auto-paginating in batches. Use for exports or small/medium collections. Prefer list_records with pagination for large datasets to avoid huge responses.

get_recordA

Fetch a single record by id, optionally expanding relations and selecting specific fields.

get_first_recordA

Return the first record matching a filter expression (throws if none found). Convenient for lookups like 'email = "a@b.com"'.

create_recordA

Create a new record in a collection. Pass field values in data. For auth collections, include 'password' and 'passwordConfirm' (and usually 'email'). To upload files, list them in files (each maps a field name to a local file path). Relation fields accept a record id or an array of ids.

update_recordA

Update an existing record by id. Only the fields present in data are changed. To append to a multi-relation/file/select field use the '+' modifier as a key (e.g. { "tags+": "id" }); to remove use 'field-'. Upload files via files.

delete_recordA

Permanently delete a single record by id. Cannot be undone.

batchA

Execute multiple record operations in a single transactional request. All operations succeed or all are rolled back. Each operation has an action ('create' | 'update' | 'delete' | 'upsert'), a target collection, and depending on the action a data object and/or record id. For 'upsert', include the record 'id' inside data (creates if missing, updates if present). Note: the Batch API must be enabled in PocketBase settings (Settings > Batch API).

auth_with_passwordA

Authenticate an end user against an auth collection with their identity (email/username) and password. Returns the auth token and the user record. Does not affect the MCP's own superuser session. Useful to obtain a token to act on behalf of a user or to verify credentials.

list_auth_methodsA

List the available authentication methods for an auth collection: whether password/OTP auth is enabled and the configured OAuth2 providers (Google, GitHub, etc.).

impersonateA

Generate an auth token for an existing user without their password (superuser only). Returns a non-refreshable token valid for the given duration, useful to make API calls on behalf of a user.

request_verificationA

Send a verification email to a user of an auth collection (requires SMTP configured).

confirm_verificationA

Confirm a user's email verification using the token from the verification email.

request_password_resetA

Send a password reset email to a user (requires SMTP configured).

confirm_password_resetA

Set a new password using the reset token from the password reset email.

request_otpA

Send a one-time password email to a user and return the otpId needed to complete auth_with_otp (requires SMTP and OTP auth enabled on the collection).

auth_with_otpA

Complete OTP authentication using the otpId (from request_otp) and the code the user received.

confirm_email_changeA

Confirm a user's email change using the token from the confirmation email and the user's password.

list_external_authsA

List the OAuth2 providers linked to a specific user record (superuser only).

unlink_external_authA

Remove a linked OAuth2 provider from a user record (superuser only).

list_superusersA

List superuser (admin) accounts from the built-in _superusers collection.

create_superuserA

Create a new superuser (admin) account. Provide email and password. The new superuser has full administrative access to the instance.

update_superuserA

Update a superuser account (e.g. change email or reset the password). To change the password, include both 'password' and 'passwordConfirm' in data.

delete_superuserA

Delete a superuser (admin) account by id. At least one superuser must always remain.

get_file_urlA

Build the public URL for a file stored in a record's file field. For image files you may request a thumbnail via thumb (e.g. '100x100', '100x100t', '0x100'). For protected files (collection with a non-public file field), set protected to true to embed a short-lived access token.

get_file_tokenA

Generate a short-lived file access token used to access protected files by appending it as a ?token=... query parameter to a file URL.

download_fileA

Download a record file to a local path on the machine running this MCP server. Handles protected files automatically by requesting an access token.

list_logsA

List application request/activity logs with pagination, filtering and sorting (superuser only). Filter example: 'level >= 4 && data.status >= 400'. Sort defaults to newest first.

get_logA

Fetch a single log entry by its id (superuser only).

get_logs_statsA

Return hourly aggregated log statistics, optionally filtered. Useful to chart request volume or error rates. Filter example: 'level = 0'.

get_settingsA

Fetch all instance settings (app name/url, SMTP, S3 storage, S3 backups, batch API, rate limits, trusted proxy, OAuth2 secrets are redacted). Superuser only.

update_settingsA

Bulk update instance settings. Provide only the sections you want to change in data. Examples: { "meta": { "appName": "My App", "appURL": "https://example.com" } }, { "smtp": { "enabled": true, "host": "smtp.example.com", "port": 587, "username": "...", "password": "..." } }, { "batch": { "enabled": true, "maxRequests": 50 } }. Superuser only.

test_s3A

Perform an S3 filesystem connection test for either 'storage' or 'backups'. Superuser only.

test_emailA

Send a test email to verify SMTP configuration. Choose a template: 'verification', 'password-reset' or 'email-change'. Superuser only. Requires SMTP to be configured.

generate_apple_client_secretB

Generate a new Apple OAuth2 client secret (JWT) from your Apple developer credentials. Superuser only.

list_backupsA

List all available backup files (key, size, modified date). Superuser only.

create_backupA

Create a new backup (zip snapshot of the database and storage). If basename is omitted, PocketBase auto-generates a timestamped name. Returns the backup name. Superuser only.

upload_backupA

Upload an existing local backup zip file into the instance's backups. Superuser only.

delete_backupA

Delete a single backup file by its key/name. Cannot be undone. Superuser only.

restore_backupA

Restore the instance from an existing backup file. THIS OVERWRITES ALL CURRENT DATA and restarts the application. Use with extreme caution. Superuser only.

get_backup_download_urlA

Build a download URL for a backup file using a fresh superuser file token. Superuser only.

download_backupA

Download a backup file to a local path on the machine running this MCP server. Superuser only.

list_cronsA

List all registered cron jobs with their id and cron expression (e.g. the automatic backups job, log/token cleanup, plus any custom jobs registered via hooks). Superuser only.

run_cronA

Manually trigger a registered cron job by its id (as returned by list_crons). Superuser only.

send_raw_requestA

Escape hatch: send an arbitrary authenticated HTTP request to any PocketBase API endpoint. Use this for endpoints not covered by a dedicated tool, custom routes added via hooks, or new API features. The Authorization header (superuser token) is attached automatically. path is relative to the server root and must start with '/api/...' (e.g. '/api/collections'). Returns the parsed JSON response.

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/nestebe/pocketbase-mcp'

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