PostgreSQL-backed virtual filesystem for AI agents with persistent, session-isolated storage.
Virtual MCP server exists for a simple reason — assistants are far more useful when they can act on Virtual directly instead of describing what you should do. PostgreSQL-backed virtual filesystem for AI agents with persistent, session-isolated storage.
Works with any MCP client: Claude Desktop, Claude Code, Cursor, Windsurf, Cline, and others.
Once Virtual is connected, these are the calls the assistant has available:
read — pathwrite — path, contentappend — path, contentstat — pathmkdir — pathglob — patterngrep — pattern, path_filter?stores — (none)Requirements — The Requirements tool exposed by this serverCommands — The Commands tool exposed by this serverTesting — Tests use testcontainers to spin up real PostgreSQL instances in Docker. No mocks — the integration testsYou will need 4 environment variables: DATABASE_URL, VFS_AUTO_INIT, VFS_SESSION_ID, VFS_ENABLE_RLS. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.
pg_trgm extension — included in most distributions)Installation goes through your MCP client rather than a global install: point it at npm on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.
Among the database access options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Virtual's toolset — read, write, append and 8 more — is a fair guide to whether it matches your workflow. It is maintained by lu-zhengda; worth a glance at recent repository activity before you build anything load-bearing on it.
SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.
| Tool | What it does |
|---|---|
| read | path |
| write | path, content |
| append | path, content |
| stat | path |
| mkdir | path |
| glob | pattern |
| grep | pattern, path_filter? |
| stores | *(none)* |
| Requirements | The Requirements tool exposed by this server. |
| Commands | The Commands tool exposed by this server. |
| Testing | Tests use [testcontainers](https://node.testcontainers.org/) to spin up real PostgreSQL instances in Docker. No mocks — the integration tests exercise actual SQL queries, trigram indexes, and RLS policies. |
{
"mcpServers": {
"virtual-fs": {
"command": "npx",
"args": ["-y", "npm"],
"env": {
"DATABASE_URL": "your-value",
"VFS_AUTO_INIT": "your-value",
"VFS_SESSION_ID": "your-value",
"VFS_ENABLE_RLS": "your-value"
}
}
}
}Add to claude_desktop_config.json, then restart Claude Desktop.
pg_trgm extension — included in most distributions)| Variable | Description | Required |
|---|---|---|
| DATABASE_URL | Endpoint or connection string the server talks to. | Yes |
| VFS_AUTO_INIT | Configuration value read at startup. | Optional |
| VFS_SESSION_ID | Configuration value read at startup. | Optional |
| VFS_ENABLE_RLS | Configuration value read at startup. | Optional |
Read-only SQL access to Postgres — let your assistant inspect schemas and answer questions from real data.
Manage your whole Supabase project in conversation — database, auth, storage, Edge Functions and branches.
Query, modify and analyse local SQLite databases in conversation — the fastest way to chat with a data file.
Metabase ships its own MCP endpoint — search your BI content, build and run queries, and save questions and dashboards without leaving the chat.
Official MongoDB server covering data, schemas and Atlas management — from find queries to spinning up clusters.
Serverless Postgres with database branching — point your assistant at Neon and let it work on disposable copies.