Omni-FS-MCP is an MCP server that supports managing multiple types of file systems, such as local FS, S3, R2, B2, WebDAV, and others, in one MCP server. It is built on top of OpenDAL.
Project description
Omni-FS MCP Server
Omni-FS-MCP is an MCP (Model Context Protocol) server that supports managing multiple types of file systems simultaneously, such as local FS, S3, R2, B2, WebDAV, and others, in one unified MCP server. It is built on top of OpenDAL and provides comprehensive multi-backend support.
Features
- Multiple Backend Support: Manage multiple file systems simultaneously (local, S3, WebDAV, etc.)
- Dual Transport Support: Supports both stdio and streamable-http transports
Installation
# Install using uv (recommended)
uv add omni-fs-mcp
# Or install using pip
pip install omni-fs-mcp
Quick Start
Single Backend Mode (Backward Compatible)
# Local filesystem
omni-fs-mcp-stdio "fs:///"
# S3
omni-fs-mcp-http "s3://bucket-name?region=us-east-1&access_key_id=xxx&secret_access_key=yyy"
# WebDAV
omni-fs-mcp-stdio "webdav://example.com/webdav?username=user&password=pass"
# Memory (for testing)
omni-fs-mcp-stdio "memory:///"
Multi-Backend Mode with Configuration
Create a configuration file (backends.json):
{
"backends": [
{
"name": "local",
"url": "fs:///",
"description": "Local filesystem access",
"default": true
},
{
"name": "s3-prod",
"url": "s3://my-bucket?region=us-east-1&access_key_id=AKIA...&secret_access_key=...",
"description": "Production S3 bucket",
"readonly": false
},
{
"name": "backup",
"url": "s3://backup-bucket?region=us-west-2&access_key_id=...",
"description": "Backup storage (read-only)",
"readonly": true
}
]
}
Start the server with the configuration:
# Stdio transport
omni-fs-mcp-stdio backends.json
# Or HTTP transport
omni-fs-mcp-http --config backends.json --port 8080
Available Tools
File Operations
All file operations support an optional backend parameter. If not specified, the default backend is used.
- list_files(path="/", backend=None) - List files and directories
- read_file(path, backend=None) - Read file contents as text
- write_file(path, content, backend=None) - Write content to a file
- copy_file(src, dst, src_backend=None, dst_backend=None) - Copy files (supports cross-backend)
- rename_file(src, dst, backend=None) - Rename or move files/directories
- create_dir(path, backend=None) - Create a directory
- stat_file(path, backend=None) - Get file/directory metadata
Backend Management
- register_backend(name, url, ...) - Register a new backend
- list_backends() - List all registered backends
- set_default_backend(name) - Set the default backend
- remove_backend(name, force=False) - Remove a backend
- check_backend_health(backend=None) - Check backend connectivity
- get_backend_stats() - Get backend statistics
Configuration
JSON Configuration Properties
- name (required): Unique backend identifier (alphanumeric, hyphens, underscores only)
- url (required): Backend connection URL
- description (optional): Human-readable description
- default (optional): Set as default backend (default: false)
- readonly (optional): Prevent write operations (default: false)
- timeout (optional): Connection timeout in seconds (default: 30)
- retry_attempts (optional): Retry attempts for failed operations (default: 3)
- validate_connection (optional): Validate connection during registration (default: true)
Supported Backends
Thanks to OpenDAL, this MCP server supports numerous storage backends:
| Backend Type | URL Scheme | Example URL |
|---|---|---|
| Local Filesystem | fs:// |
fs:/// |
| AWS S3 | s3:// |
s3://bucket?region=us-east-1&access_key_id=... |
| WebDAV | webdav:// |
webdav://server.com/path?username=user&password=pass |
| In-Memory | memory:// |
memory:/// |
| FTP | ftp:// |
ftp://server.com:21?username=user&password=pass |
| HTTP/HTTPS | http://, https:// |
https://files.example.com/api |
| And many more | Various | See OpenDAL documentation |
Usage Examples
Cross-Backend Operations
# Backup local file to S3
copy_file("/important/document.pdf", "/backups/document.pdf",
src_backend="local", dst_backend="s3-backup")
# Sync from production to staging
copy_file("/data/config.json", "/staging/config.json",
src_backend="s3-prod", dst_backend="s3-staging")
Backend Management
# Register a new backend at runtime
register_backend(
name="temp-storage",
url="memory:///",
description="Temporary in-memory storage",
set_as_default=False
)
# List all backends with their status
backends = list_backends()
# Check backend health
health = check_backend_health() # All backends
health = check_backend_health("s3-prod") # Specific backend
Development Workflow
# Work locally
write_file("/project/index.html", html_content, backend="local")
# Test and validate...
# Deploy to production
copy_file("/project/index.html", "/www/index.html",
src_backend="local", dst_backend="webdav-server")
Command Line Interface
General Command
# Stdio transport (default)
omni-fs-mcp [--config config.json] [url] --transport stdio
# HTTP transport
omni-fs-mcp [--config config.json] [url] --transport streamable-http --port 8080
Transport-Specific Commands
For stdio transport (local connections):
omni-fs-mcp-stdio [config.json|url]
For HTTP transport (remote connections):
omni-fs-mcp-http [--config config.json] [url] [--port 8080] [--host localhost]
Transport Modes
Stdio Transport
- Use case: Local integrations, development, CLI tools
- Advantages: Simple setup, no network configuration
- Communication: Standard input/output streams
Streamable HTTP Transport
- Use case: Remote connections, web applications, cloud deployments
- Advantages: Network accessible, scalable, cloud-friendly
- Communication: HTTP with bidirectional streaming
Advanced Features
Read-Only Backends
Prevent accidental modifications by configuring backends as read-only:
{
"name": "backup-storage",
"url": "s3://backup-bucket?...",
"readonly": true
}
Health Monitoring
The system provides comprehensive health monitoring:
- Connection validation during registration
- Real-time health checks via
check_backend_health() - Health status included in
list_backends()output - Automatic health updates during operations
Error Handling
Comprehensive error handling for:
- Configuration errors (invalid names, URLs, parameters)
- Connection errors (failed backend connections)
- Operation errors (file not found, permission denied, timeouts)
- Read-only violations
- Backend not found errors
Example Configurations
Development Environment
{
"backends": [
{
"name": "local-dev",
"url": "fs:///",
"description": "Local development files",
"default": true
},
{
"name": "memory-temp",
"url": "memory:///",
"description": "Temporary storage for testing"
}
]
}
Production Environment
{
"backends": [
{
"name": "app-data",
"url": "s3://production-app-data?region=us-east-1&access_key_id=...",
"description": "Production application data",
"default": true,
"timeout": 60,
"retry_attempts": 5
},
{
"name": "user-uploads",
"url": "s3://user-uploads-bucket?region=us-east-1&access_key_id=...",
"description": "User uploaded files"
},
{
"name": "backups",
"url": "s3://backup-storage?region=us-west-2&access_key_id=...",
"description": "Read-only backup storage",
"readonly": true
}
]
}
Development
# Clone the repository
git clone <repository-url>
cd omni-fs-mcp
# Install development dependencies
uv sync
# Run tests
uv run pytest
# Run the server in development
uv run omni-fs-mcp-stdio "memory:///"
# Test multi-backend setup
uv run omni-fs-mcp-stdio examples/demo_config.json
Security Considerations
- Credential Management: Store sensitive credentials securely, avoid hardcoding in config files
- Read-Only Configuration: Use read-only backends for sensitive or archived data
- Network Security: Use HTTPS/TLS for network-based backends when possible
- Access Control: Implement proper IAM policies for cloud storage backends
- Logging: Monitor backend access and operations for security auditing
Troubleshooting
Common Issues
-
Backend Registration Fails
- Check URL format and credentials
- Verify network connectivity
- Try with
validate_connection=falsefor testing
-
Cross-Backend Copy Fails
- Ensure both backends are healthy
- Check that destination backend is not read-only
- Verify file paths exist in source backend
-
Performance Issues
- Adjust timeout and retry_attempts for slow backends
- Use health checks to identify problematic backends
- Consider backend proximity for cross-backend operations
Debug Mode
Enable debug logging for detailed troubleshooting:
import logging
logging.basicConfig(level=logging.DEBUG)
Migration from Single Backend
The multi-backend server is fully backward compatible. To migrate:
- Existing single-backend commands continue to work unchanged
- Optionally create a configuration file for additional backends
- Gradually adopt multi-backend features as needed
License
This project is licensed under the MIT License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file omni_fs_mcp-0.1.7.tar.gz.
File metadata
- Download URL: omni_fs_mcp-0.1.7.tar.gz
- Upload date:
- Size: 13.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ae5454ec917599e518c20136a61f76afa41dac23ef481a989063b4e203dc0e1
|
|
| MD5 |
d7befb57f4c85296a8f5705eeb38fe54
|
|
| BLAKE2b-256 |
c484e6172b3ded2c333dc8775d2721439ae83a9f21177fd71407921a35e0145c
|
Provenance
The following attestation bundles were made for omni_fs_mcp-0.1.7.tar.gz:
Publisher:
release.yml on vaayne/omni-fs-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
omni_fs_mcp-0.1.7.tar.gz -
Subject digest:
2ae5454ec917599e518c20136a61f76afa41dac23ef481a989063b4e203dc0e1 - Sigstore transparency entry: 325465162
- Sigstore integration time:
-
Permalink:
vaayne/omni-fs-mcp@6e34a9885f11c5ff8601416462063aa64c46f024 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/vaayne
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6e34a9885f11c5ff8601416462063aa64c46f024 -
Trigger Event:
push
-
Statement type:
File details
Details for the file omni_fs_mcp-0.1.7-py3-none-any.whl.
File metadata
- Download URL: omni_fs_mcp-0.1.7-py3-none-any.whl
- Upload date:
- Size: 14.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88a8d55974d3602286492cb202c012da2cc3050885124f18920d5994aa7c27c9
|
|
| MD5 |
1a44c7bb2daf2bf6354609e39567cd46
|
|
| BLAKE2b-256 |
4dc8c7c665a0776fde29efd62e8624a4cd354e45ecb270e5d59f883588c0343f
|
Provenance
The following attestation bundles were made for omni_fs_mcp-0.1.7-py3-none-any.whl:
Publisher:
release.yml on vaayne/omni-fs-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
omni_fs_mcp-0.1.7-py3-none-any.whl -
Subject digest:
88a8d55974d3602286492cb202c012da2cc3050885124f18920d5994aa7c27c9 - Sigstore transparency entry: 325465188
- Sigstore integration time:
-
Permalink:
vaayne/omni-fs-mcp@6e34a9885f11c5ff8601416462063aa64c46f024 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/vaayne
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6e34a9885f11c5ff8601416462063aa64c46f024 -
Trigger Event:
push
-
Statement type: