PostgreSQL-backed virtual filesystem exposed via MCP tools. Persistent, session-isolated file operations for AI agents.
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add virtual-filesystem --env DATABASE_URL='<DATABASE_URL>' -- npx -y mcp-virtual-fs~/.codex/config.toml
[mcp_servers.virtual-filesystem]
command = "npx"
args = ["-y", "mcp-virtual-fs"]
env = { DATABASE_URL = "<DATABASE_URL>" }
# codex mcp add virtual-filesystem --env DATABASE_URL='<DATABASE_URL>' -- npx -y mcp-virtual-fs~/.cursor/mcp.json
{
"mcpServers": {
"virtual-filesystem": {
"command": "npx",
"args": [
"-y",
"mcp-virtual-fs"
],
"env": {
"DATABASE_URL": "<DATABASE_URL>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"virtual-filesystem": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-virtual-fs"
],
"env": {
"DATABASE_URL": "<DATABASE_URL>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"virtual-filesystem": {
"command": "npx",
"args": [
"-y",
"mcp-virtual-fs"
],
"env": {
"DATABASE_URL": "<DATABASE_URL>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"virtual-filesystem": {
"command": "npx",
"args": [
"-y",
"mcp-virtual-fs"
],
"env": {
"DATABASE_URL": "<DATABASE_URL>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"virtual-filesystem": {
"command": "npx",
"args": [
"-y",
"mcp-virtual-fs"
],
"env": {
"DATABASE_URL": "<DATABASE_URL>"
}
}
}
}Environment variables
DATABASE_URL
Replace the placeholders with your own credentials and keep them out of version control.