Octofs
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@OctofsShow me the project structure"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
๐ Octofs
Give your AI assistant filesystem superpowers
Standalone Rust binary that exposes filesystem tools over the Model Context Protocol. Built on rmcp 3.0, tokio, and axum.
Installation ยท Quick Start ยท Features ยท Tools Reference ยท Architecture
MCP Registry: io.github.Muvon/octofs
Why Octofs?
Your AI coding assistant (Cursor, Claude, Windsurf, etc.) is smart โ but it's blind to your filesystem. Octofs bridges that gap, giving your AI:
Eyes โ Read files, search content, explore directories
Hands โ Create, edit, batch-modify files atomically
Context โ Execute commands, manage working directories
Reach โ Transparent SSH/SFTP: every file tool accepts
ssh://URLs
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ You: "Refactor all error handling to use anyhow::Context" โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ AI without Octofs: โ
โ โข "I can't see your project structure" โ
โ โข "Please paste the relevant files" โ
โ โข *Wastes 10 minutes on back-and-forth* โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ AI with Octofs: โ
โ โข Reads your codebase directly โ
โ โข Finds all error handling patterns โ
โ โข Suggests atomic batch edits โ
โ โข Applies changes with your approval โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโRelated MCP server: Freya MCP Server
What Makes It Different
Feature | Octofs | Typical Alternatives |
Implementation | Compiled Rust binary, no runtime | Python/Node script |
Content Search | Built-in search with context lines | String matching only |
Batch Operations | Atomic multi-edit on single file | One-at-a-time |
Line Modes | Hash-based (stable across edits) or number-based | Number-only |
Transport | STDIO + Streamable HTTP | STDIO only |
Shell Integration | Foreground + background process support | Limited or none |
Remote Files | Transparent SSH/SFTP on every file tool | None |
Safety | Gitignore-aware, stale-write detection, path validation | Full filesystem access |
Installation
Cargo (crates.io)
cargo install octofsHomebrew
brew install muvon/tap/octofsPre-built Binaries
Download from GitHub Releases for your platform:
Platform | Target |
Linux (x86_64) |
|
Linux (ARM64) |
|
Windows (x86_64) |
|
Windows (ARM64) |
|
macOS (Intel) |
|
macOS (Apple Silicon) |
|
MCP Registry
One-click install via the MCP Registry entry io.github.Muvon/octofs.
From Source
Requires Rust 1.95+.
git clone https://github.com/muvon/octofs
cd octofs
cargo build --release
# Binary at ./target/release/octofsQuick Start
1. Configure Your AI Assistant
The CLI uses a mcp subcommand โ your config must pass ["mcp"] as args.
Cursor (~/.cursor/mcp.json):
{
"mcpServers": {
"octofs": {
"command": "octofs",
"args": ["mcp"]
}
}
}Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"octofs": {
"command": "octofs",
"args": ["mcp"]
}
}
}Windsurf (~/.windsurf/mcp.json):
{
"mcpServers": {
"octofs": {
"command": "octofs",
"args": ["mcp"]
}
}
}If Octofs isn't on your
PATH, use the full path to the binary (e.g./usr/local/bin/octofsor./target/release/octofs).
2. Restart Your AI Assistant
The MCP server starts automatically when your AI assistant connects.
3. Try It
Ask your AI assistant to:
"Show me the project structure"
"Read the main.rs file"
"Search for all uses of
unwrap()in the codebase""Create a new file called
test.rs"
Features
๐ Filesystem Operations
View Files & Directories โ Read a single file (call
viewin parallel for several), list directories with glob patterns, search contentSmart Truncation โ Large files are truncated intelligently to avoid overwhelming context windows
Gitignore-Aware โ Respects
.gitignorepatterns during directory traversalLine Ranges โ Read specific line ranges with negative indexing (
-1= last line)Remote Files (SSH/SFTP) โ Every file tool accepts
ssh://user@host:port/pathURLs (see Remote Filesystem)
โ๏ธ Text Editing
Create Files โ Create new files with automatic parent directory creation
String Replace โ Replace exact string matches with fuzzy fallback for whitespace
Delete โ Remove a file (recoverable via undo)
Undo โ Revert last edit (up to 10 undo levels per file, in-memory)
Batch Edit โ Perform multiple insert/replace operations atomically on a single file
Stale-Write Protection โ Edits fail fast if the file changed on disk since it was last viewed (external-edit detection, like an IDE's "file changed on disk" guard)
๐ Code Intelligence
Content Search โ Search for strings within files with context lines
Line Extraction โ Copy specific line ranges from one file to another
๐ฅ๏ธ Shell & System
Command Execution โ Run shell commands with output capture
Background Processes โ Run long commands in background, get PID for later management
Working Directory โ Set/get/reset working directory context for operations
Configuration
Line Identifiers
Every line is addressed by a composite id N:hh โ its 1-indexed position plus a
2-character hex hash (FNV-1a) of its content. view renders lines as N:hh|content:
1:a3|fn main() {
2:f1| println!("Hello");
3:0e|}Edit tools take these ids back as targets and verify the hash against the file before applying anything. A stale id (the file changed since it was viewed) fails with the current content around the target and where the expected content moved โ so the model retargets from the error instead of re-reading the file. Edit results are diffs with fresh ids, so edits chain without re-viewing.
This is the single line-id format โ there is no mode switch. Plain line numbers
are still accepted where a position alone is safe: view ranges (negative counts
from the end) and the insert anchors 0 (file start) / -1 (append).
Shell Misuse Enforcement
Octofs detects shell misuse โ commands like cat, grep, find, or sed that
should use the dedicated MCP tools instead โ and rejects them with an error
explaining which tool to use. The call fails; nothing executes. This is
intentional and not configurable: the dedicated tools give the model line ids,
gitignore-awareness, and remote-host support that raw shell output cannot.
Pipelines (cargo build 2>&1 | grep error) remain allowed โ only standalone
invocations of those programs are blocked.
Other guidance (out-of-bounds ranges, fuzzy-match notices) is appended to successful responses as โ ๏ธ hints without failing the call.
Transport Modes
STDIO (default)
Standard input/output transport. Works with all MCP clients.
octofs mcpHTTP
Streamable HTTP transport for remote access or multi-client scenarios.
octofs mcp --bind 0.0.0.0:12345Connect clients to http://localhost:12345/mcp.
Working Directory
By default, Octofs operates in the current directory. Specify a different root:
{
"mcpServers": {
"octofs": {
"command": "octofs",
"args": ["mcp", "--path", "/path/to/your/project"]
}
}
}Remote Filesystem (SSH/SFTP)
All path parameters โ and --path itself โ accept ssh:// or sftp:// URLs:
# Remote session root: relative paths resolve on the remote host
octofs mcp --path ssh://deploy@example.com/var/www/app --ssh-key ~/.ssh/id_ed25519view path="ssh://deploy@example.com/etc/nginx/nginx.conf"Authentication โ fully automatic, like OpenSSH, honoring
~/.ssh/config: the agent your config names for the host (IdentityAgent, e.g. 1Password) or$SSH_AUTH_SOCK, then key files โ--ssh-keyif given, the host'sIdentityFileentries, then the defaults in~/.ssh(id_ed25519,id_ecdsa). If plainssh hostworks on your machine, octofs works too โ nothing to configure. Passphrase-protected key files are not supported directly; use an agent instead.RSA keys are not supported โ the Rust
rsacrate has an unfixed timing side-channel (Marvin attack, RUSTSEC-2023-0071), so octofs is built without RSA entirely. Use an ed25519 key instead (ssh-keygen -t ed25519); ecdsa also works. RSA-only setups fail with a clear error naming the key.Host keys โ verified against
~/.ssh/known_hostswith the OpenSSHaccept-newpolicy: unknown hosts are recorded on first use, a changed key fails closed.--ssh-timeout SECSโ connection timeout (default 30). Connections are pooled per host, kept alive with transport keepalives, and reconnected automatically if they drop.shellstays local โ commands always run on the machine where Octofs runs; only file tools (view,text_editor,batch_edit,extract_lines,workdir) reach remote hosts.
MCP Tools Reference
view โ Read files, list directories, search content
File reading: (path is a single path; start/end are line numbers or line ids)
{"path": "src/main.rs"} // whole file
{"path": "src/main.rs", "start": 10, "end": 20} // lines 10โ20
{"path": "src/main.rs", "start": 42, "end": 42} // single line
{"path": "src/main.rs", "start": 80} // line 80 โ end of file
{"path": "src/main.rs", "start": -20} // last 20 lines
{"path": "src/main.rs", "start": "12:a3", "end": "20:f1"} // line ids from prior outputOutput renders every line as N:hh|content โ the N:hh prefix is the line id
that batch_edit and extract_lines take as targets.
To read several files, make multiple view calls โ they run in parallel.
Directory listing:
{"path": "src/"}
{"path": "src/", "pattern": "*.rs"}
{"path": "src/", "max_depth": 2, "include_hidden": true}pattern is a glob, not a content search: without / it matches the whole filename at any depth; with / it matches the workdir-relative path. It supports *, ?, character classes such as [abc], and | alternatives such as *.rs|*.toml.
Content search: (literal by default; set regex: true for a Rust regex, (?i) = case-insensitive)
{"path": "src", "content": "fn main"}
{"path": "src", "content": "unwrap()", "context": 3}
{"path": "src", "content": "(?i)error", "regex": true}Directory listings annotate each file as path<TAB>NL<TAB>~Nt (line count + estimated tokens) so you can budget reads before opening files; binary files show path<TAB>(binary).
text_editor โ Create, edit, replace text
Create file:
{"command": "create", "path": "src/new.rs", "content": "pub fn new() {}"}Replace string: (old_text must match exactly once)
{
"command": "str_replace",
"path": "src/main.rs",
"old_text": "fn old()",
"new_text": "fn new()"
}Replace ALL occurrences (rename-style edits):
{
"command": "str_replace",
"path": "src/main.rs",
"old_text": "old_name",
"new_text": "new_name",
"replace_all": true
}Matching is progressive: exact โ escaped-literal recovery (double-escaped \n/\t
interpreted when the result matches uniquely) โ whitespace-normalized fuzzy with
indentation adjustment โ rich diagnostics with the closest candidates and their
line ids. CRLF files are matched in LF space and keep their line endings on write.
Delete file: (recoverable with undo_edit)
{"command": "delete", "path": "src/old.rs"}Undo last edit:
{"command": "undo_edit", "path": "src/main.rs"}batch_edit โ Atomic multi-operation edits
Perform multiple insert/replace operations on a single file atomically.
Each operation has a start. For replace it's the first line of the range as a
line id copied from view output (add end for a range; omit it for a single
line). For insert it's the anchor to insert after โ a line id, or the integers
0 (file start) / -1 (after last line). Every id is verified against the file
before anything applies; a stale id fails with the current content so the model
can retarget without a re-view. The result is a diff with fresh ids.
Insert at beginning:
{
"path": "src/main.rs",
"operations": [
{"operation": "insert", "start": 0, "content": "// Header\n"}
]
}Replace lines:
{
"path": "src/main.rs",
"operations": [
{"operation": "replace", "start": "10:4b", "end": "15:c2", "content": "new code here"}
]
}extract_lines โ Copy lines between files
{
"from_path": "src/utils.rs",
"from_start": 10,
"from_end": 25,
"append_path": "src/new.rs",
"append_line": -1
}from_end is optional (omit to copy a single line). from_start, from_end, and
append_line each accept a line number or a line id ("12:a3", verified against
the file). append_line positions the copy in the target: 0 = beginning,
-1 = end, N = after line N.
shell โ Execute commands
Foreground:
{"command": "cargo test"}
{"command": "cd foo && cargo build"}Background:
{"command": "python -m http.server 8000", "background": true}
// Returns PID; the response includes the platform-specific kill commandOn Windows, shutdown cleanup terminates only direct child processes (no Unix process-group semantics); use
taskkill /PID <pid> /Tfor process trees.
workdir โ Manage working directory
Get current:
{}Set new:
{"path": "/path/to/project"}Reset to session root:
{"reset": true}Architecture
octofs/
โโโ src/
โ โโโ main.rs # Entry point, STDIO/HTTP server setup, signal handling
โ โโโ cli.rs # CLI argument parsing (clap): octofs mcp [OPTIONS]
โ โโโ mcp/
โ โ โโโ mod.rs # McpToolCall, SessionRoot
โ โ โโโ server.rs # OctofsServer (rmcp tool impl), Params structs, SessionWorkdir
โ โ โโโ request_ctx.rs # Per-request hint queue + stale-file stamps
โ โ โโโ fs/ # Filesystem tool implementations
โ โ โโโ mod.rs # Re-exports
โ โ โโโ core.rs # view, text_editor, batch_edit, extract_lines
โ โ โโโ file_ops.rs # view_file_spec, create_file_spec
โ โ โโโ text_editing.rs # str_replace, batch_edit, undo, per-file locking
โ โ โโโ directory.rs # Directory listing + content search
โ โ โโโ search.rs # search_content
โ โ โโโ shell.rs # Command execution, background, process cleanup
โ โ โโโ workdir.rs # Working directory management
โ โ โโโ remote.rs # SSH/SFTP path abstraction, SshHandler, SFTP pool
โ โ โโโ fs_tests.rs # Integration tests (cfg(test))
โ โโโ utils/
โ โโโ mod.rs # Module re-exports
โ โโโ line_hash.rs # Composite line ids (N:hh), FNV-1a hashes, endpoint parsing
โ โโโ truncation.rs # Token estimation, smart truncationKey design decisions:
rmcp SDK โ Official Rust MCP SDK (
rmcp3.0) for protocol handlingTokio โ Async runtime; all file I/O uses
tokio::fs, never blockingstd::fsFile locking โ Per-file
tokio::sync::Mutexprevents concurrent write conflictsUndo history โ Up to 10 snapshots per file, in-memory (lost on restart)
Path resolution โ Relative paths resolve against the session workdir; no canonicalization (files may not exist yet)
Stale-write detection โ every edit target's
N:hhid is verified against the file at apply time; a stale id fails with the current content instead of editing the wrong line
Development
# Build
cargo build --release
# Run tests
cargo test
# Lint (zero warnings policy)
cargo clippy
# Format
cargo fmt
# Run locally
cargo run -- mcpRunning Tests
# All tests
cargo test
# Specific test
cargo test test_view_file
# With output
cargo test -- --nocaptureContributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
Quick checklist:
Run
cargo fmtbefore committingEnsure
cargo clippypasses with zero warningsAdd tests for new functionality
Update documentation as needed
Security
See SECURITY.md for security policy and reporting vulnerabilities.
License
Apache-2.0 โ See LICENSE
Acknowledgments
rmcp โ Official Rust MCP SDK
Model Context Protocol โ The protocol specification
Built with ๐ฆ by Muvon
Star us on GitHub if Octofs helps you ship faster! โญ
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceHigh-performance MCP server giving AI agents advanced filesystem and automation capabilities on Windows, with 26 tools across file I/O, search, Git, process management, and more.262MIT
- Flicense-qualityCmaintenanceA powerful filesystem MCP server for AI agents with extensive system access, including filesystem operations, shell execution, Windows tools, reverse engineering, code intelligence, and agent orchestration.1
- Alicense-qualityCmaintenanceAn MCP server that gives AI agents file system access: read, write, search, hash, directory trees โ 12 tools, zero dependencies, pure Python stdlib.MIT
- FlicenseAqualityCmaintenanceAn MCP server that exposes filesystem operations โ listing directories, reading, writing, and searching files โ as tools an LLM can discover and invoke at runtime.4
Related MCP Connectors
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
Person-owned, portable AI memory as a remote MCP server, readable and writable by any MCP client.
An MCP server that gives your AI access to the source code and docs of all public github repos
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Muvon/octofs'
If you have feedback or need assistance with the MCP directory API, please join our Discord server