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-mcpThe 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_URLEnv var· required· secretYour own PostgreSQL, where this library keeps file ownership, grants and the audit chain. Apply node_modules/@filelayer/core/schema.sql once before starting.FILELAYER_ASEnv var· requiredThe 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_ORGEnv var· requiredThe organisation this server is scoped to, in your own id space.S3_ACCESS_KEY_IDEnv var· optional· secretAccess key id for the bucket.S3_SECRET_ACCESS_KEYEnv var· optional· secretSecret access key for the bucket.FILELAYER_DATA_DIREnv var· optionalA 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 moreShow fewer
S3_ENDPOINTEnv var· optionalAn 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_BUCKETEnv var· optionalThe 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_REGIONEnv var· optionalRegion, or `auto` for Cloudflare R2.Default:autoFILELAYER_MCP_AGENT_LABELEnv var· optionalHow 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-mcpFILELAYER_MCP_ALLOW_DESTRUCTIVEEnv var· optionalSet 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:falseFILELAYER_MCP_EXPOSE_AUDITEnv var· optionalSet 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:falseFILELAYER_MCP_RETURN_BYTESEnv var· optionalSet 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:falseFILELAYER_BASE_URLEnv var· optionalThe base of the share URLs this instance mints. Without it, share links come back without a URL.
Links
Listed in the official MCP Registry since Nov 25, 2026. Mirrored daily; last checked Nov 26, 2026.