Install
Add to ~/Library/Application Support/Claude/claude_desktop_config.json
Windows / Linux path
%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json{
"mcpServers": {
"dev-filelayer-core": {
"command": "npx",
"args": [
"-y",
"@filelayer/core"
],
"env": {
"DATABASE_URL": "<YOUR_VALUE>",
"FILELAYER_AS": "<VALUE>",
"FILELAYER_ORG": "<VALUE>",
"FILELAYER_DATA_DIR": "<VALUE>",
"S3_ENDPOINT": "<VALUE>",
"S3_BUCKET": "<VALUE>",
"S3_REGION": "auto",
"S3_ACCESS_KEY_ID": "<YOUR_VALUE>",
"S3_SECRET_ACCESS_KEY": "<YOUR_VALUE>",
"FILELAYER_MCP_AGENT_LABEL": "filelayer-mcp",
"FILELAYER_MCP_ALLOW_DESTRUCTIVE": "false",
"FILELAYER_MCP_EXPOSE_AUDIT": "false",
"FILELAYER_MCP_RETURN_BYTES": "false",
"FILELAYER_BASE_URL": "<VALUE>"
}
}
}
}
Restart Claude Desktop to activate the new server.
Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
Windows / Linux path
.cursor\mcp.json (project) or %USERPROFILE%\.cursor\mcp.json (global).cursor/mcp.json (project) or ~/.cursor/mcp.json (global){
"mcpServers": {
"dev-filelayer-core": {
"command": "npx",
"args": [
"-y",
"@filelayer/core"
],
"env": {
"DATABASE_URL": "<YOUR_VALUE>",
"FILELAYER_AS": "<VALUE>",
"FILELAYER_ORG": "<VALUE>",
"FILELAYER_DATA_DIR": "<VALUE>",
"S3_ENDPOINT": "<VALUE>",
"S3_BUCKET": "<VALUE>",
"S3_REGION": "auto",
"S3_ACCESS_KEY_ID": "<YOUR_VALUE>",
"S3_SECRET_ACCESS_KEY": "<YOUR_VALUE>",
"FILELAYER_MCP_AGENT_LABEL": "filelayer-mcp",
"FILELAYER_MCP_ALLOW_DESTRUCTIVE": "false",
"FILELAYER_MCP_EXPOSE_AUDIT": "false",
"FILELAYER_MCP_RETURN_BYTES": "false",
"FILELAYER_BASE_URL": "<VALUE>"
}
}
}
}
Cursor usually picks up config changes automatically; if the server does not appear, reload the window.
Add to .mcp.json (project) or ~/.claude.json (global)
Windows / Linux path
.mcp.json (project) or %USERPROFILE%\.claude.json (global).mcp.json (project) or ~/.claude.json (global){
"mcpServers": {
"dev-filelayer-core": {
"command": "npx",
"args": [
"-y",
"@filelayer/core"
],
"env": {
"DATABASE_URL": "<YOUR_VALUE>",
"FILELAYER_AS": "<VALUE>",
"FILELAYER_ORG": "<VALUE>",
"FILELAYER_DATA_DIR": "<VALUE>",
"S3_ENDPOINT": "<VALUE>",
"S3_BUCKET": "<VALUE>",
"S3_REGION": "auto",
"S3_ACCESS_KEY_ID": "<YOUR_VALUE>",
"S3_SECRET_ACCESS_KEY": "<YOUR_VALUE>",
"FILELAYER_MCP_AGENT_LABEL": "filelayer-mcp",
"FILELAYER_MCP_ALLOW_DESTRUCTIVE": "false",
"FILELAYER_MCP_EXPOSE_AUDIT": "false",
"FILELAYER_MCP_RETURN_BYTES": "false",
"FILELAYER_BASE_URL": "<VALUE>"
}
}
}
}
The server will be available in the next Claude Code session.
Add to .vscode/mcp.json
Windows / Linux path
.vscode\mcp.json.vscode/mcp.json{
"servers": {
"dev-filelayer-core": {
"command": "npx",
"args": [
"-y",
"@filelayer/core"
],
"env": {
"DATABASE_URL": "<YOUR_VALUE>",
"FILELAYER_AS": "<VALUE>",
"FILELAYER_ORG": "<VALUE>",
"FILELAYER_DATA_DIR": "<VALUE>",
"S3_ENDPOINT": "<VALUE>",
"S3_BUCKET": "<VALUE>",
"S3_REGION": "auto",
"S3_ACCESS_KEY_ID": "<YOUR_VALUE>",
"S3_SECRET_ACCESS_KEY": "<YOUR_VALUE>",
"FILELAYER_MCP_AGENT_LABEL": "filelayer-mcp",
"FILELAYER_MCP_ALLOW_DESTRUCTIVE": "false",
"FILELAYER_MCP_EXPOSE_AUDIT": "false",
"FILELAYER_MCP_RETURN_BYTES": "false",
"FILELAYER_BASE_URL": "<VALUE>"
}
}
}
}
Reload the VS Code window to activate.
Add to ~/.codeium/windsurf/mcp_config.json
Windows / Linux path
%USERPROFILE%\.codeium\windsurf\mcp_config.json~/.codeium/windsurf/mcp_config.json{
"mcpServers": {
"dev-filelayer-core": {
"command": "npx",
"args": [
"-y",
"@filelayer/core"
],
"env": {
"DATABASE_URL": "<YOUR_VALUE>",
"FILELAYER_AS": "<VALUE>",
"FILELAYER_ORG": "<VALUE>",
"FILELAYER_DATA_DIR": "<VALUE>",
"S3_ENDPOINT": "<VALUE>",
"S3_BUCKET": "<VALUE>",
"S3_REGION": "auto",
"S3_ACCESS_KEY_ID": "<YOUR_VALUE>",
"S3_SECRET_ACCESS_KEY": "<YOUR_VALUE>",
"FILELAYER_MCP_AGENT_LABEL": "filelayer-mcp",
"FILELAYER_MCP_ALLOW_DESTRUCTIVE": "false",
"FILELAYER_MCP_EXPOSE_AUDIT": "false",
"FILELAYER_MCP_RETURN_BYTES": "false",
"FILELAYER_BASE_URL": "<VALUE>"
}
}
}
}
Restart Windsurf (or refresh its MCP servers panel) to activate the new server.
Windsurf Next uses ~/.codeium/windsurf-next/mcp_config.json. Devin Desktop (the Windsurf rebrand) uses ~/.config/devin/mcp_config.json and imports the Windsurf file.
Add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
Windows / Linux path
%APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json{
"mcpServers": {
"dev-filelayer-core": {
"command": "npx",
"args": [
"-y",
"@filelayer/core"
],
"env": {
"DATABASE_URL": "<YOUR_VALUE>",
"FILELAYER_AS": "<VALUE>",
"FILELAYER_ORG": "<VALUE>",
"FILELAYER_DATA_DIR": "<VALUE>",
"S3_ENDPOINT": "<VALUE>",
"S3_BUCKET": "<VALUE>",
"S3_REGION": "auto",
"S3_ACCESS_KEY_ID": "<YOUR_VALUE>",
"S3_SECRET_ACCESS_KEY": "<YOUR_VALUE>",
"FILELAYER_MCP_AGENT_LABEL": "filelayer-mcp",
"FILELAYER_MCP_ALLOW_DESTRUCTIVE": "false",
"FILELAYER_MCP_EXPOSE_AUDIT": "false",
"FILELAYER_MCP_RETURN_BYTES": "false",
"FILELAYER_BASE_URL": "<VALUE>"
}
}
}
}
Cline reloads cline_mcp_settings.json automatically; if the server does not appear, reload the VS Code window.
Open it from Cline's MCP Servers panel → Configure. Roo Code uses a different file and format.
Configuration
Environment variables this server reads. Secrets stay on your machine.
| Name | Required | Description |
|---|---|---|
| DATABASE_URL secret | Yes | 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 | Yes | 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 | Yes | The organisation this server is scoped to, in your own id space. |
| FILELAYER_DATA_DIR | No | 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 | No | 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 | No | 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 | No | Region, or `auto` for Cloudflare R2. Default: auto |
| S3_ACCESS_KEY_ID secret | No | Access key id for the bucket. |
| S3_SECRET_ACCESS_KEY secret | No | Secret access key for the bucket. |
| FILELAYER_MCP_AGENT_LABEL | No | 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 | No | 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 | No | 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 | No | 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 | No | The base of the share URLs this instance mints. Without it, share links come back without a URL. |