Expand description
An MCP server confined to one folder (or a few named ones).
The operator names one or more root directories; the model gets seven tools (list, read,
search, stat, and with --writable also write, edit, move) over them and nothing
else. Confinement is enforced by
cap_std::fs::Dir: every file operation is a root-relative call on the opened root, and the
operating system refuses anything that resolves outside its root, symlinks included. Listing and
search use the ignore walker, so .gitignore and hidden files are honoured. The server is
read-only unless started with --writable; read-only, the mutating tools are not listed.
Built on emperor-mcp: stateless Streamable HTTP,
framed output, a doctor subcommand. stdio is available for desktop clients.
Re-exports§
pub use error::FolderError;pub use folder::Config;pub use folder::Folder;pub use folder::ReadOutput;pub use folder::RootSpec;pub use folder::WriteMode;pub use server::FolderServer;pub use server::default_allowed_hosts;pub use server::serve_http;pub use server::serve_stdio;
Modules§
- doctor
emperor-folder doctor: checks the root folders, the listen address and the tool budget before the server is started.- error
- Errors a tool can answer with. Every message is written for the model: it says what was wrong and, where there is one, what to do instead.
- folder
- The root folders and the seven operations on them.
- path
- Root-relative path handling.
- server
- The MCP surface: seven tools over one
Folder, served over Streamable HTTP (emperor-mcp) or stdio (rmcp).
Structs§
- Serve
Options - Options for
serve.