Uses Pydantic models for all requests and responses in the virtual filesystem operations, providing type-safe data validation and serialization.
Implemented in Python with full async/await support, providing programmatic access to virtual filesystem workspaces and file operations.
Provides SQLite as a storage provider option for persistent virtual filesystem workspaces, enabling portable database-backed file storage.
chuk-mcp-vfs
MCP server providing virtual filesystem workspaces via the unified namespace architecture.
Features
✅ Unified Architecture - Built on chuk-artifacts namespace system ✅ Context-Aware - Automatic user/session scoping from MCP context ✅ Storage Scopes - SESSION (ephemeral), USER (persistent), SANDBOX (shared) ✅ Pydantic Native - All requests and responses use Pydantic models ✅ Async Native - Fully async/await throughout ✅ Type Safe - Enums and constants instead of magic strings ✅ Multiple Workspaces - Create and manage isolated virtual filesystems ✅ Full VFS Operations - read, write, ls, tree, mkdir, rm, mv, cp, cd, pwd, find, grep ✅ Checkpoints - Save and restore filesystem state at any point ✅ MCP Integration - Expose all operations as MCP tools for AI agents
Architecture
Key Concepts:
Everything is VFS: Both blobs and workspaces are VFS-backed via namespaces
Scopes: SESSION (per-conversation), USER (per-user persistent), SANDBOX (shared)
Context-Aware: user_id and session_id automatically from MCP server context
Grid Architecture: All namespaces stored in unified grid structure
Installation
Quick Start
As MCP Server
Programmatic Usage
MCP Tools
Workspace Management
Tool | Description |
| Create new workspace with provider (memory, filesystem, sqlite, s3) |
| Delete workspace and clean up resources |
| List all workspaces |
| Switch active workspace |
| Get workspace details |
| Mount workspace via FUSE (planned) |
| Unmount workspace (planned) |
File Operations
Tool | Description |
| Read file contents |
| Write file with content |
| List directory contents |
| Show directory tree structure |
| Create directory |
| Remove file/directory (with recursive option) |
| Move/rename file/directory |
| Copy file/directory (with recursive option) |
Navigation
Tool | Description |
| Change current working directory |
| Print working directory |
| Find files by glob pattern |
| Search file contents |
Checkpoints
Tool | Description |
| Create checkpoint of current state |
| Restore from checkpoint |
| List all checkpoints |
| Delete checkpoint |
Usage with Claude Desktop
Add to claude_desktop_config.json:
Then you can use natural language to interact with the filesystem:
Examples
See examples/basic_usage.py for a complete working example.
Storage Scopes
The unified architecture provides three storage scopes:
SESSION Scope (Ephemeral)
Lifetime: Expires when session ends
Perfect for: Temporary workspaces, caches, current work
Grid path:
grid/{sandbox}/sess-{session_id}/{namespace_id}Access: Only accessible from same session
USER Scope (Persistent)
Lifetime: Persists across sessions
Perfect for: User projects, personal data
Grid path:
grid/{sandbox}/user-{user_id}/{namespace_id}Access: Accessible from any session for the same user
SANDBOX Scope (Shared)
Lifetime: Persists indefinitely
Perfect for: Templates, shared docs, libraries
Grid path:
grid/{sandbox}/shared/{namespace_id}Access: Accessible by all users
Provider Types
Models (Pydantic)
All requests and responses are Pydantic models:
Development
Architecture Details
Workspace Manager
Thin wrapper around chuk-artifacts ArtifactStore
Each workspace is a WORKSPACE-type namespace
Tracks current working directory per workspace
Context-aware: automatically uses user_id/session_id from MCP context
Thread-safe workspace operations
Namespace Integration
All workspaces stored in unified grid architecture
Automatic scope-based isolation (SESSION/USER/SANDBOX)
Namespaces provide VFS instances via
get_namespace_vfs()Grid paths make ownership and scope explicit
Checkpoint Manager
Wraps
chuk-virtual-fsAsyncSnapshotManagerProvides workspace-scoped checkpoints
Metadata tracking for each checkpoint
VFS Tools
Wraps async VFS operations with Pydantic models
Path resolution relative to current working directory
Error handling and validation
MCP Integration
Registers all tools with
chuk-mcp-serverAutomatic JSON schema generation from Pydantic models
Context variables for user/session tracking
Stdio transport for Claude Desktop
Roadmap
Core VFS operations
Workspace management
Checkpoint system
Pydantic models
Basic tests
FUSE mounting implementation
Template system integration
Workspace import/export
File watching
Permissions system
Comprehensive tests
License
MIT - see LICENSE file
Contributing
Contributions welcome! Please ensure:
All code uses Pydantic models (no dict returns)
All code is async native
Use enums/constants instead of magic strings
Add tests for new features
Update documentation
Credits
Built on top of:
chuk-artifacts - Unified namespace architecture
chuk-virtual-fs - Virtual filesystem engine
chuk-mcp-server - MCP framework with context management
This server cannot be installed