エージェントを強化
公開元自身のコマンドです。PlugMCP のエンドポイントではありません。
キーとログ付きでコピーをホスト。
npx -y [email protected]Claude Code にはローカルコマンド用のインストールリンクがありません。下のコマンドをコピーして、ターミナルで実行してください。
DATABASE_URL=<secret> VFS_AUTO_INIT=<value> VFS_SESSION_ID=<value> VFS_ENABLE_RLS=<value> claude mcp add io.github.lu-zhengda-virtual-fs -- npx -y mcp-virtual-fs@0.2.2ターミナルで実行します。
{ "mcpServers": { "io.github.lu-zhengda-virtual-fs": { "command": "npx", "args": [ "-y", "[email protected]" ], "env": { "DATABASE_URL": "<secret>", "VFS_AUTO_INIT": "<value>", "VFS_SESSION_ID": "<value>", "VFS_ENABLE_RLS": "<value>" } } }}claude_desktop_config.json
リモート URL か、手元のマシンのコマンドか 2 つのインストール方法の違い
PlugMCP で実行
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
起動An MCP server that provides AI agents with a persistent, PostgreSQL-backed virtual filesystem. Supports session-isolated file operations, cross-session shared stores, glob/grep search, and Row Level Security — all exposed as standard Model Context Protocol tools.
Works with any MCP client: Claude Desktop, Claude Code, Cursor, Windsurf, Cline, and others.
read, write, append, stat, ls, mkdir, rm, mv, glob, grep, stores**/*.ts) or search content by regex, powered by PostgreSQL trigram indexesVFS_AUTO_INIT=trueAgents work well with filesystems for context management, but coupling storage to the agent runtime means data is lost when pods restart or containers are recycled. This MCP server decouples storage from runtime by moving file operations to PostgreSQL — giving agents persistent, isolated, and searchable file storage without touching the host filesystem.
pg_trgm extension — included in most distributions)# Using Docker
docker run -d --name vfs-postgres \
-e POSTGRES_DB=vfs \
-e POSTGRES_PASSWORD=postgres \
-p 5432:5432 \
postgres:16-alpine
Add to your MCP client config (e.g., Claude Desktop claude_desktop_config.json or Claude Code .mcp.json):
{
"mcpServers": {
"virtual-fs": {
"command": "npx",
"args": ["-y", "mcp-virtual-fs"],
"env": {
"DATABASE_URL": "postgresql://postgres:postgres@localhost:5432/vfs",
"VFS_AUTO_INIT": "true"
}
}
}
}
That's it. VFS_AUTO_INIT=true creates the tables on first run.
Tool names are short POSIX-style names:
write({ path: "/notes/todo.md", content: "# My Tasks\n- Ship feature" })
read({ path: "/notes/todo.md" })
ls({ path: "/notes" })
glob({ pattern: "**/*.md" })
grep({ pattern: "TODO" })
All tools return structured JSON responses.
All tools (except stores) accept an optional store parameter for cross-session persistent storage.
Sessions are handled automatically — no session ID in tool parameters.
How it works:
Priority: transport sessionId > VFS_SESSION_ID env var > auto-generated UUID.
To resume a previous session across process restarts, set a deterministic session ID:
{
"env": {
"DATABASE_URL": "postgresql://...",
"VFS_SESSION_ID": "my-agent-session-1"
}
}
Named stores persist across sessions. Any session can read/write to a store by passing the store parameter:
// Session A writes to a store
write({ path: "/context.md", content: "project notes", store: "agent-memory" })
// Session B (days later) reads from the same store
read({ path: "/context.md", store: "agent-memory" })
// Without `store`, operations target the session's own namespace
write({ path: "/scratch.txt", content: "session-only data" })
// List all available stores
stores()
Stores are auto-created on first use.
If you prefer to manage the schema yourself instead of using VFS_AUTO_INIT:
psql $DATABASE_URL -f sql/schema.sql
RLS provides database-enforced session isolation. Even if application code has a bug that omits a WHERE session_id = clause, PostgreSQL itself prevents cross-session access.
# Run after schema.sql
psql $DATABASE_URL -f sql/rls.sql
# Update the vfs_app password
psql $DATABASE_URL -c "ALTER ROLE vfs_app PASSWORD 'your-secure-password'"
Then configure the MCP server to connect as vfs_app:
{
"env": {
"DATABASE_URL": "postgresql://vfs_app:your-secure-password@localhost:5432/vfs",
"VFS_ENABLE_RLS": "true"
}
}
git clone https://github.com/lu-zhengda/mcp-virtual-fs.git
cd mcp-virtual-fs
npm install
npm run build
Tests use testcontainers to spin up real PostgreSQL instances in Docker. No mocks — the integration tests exercise actual SQL queries, trigram indexes, and RLS policies.
# Requires Docker running
npm test
Ephemeral sessions can be cleaned up periodically:
DELETE FROM vfs_sessions
WHERE is_persistent = false
AND created_at < now() - interval '7 days';
The ON DELETE CASCADE on vfs_nodes handles file cleanup automatically. Persistent stores (created via the store parameter) are never affected.
MIT
PostgreSQL-backed virtual filesystem for agents: session isolation, shared stores, POSIX ops, RLS.
{ "mcpServers": { "io.github.lu-zhengda-virtual-fs": { "command": "npx", "args": [ "-y", "[email protected]" ], "env": { "DATABASE_URL": "<secret>", "VFS_AUTO_INIT": "<value>", "VFS_SESSION_ID": "<value>", "VFS_ENABLE_RLS": "<value>" } } }}ツール
ツール一覧はまだありません。リモートサーバーは、最初のヘルスチェック後に取得されます。
よくある質問
このページで Cursor、Claude Desktop、Claude Code、VS Code 用の stdio 設定をコピーできます。PlugMCP のプロキシではなく、公開元のインストール方法を使います。
公開元は次の環境変数を挙げています: DATABASE_URL, VFS_AUTO_INIT, VFS_SESSION_ID, VFS_ENABLE_RLS。
Virtual Filesystem は stdio 経由でローカル実行されます。
最終チェックは 2026-11-09 です。 PostgreSQL-backed virtual filesystem for agents: session isolation, shared stores, POSIX ops, RLS.