moab-files
v0.2.0
Published
MCP server for moab.tools Files (share.moab.tools) — manage shared files and static sites from an LLM.
Readme
moab-files — MCP server for the «Файлы» tool
Connect Claude Code (or any MCP client) to share.moab.tools and manage your files in natural language: upload files, share static sites, list/browse, move, rename, change retention, switch a folder between site and list mode, and delete.
The server is a thin local stdio client: it forwards each tool call to the files.moab.tools API with your Bearer token. No secrets live in the package — access is protected by Keycloak + per-owner isolation in the API.
Install
claude mcp add files --scope user -- npx -y moab-filesOn Windows, wrap with cmd /c (npx is a .cmd shim):
claude mcp add files --scope user -- cmd /c npx -y moab-files(files is just the local name — call it whatever you like. Requires Node.js 20+.)
Sign in
On your first operation the server asks you to sign in. Run the login tool — it returns a link and a short code; open the link in a browser, confirm via auth.moab.tools (the same corporate account as the portal lk.moab.tools), then repeat your request. The token refreshes automatically; you won't need to sign in again while the session is active.
auth_status— who is signed in.auth_logout— sign out (removes stored tokens).
Tools
| Tool | Purpose |
|---|---|
| list_files | list the root or a folder (shows name, size, upload date, retention) |
| get_breadcrumb | path (breadcrumbs) to a folder |
| upload_file | upload a local file → returns a public link |
| upload_site | upload a zip as a site/folder → returns a public link |
| create_folder | create a folder |
| set_ttl | change retention (lifetime) of a file or folder |
| rename_folder | rename a folder |
| move_item | move a file or folder |
| regenerate_link | reissue the public link (the old one stops working) |
| set_folder_mode | switch a folder between list and site mode (see below) |
| delete_item | delete a file or folder |
Folder modes: list ↔ site
A folder can be served two ways:
- list — its contents are shown as a list of files, each with its own public link.
- site — it is served as a website (requires
index.html/index.htmat the root;index.htmlis preferred). Switching to site drops the individual file/subfolder links — only the folder link remains.
set_folder_mode re-keys storage to switch between them. Going site → list preserves the subfolder structure (each file/subfolder gets its own link); going list → site needs an index.html/index.htm in the root.
Examples
Ask in plain language, e.g.:
- "upload report.pdf, keep it for 30 days, and give me the link"
- "upload the folder ./site as a website"
- "show my files"
- "make folder X a site" / "show folder X as a list"
- "delete the demo folder"
Configuration (env, optional)
| Variable | Default |
|---|---|
| FILES_API_BASE | https://files.moab.tools |
| KEYCLOAK_AUTHORITY | https://auth.moab.tools/realms/moab |
| KEYCLOAK_CLIENT | share-cli |
| MOAB_CONFIG_DIR | ~/.moab (tokens stored in ~/.moab/files-mcp/credentials.json) |
