Skip to content
Scalpels home

Scalpels is officially launching on October 31, 2026. Special early adopter pricing is available now.

← All documentation

Documentation

Sink

Configuration

Updated

Sink works with no configuration. Every Sink setting below is optional, and Scalpels writes none of them at install, so the defaults apply until you change one.

Changing a Sink setting

Sink's settings are environment variables on the Sink environment in Laravel Cloud. Add or edit the variable there and redeploy Sink for it to take effect.

Never add variables for the resources Cloud manages for Sink: DB_*, DB_CONNECTION, QUEUE_CONNECTION, CACHE_STORE, FILESYSTEM_DISK, REDIS_*, SQS_* or AWS_*. Cloud injects those, and a value you set yourself overrides the managed one.

Retention

Sink's scheduler runs sink:maintain every hour. It removes stored files left behind by deleted messages, then applies these limits in order:

Variable Default Effect
SINK_RETENTION_DAYS 7 Deletes messages received more than this many days ago.
SINK_MAX_MESSAGES unset (no cap) Keeps only this many of the most recently received messages and deletes the rest.
SINK_MAX_TOTAL_BYTES unset (no cap) Deletes the oldest messages until the total stored message size is at or below this many bytes.

Deleting a message removes its metadata, its raw source and its attachments. To apply the limits immediately rather than waiting for the next hour, run php artisan sink:prune as a command on the Sink environment in Laravel Cloud.

MCP paths

Variable Default Effect
SINK_MCP_PATH /mcp Path of the direct MCP server that takes a Sink MCP credential.
SINK_MCP_READ_PATH /mcp/read Path of the delegated, read-only MCP server Sink advertises.
SINK_MCP_DESTRUCTIVE_PATH /mcp/write Path of the delegated MCP server that also allows purge.

Change these only if something else on the same host already uses the path, and update any MCP client configuration that points at the old one. See Agents and MCP.

Settings to leave alone

  • SINK_QUEUE_CONNECTION chooses the queue connection for the parse job. Unset, it uses the environment's default queue, which is the managed queue the install attached. Leave it unset.
  • SINK_DISK chooses where raw messages and attachments are stored. Unset, it uses the environment's default disk, which is the bucket the install attached. Leave it unset.
  • SINK_ROUTE_PREFIX moves /ingest, /capabilities and /inbox under a prefix (for example, sink gives /sink/inbox). It does not move the MCP paths. Every connected application's SINK_URL would then need the prefix too, and the values Scalpels wrote when attaching do not include it, so setting this breaks existing connections.

Members and credentials

Administrators manage the installation from Members in the sidebar, at /bfc/ui.

The installation credentials page, /bfc/ui/credentials/installation, lists the credentials that belong to the installation rather than to a person. Each one has a single purpose:

  • sink.ingest credentials let an application send mail to /ingest. Scalpels creates these when you attach an application. You can create one by hand for an application Scalpels does not manage; the Subject reference you enter becomes that application's app label.
  • sink.mcp credentials let an MCP client use /mcp.

Each secret is shown once, when it is created. Use Rotate to replace a credential and Revoke to disable it. A revoked or wrong-purpose credential gets HTTP 401.

Settings in a sending application

These variables belong to each application that sends mail to Sink, not to Sink itself. Scalpels writes SINK_URL and SINK_TOKEN when you attach the application; you set MAIL_MAILER.

Variable Default Effect
MAIL_MAILER the app's default Set to sink to capture mail. Nothing is captured until you do.
SINK_URL written by Scalpels Sink's base URL. The client adds /ingest and /capabilities.
SINK_TOKEN written by Scalpels The application's ingest credential.
SINK_ALLOW_PRODUCTION false Must be true for the transport to run when APP_ENV is production.
SINK_STREAM unset An optional label sent with every message, which the MCP stream filter matches.
SINK_RETRY_ATTEMPTS 3 Attempts per send before it throws. Minimum 1.
SINK_RETRY_BASE_MS 200 Base delay for exponential backoff with jitter, in milliseconds.
SINK_TIMEOUT 15 Timeout for each attempt, in seconds.
SINK_MAX_MESSAGE_BYTES 10485760 Raw message size above which attachments are dropped, and then only headers are sent.

To change these from a config file instead, publish it with php artisan vendor:publish --tag=sink-client-config.