Skip to main content

Filelayer

dev.filelayer/core

v0.37.0Updated Nov 25, 2026stdio · npm

User files for a SaaS, under one person's authority: list, share with an expiry, revoke.

Install

Needs 1 secret. Replace 3 placeholders with your own values.

Run in your terminal. Replace 3 placeholders.

claude mcp add core -e 'DATABASE_URL=<your-database-url>' -e 'FILELAYER_AS=<your-filelayer-as>' -e 'FILELAYER_ORG=<your-filelayer-org>' -e S3_REGION=auto -e FILELAYER_MCP_AGENT_LABEL=filelayer-mcp -e FILELAYER_MCP_ALLOW_DESTRUCTIVE=false -e FILELAYER_MCP_EXPOSE_AUDIT=false -e FILELAYER_MCP_RETURN_BYTES=false -- npx -y @filelayer/[email protected] @filelayer/core pg @modelcontextprotocol/sdk zod filelayer-mcp

The registry lists extra launch arguments or environment variables for this server that could change what runs. They are left out here; check its repository before adding any.

Configuration

14 settings, 1 required secret. Snippets use placeholders; keep real values out of shared config.

  • DATABASE_URL
    Env var· required· secret
    Your own PostgreSQL, where this library keeps file ownership, grants and the audit chain. Apply node_modules/@filelayer/core/schema.sql once before starting.
  • FILELAYER_AS
    Env var· required
    The ONE subject this server speaks for, in your own id space. Fixed for the life of the process: no tool reads it as an argument and no tool can change it, which is the only reason exposing these tools to an agent is safe. Write it yourself or have your provisioning write it, never derive it from a conversation. Serving several people means starting several servers.
  • FILELAYER_ORG
    Env var· required
    The organisation this server is scoped to, in your own id space.
  • S3_ACCESS_KEY_ID
    Env var· optional· secret
    Access key id for the bucket.
  • S3_SECRET_ACCESS_KEY
    Env var· optional· secret
    Secret access key for the bucket.
  • FILELAYER_DATA_DIR
    Env var· optional
    A local directory for the bytes. Needs no bucket and no IAM user. Set this OR the S3_* block: with neither, the server refuses to start rather than falling back to memory, which would work in a demo and lose the first real file.
Show 8 more
  • S3_ENDPOINT
    Env var· optional
    An S3-compatible endpoint, for example https://<account>.r2.cloudflarestorage.com. Setting it makes S3_BUCKET, S3_ACCESS_KEY_ID and S3_SECRET_ACCESS_KEY required.
  • S3_BUCKET
    Env var· optional
    The bucket. It must be private: this library decides who may be GIVEN a URL and has no say in who the object store will answer. `npx -p @filelayer/core filelayer doctor` reports whether yours serves unauthenticated reads.
  • S3_REGION
    Env var· optional
    Region, or `auto` for Cloudflare R2.Default: auto
  • FILELAYER_MCP_AGENT_LABEL
    Env var· optional
    How this agent names itself in the audit trail, recorded on every event these tools produce. It is what lets the chain separate "the partner opened this document" from "the partner's assistant opened this document".Default: filelayer-mcp
  • FILELAYER_MCP_ALLOW_DESTRUCTIVE
    Env var· optional
    Set to exactly `true` to register delete_file. Off by default because deleting is not recoverable and an agent that misreads a sentence deletes the wrong thing silently.Default: false
  • FILELAYER_MCP_EXPOSE_AUDIT
    Env var· optional
    Set to exactly `true` to register file_audit. Off by default because the trail is an organisation's whole history and a tool that returns it copies every file name, actor and denial into the model's context. Reading it is itself audited since 0.27.0, which was the previous reason; the default did not move.Default: false
  • FILELAYER_MCP_RETURN_BYTES
    Env var· optional
    Set to exactly `true` to register read_file. Off by default because a document returned by a tool is a document copied into a model's context; file_info plus a share link is usually what was actually needed.Default: false
  • FILELAYER_BASE_URL
    Env var· optional
    The base of the share URLs this instance mints. Without it, share links come back without a URL.

Listed in the official MCP Registry since Nov 25, 2026. Mirrored daily; last checked Nov 26, 2026.