NestDaddy

Filelayer

dev.filelayer/core · v0.35.2

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

Connect Runs on your machine

Terminal
claude mcp add core -e DATABASE_URL=<DATABASE_URL> -e FILELAYER_AS=<FILELAYER_AS> -e FILELAYER_ORG=<FILELAYER_ORG> -e FILELAYER_DATA_DIR=<FILELAYER_DATA_DIR> -e S3_ENDPOINT=<S3_ENDPOINT> -e S3_BUCKET=<S3_BUCKET> -e S3_REGION=<S3_REGION> -e S3_ACCESS_KEY_ID=<S3_ACCESS_KEY_ID> -e S3_SECRET_ACCESS_KEY=<S3_SECRET_ACCESS_KEY> -e FILELAYER_MCP_AGENT_LABEL=<FILELAYER_MCP_AGENT_LABEL> -e FILELAYER_MCP_ALLOW_DESTRUCTIVE=<FILELAYER_MCP_ALLOW_DESTRUCTIVE> -e FILELAYER_MCP_EXPOSE_AUDIT=<FILELAYER_MCP_EXPOSE_AUDIT> -e FILELAYER_MCP_RETURN_BYTES=<FILELAYER_MCP_RETURN_BYTES> -e FILELAYER_BASE_URL=<FILELAYER_BASE_URL> -- npx -y @filelayer/[email protected]
claude_desktop_config.json
{
  "mcpServers": {
    "core": {
      "command": "npx",
      "args": [
        "-y",
        "@filelayer/[email protected]"
      ],
      "env": {
        "DATABASE_URL": "<DATABASE_URL>",
        "FILELAYER_AS": "<FILELAYER_AS>",
        "FILELAYER_ORG": "<FILELAYER_ORG>",
        "FILELAYER_DATA_DIR": "<FILELAYER_DATA_DIR>",
        "S3_ENDPOINT": "<S3_ENDPOINT>",
        "S3_BUCKET": "<S3_BUCKET>",
        "S3_REGION": "<S3_REGION>",
        "S3_ACCESS_KEY_ID": "<S3_ACCESS_KEY_ID>",
        "S3_SECRET_ACCESS_KEY": "<S3_SECRET_ACCESS_KEY>",
        "FILELAYER_MCP_AGENT_LABEL": "<FILELAYER_MCP_AGENT_LABEL>",
        "FILELAYER_MCP_ALLOW_DESTRUCTIVE": "<FILELAYER_MCP_ALLOW_DESTRUCTIVE>",
        "FILELAYER_MCP_EXPOSE_AUDIT": "<FILELAYER_MCP_EXPOSE_AUDIT>",
        "FILELAYER_MCP_RETURN_BYTES": "<FILELAYER_MCP_RETURN_BYTES>",
        "FILELAYER_BASE_URL": "<FILELAYER_BASE_URL>"
      }
    }
  }
}
~/.cursor/mcp.json
{
  "mcpServers": {
    "core": {
      "command": "npx",
      "args": [
        "-y",
        "@filelayer/[email protected]"
      ],
      "env": {
        "DATABASE_URL": "<DATABASE_URL>",
        "FILELAYER_AS": "<FILELAYER_AS>",
        "FILELAYER_ORG": "<FILELAYER_ORG>",
        "FILELAYER_DATA_DIR": "<FILELAYER_DATA_DIR>",
        "S3_ENDPOINT": "<S3_ENDPOINT>",
        "S3_BUCKET": "<S3_BUCKET>",
        "S3_REGION": "<S3_REGION>",
        "S3_ACCESS_KEY_ID": "<S3_ACCESS_KEY_ID>",
        "S3_SECRET_ACCESS_KEY": "<S3_SECRET_ACCESS_KEY>",
        "FILELAYER_MCP_AGENT_LABEL": "<FILELAYER_MCP_AGENT_LABEL>",
        "FILELAYER_MCP_ALLOW_DESTRUCTIVE": "<FILELAYER_MCP_ALLOW_DESTRUCTIVE>",
        "FILELAYER_MCP_EXPOSE_AUDIT": "<FILELAYER_MCP_EXPOSE_AUDIT>",
        "FILELAYER_MCP_RETURN_BYTES": "<FILELAYER_MCP_RETURN_BYTES>",
        "FILELAYER_BASE_URL": "<FILELAYER_BASE_URL>"
      }
    }
  }
}
.vscode/mcp.json
{
  "servers": {
    "core": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@filelayer/[email protected]"
      ],
      "env": {
        "DATABASE_URL": "<DATABASE_URL>",
        "FILELAYER_AS": "<FILELAYER_AS>",
        "FILELAYER_ORG": "<FILELAYER_ORG>",
        "FILELAYER_DATA_DIR": "<FILELAYER_DATA_DIR>",
        "S3_ENDPOINT": "<S3_ENDPOINT>",
        "S3_BUCKET": "<S3_BUCKET>",
        "S3_REGION": "<S3_REGION>",
        "S3_ACCESS_KEY_ID": "<S3_ACCESS_KEY_ID>",
        "S3_SECRET_ACCESS_KEY": "<S3_SECRET_ACCESS_KEY>",
        "FILELAYER_MCP_AGENT_LABEL": "<FILELAYER_MCP_AGENT_LABEL>",
        "FILELAYER_MCP_ALLOW_DESTRUCTIVE": "<FILELAYER_MCP_ALLOW_DESTRUCTIVE>",
        "FILELAYER_MCP_EXPOSE_AUDIT": "<FILELAYER_MCP_EXPOSE_AUDIT>",
        "FILELAYER_MCP_RETURN_BYTES": "<FILELAYER_MCP_RETURN_BYTES>",
        "FILELAYER_BASE_URL": "<FILELAYER_BASE_URL>"
      }
    }
  }
}

Replace the values in angle brackets with your own. Keys stay on your machine; we never see them.

Tools

This server runs locally, so its tools are listed by your MCP client once it starts.

Environment variables

NameDescription
DATABASE_URL
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
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…
FILELAYER_ORG
Required
The organisation this server is scoped to, in your own id space.
FILELAYER_DATA_DIR
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.
S3_ENDPOINT
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
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
Optional
Region, or `auto` for Cloudflare R2.
S3_ACCESS_KEY_ID
Optional, secret
Access key id for the bucket.
S3_SECRET_ACCESS_KEY
Optional, secret
Secret access key for the bucket.
FILELAYER_MCP_AGENT_LABEL
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".
FILELAYER_MCP_ALLOW_DESTRUCTIVE
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.
FILELAYER_MCP_EXPOSE_AUDIT
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 n…
FILELAYER_MCP_RETURN_BYTES
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.
FILELAYER_BASE_URL
Optional
The base of the share URLs this instance mints. Without it, share links come back without a URL.

Details

Package@filelayer/[email protected] (NPM, stdio)
First published3 Nov 2026
Last updated3 Nov 2026
Registry namedev.filelayer/core

More files and documents servers See all

Listing data from the official MCP registry. Status and tools from NestDaddy's daily check. Browse all MCP servers.