Virtual Filesystem

v0.2.2
io.github.lu-zhengda/virtual-fs Checked 2 days ago Published 9 months ago

PostgreSQL-backed virtual filesystem for agents: session isolation, shared stores, POSIX ops, RLS.

Values you need

VariableWhat it is
DATABASE_URLrequired secret PostgreSQL connection string (e.g. postgresql://user:pass@host:5432/dbname)
VFS_AUTO_INIToptional Auto-create database tables on startup (set to 'true' for first run)
VFS_SESSION_IDoptional Deterministic session ID for resumable sessions across restarts
VFS_ENABLE_RLSoptional Enable PostgreSQL Row Level Security for database-enforced session isolation

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add virtual-fs -e 'DATABASE_URL=<DATABASE_URL>' -- npx -y mcp-virtual-fs@0.2.2
Add to claude_desktop_config.json
{
  "mcpServers": {
    "virtual-fs": {
      "args": [
        "-y",
        "mcp-virtual-fs@0.2.2"
      ],
      "command": "npx",
      "env": {
        "DATABASE_URL": "<DATABASE_URL>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "virtual-fs": {
      "args": [
        "-y",
        "mcp-virtual-fs@0.2.2"
      ],
      "command": "npx",
      "env": {
        "DATABASE_URL": "<DATABASE_URL>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "DATABASE_URL",
      "id": "database-url",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "virtual-fs": {
      "args": [
        "-y",
        "mcp-virtual-fs@0.2.2"
      ],
      "command": "npx",
      "env": {
        "DATABASE_URL": "${input:database-url}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.virtual-fs]
command = "npx"
args = ["-y", "mcp-virtual-fs@0.2.2"]
env = { "DATABASE_URL" = "<DATABASE_URL>" }

For AI agents

  1. Ask the user for: DATABASE_URL. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: read, write, append, stat, ls, mkdir, rm, mv, ….
  5. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json