MCP Server Studio

Filelayer MCP server

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

Registry name: dev.filelayer/core

Publisher
filelayer.dev
Runs
Runs locally
Package
npm
Version
0.37.2
Category
Developer tools
Updated
2026-11-27

Source code on GitHub

Set up Filelayer (run locally)

Claude Desktop

Add to 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>"
      }
    }
  }
}

Claude Code

Run in your 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]

Cursor

Add to .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>"
      }
    }
  }
}

VS Code

Add to .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>"
      }
    }
  }
}

Windsurf

Add to ~/.codeium/windsurf/mcp_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>"
      }
    }
  }
}

Settings

NameRequiredWhat it is
DATABASE_URLYesYour own PostgreSQL, where this library keeps file ownership, grants and the audit chain. Apply node_modules/@filelayer/core/schema.sql once before starting.
FILELAYER_ASYesThe 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…
FILELAYER_ORGYesThe organisation this server is scoped to, in your own id space.
FILELAYER_DATA_DIRNoA 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…
S3_ENDPOINTNoAn 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_BUCKETNoThe 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…
S3_REGIONNoRegion, or `auto` for Cloudflare R2.
S3_ACCESS_KEY_IDNoAccess key id for the bucket.
S3_SECRET_ACCESS_KEYNoSecret access key for the bucket.
FILELAYER_MCP_AGENT_LABELNoHow 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…
FILELAYER_MCP_ALLOW_DESTRUCTIVENoSet 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_AUDITNoSet 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…
FILELAYER_MCP_RETURN_BYTESNoSet 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…
FILELAYER_BASE_URLNoThe base of the share URLs this instance mints. Without it, share links come back without a URL.

More developer tools MCP servers