TheFile.Ninja

Manual · MCP · 0.1.6

Asistentes de IA en la aplicación (MCP)

Claude Code, Cursor u otro asistente usa TheFile.Ninja como su gestor de archivos: todos los lugares a los que llega la aplicación, tus paneles como contexto, y cada cambio se puede deshacer.

El manual está en inglés.

What it is

An AI assistant — Claude Code, Claude Desktop, Cursor, any client of the Model Context Protocol — gets TheFile.Ninja as its file manager. It sees what your panes show, lists and searches every place the app reaches, reads text files, and copies, moves, deletes, renames, writes and tags through the app’s own operations.

Whatever it changes, you can take back. Every change is an operation of the app: shown as it runs, named after the assistant in the history, and undone with one click, one at a time or a whole session. It is part of Pro, with the other AI features.

Why through the app

An assistant with a shell can already move files. What it gets here is what a shell does not have:

  • Every place is a folder. The inside of a zip or a .tar.gz, a folder on an SFTP or FTP server, a phone: the assistant lists them and copies between them as between two folders on a disk. No unpacking to a scratch folder first, no scp, no packing again afterwards. The files that carry a tag, and a collection, list the same way.
  • Undo. A delete goes to the Recycle Bin, a file that is replaced or edited is kept as it was, and each operation carries an Undo: yours in the app, and the assistant’s own for what it did in its session. No tool here can do what undo cannot take back.
  • Your panes are the context. “These files” are the ones you marked, “here” is the folder you are looking at: the assistant asks the app instead of guessing. It can show you a folder, put any list of files in front of you as one folder to look through, or ask you to pick, with the pane as its file dialog.
  • Seen while it happens. Its operations run in the strip under the panes with its name on them. A name that already exists is asked about in the app, by you, unless the assistant said in advance what to do with it.
  • The app’s search. Everything’s syntax, answered from Everything’s index where it reaches and by the app’s own search elsewhere: in archives, on servers, by tag.

An example

From our own work on TheFile.Ninja, as it happened:

A large project was built on a server reached over SFTP, by Claude, started in the terminal under the list. When the build was done, the programs it had produced lay scattered through an irregular tree of build folders. They had to go into a .tar.gz image whose layout was a different one altogether: every program at the place the image expects it.

The assistant did that as file operations in the app: out of the server’s folders, into the archive, each program to its new place. To it the server and the archive were two folders. To the person at the keyboard every step was a row under the panes with the assistant’s name on it, so it was plain what had been moved where, and any of it, or all of it, could have been taken back with a click.

Without the app the same job would have been a script that copies files down, unpacks the image, rearranges, packs it again and uploads it, and a careful read of that script before trusting it.

Turning it on

  1. In TheFile.Ninja, open Preferences › Other programs. Under AI assistants (MCP), turn on Let AI assistants use the app. It is off until you do, and it is closed whenever the app runs as administrator.
  2. Under What they may do, choose Look and read (the panes’ folders and marked items, listings, searches, the text of files, showing something in a pane) or Look, read and change files.
  3. Give your assistant the server. The same page shows the configuration, with your own path, ready to copy. It names one program, which the assistant starts by itself:
{
  "mcpServers": {
    "thefileninja": {
      "command": "C:\\Users\\you\\AppData\\Local\\TheFileNinjaRS\\bin\\mcp\\tfn-mcp.exe"
    }
  }
}

Any client that can start a local MCP server (one that talks over standard input and output) takes it; where that configuration goes is the client’s own to say. The server finds the running app by itself and keeps working over restarts of the app. While the app is not running, or the switch is off, it says so to the assistant.

An assistant you start in the app’s own terminal has a second way in without any setup: fn, the same operations as shell commands.

What it sees, and what leaves your computer

TheFile.Ninja sends none of this anywhere itself. But what an assistant reads through these tools, it reads: file names, the lines of text files it opens, what your panes show. That goes to the assistant’s own service, as everything it works with does, and reading cannot be undone. The level “Look and read” does not protect against that, which is why the switch is yours to turn on.

  • It reads text files, a part at a time. A file whose data is only in the cloud (an online-only OneDrive file) is never fetched for it.
  • A server you have not signed in to stays closed until you open it in a pane yourself.
  • Preferences › Other programs lists the latest requests with the assistant’s name: what it asked for, and when.

Undo and its limits

  • It covers what goes through these tools. An assistant with tools of its own (a shell, its own file editing) can go around them, and nothing here can know. The server tells every assistant to prefer these tools for your files, for that reason.
  • For 30 days. After that an operation’s record, and what it kept aside, are let go.
  • The assistant takes back its own work, never yours. It undoes operations of its own session only. If you have changed the same files since, its operation stays, and it is told what is in the way.
  • Your Ctrl+Z is not taken by surprise. Before it undoes something an assistant did, the app names it and asks: you may not have seen it done.
  • An emptied Recycle Bin is gone, as always. A file changed since the operation is asked about before it is put back.

What undo keeps, and its limit

Every write and edit keeps the whole file as it was, however small the change. For source code that is little; an assistant that edits one big file again and again is another matter. So there is a limit for what assistants’ changes may keep (“Keep for undo, at most” in Preferences › Other programs: 2 GB unless you set another). When it is reached, the assistant’s next change waits and the app asks you: allow this one, raise the limit, or refuse. Preferences shows what is kept now and can let go of it.

The tools

20 tools, each named after the app (other servers have a “list” and a “read” too). What follows is what the server tells the assistant itself, word for word: “the user” in these texts is you. Paths are whole Windows paths, or the app’s addresses for other places: sftp://me@host/var/www, C:\backup.zip|docs, tag://WORK.

Looking

What the assistant can see. These work at both levels, “Look and read” too.

fileninja_panes What the panes show

What the user is looking at in TheFile.Ninja RS: each pane's folder, the item under the cursor and the marked (selected) items, and which pane is active. Call this first when the user says "here", "this folder", "these", "the selected files" or "the marked files".

fileninja_list List a place

The items of a place the app can show: a folder (C:\Users\me\Documents), an archive's inside (C:\a.zip, C:\a.zip|docs), a server folder (sftp://me@host/var/www), a phone (mtp://Pixel-8/Internal storage/DCIM), items by tag (tag://WORK), a collection (coll://Trip). Folders first, by name. A server not signed in to yet has to be opened by the user in a pane first.

pathstring
The place: a whole path or one of the app's addresses.
hiddenboolean, optional
Hidden and system items too (left out by default).
maxinteger, optional
Items at most (default 200).
offsetinteger, optional
Items to pass over first: the next page of a long listing.

fileninja_search Search files and folders

The app's search, in a folder and everything below it or on the whole computer. The query is Everything's syntax: words must all be in the name (invoice 2026); quote a phrase ("final report"); wildcards (*.pdf); a|b is either; !word is not; ext:pdf;docx by type; size:>10mb; dm:today, dm:thisweek, dm:lastmonth, dm:2026-11 or dm:>2026-01-01 by date modified; folder: or file: for only those; content:"text" for text inside files (slow: give a folder). Results are whole paths. A query the app cannot read comes back as an error that says where.

querystring
What to find, e.g. ext:pdf invoice dm:thisyear or *.log size:>100mb
instring, optional
The folder to search in and below (a whole path). Left out: everywhere the app's index reaches.
maxinteger, optional
Results at most (default 100).
offsetinteger, optional
Results to pass over first: the next page.

fileninja_read Read a text file

The lines of a text file, from a line on (its encoding is worked out; the first 8 MB of a larger file). Also files inside archives and on servers and phones. Not files that are not text, and not files whose data is only in the cloud (reading would download them).

pathstring
The file: a whole path or one of the app's addresses.
from_lineinteger, optional
The first line wanted (default 1).
linesinteger, optional
Lines at most (default 400).

fileninja_info Details of items

Size, dates, attributes (read-only, hidden, only in the cloud), the app's tags and description of files and folders on disks and shares.

pathslist of string
The items: whole paths.

fileninja_operations This session's file operations

The file operations you started in this session: where each stands, what it did, what failed, whether it can be undone. Give ids and wait_seconds to wait for operations that still run.

idslist of integer, optional
The operations (their numbers). Left out: the newest of this session.
wait_secondsinteger, optional
With ids: wait this long for them to end before answering.

Changing

Each call is one operation of the app under the assistant’s name, and each can be undone. They need the level “Look, read and change files”.

fileninja_copy Copy items

Copies files and folders into a folder, as one operation of the app (the user sees it; it can be undone). Works between every place the app reaches: disks, shares, archives, servers, phones. Into an archive (C:\a.tar.gz|dir) each operation writes the whole archive again and keeps the old one for undo: put all that goes into one archive in one call. Folders merge with those there, so a folder laid out as the archive is goes in at once.

itemslist of string
The files and folders to copy: whole paths.
tostring
The folder they go into: a whole path. It must be there.
on_clashask | skip | keep_both | overwrite | older, optional
What to do with a name that is already there. ask (default): the app asks the user. skip: leave it. keep_both: the new one gets a number. overwrite: replace it (the replaced item is kept aside, so this can be undone too). older: replace only older ones.
wait_secondsinteger, optional
Seconds to wait for the operation to end before answering (default 20). One that takes longer goes on in the app: follow it with fileninja_operations.

fileninja_move Move items

Moves files and folders into a folder, as one operation of the app (the user sees it; it can be undone). To give an item another name where it is, use fileninja_rename. Into or out of an archive, each operation writes the whole archive again and keeps the old one for undo: move all that goes with one archive in one call.

itemslist of string
The files and folders to move: whole paths.
tostring
The folder they go into: a whole path. It must be there.
on_clashask | skip | keep_both | overwrite | older, optional
What to do with a name that is already there. ask (default): the app asks the user. skip: leave it. keep_both: the new one gets a number. overwrite: replace it (the replaced item is kept aside, so this can be undone too). older: replace only older ones.
wait_secondsinteger, optional
Seconds to wait for the operation to end before answering (default 20). One that takes longer goes on in the app: follow it with fileninja_operations.

fileninja_delete Delete items (to the Recycle Bin)

Deletes files and folders to the Recycle Bin (where a disk has none, the app keeps them aside): the user can restore them and the operation can be undone. There is no deleting for good here, by design: if the user wants the space back, they empty the Recycle Bin themselves.

itemslist of string
The items to delete: whole paths.
wait_secondsinteger, optional
Seconds to wait for the operation to end before answering (default 20). One that takes longer goes on in the app: follow it with fileninja_operations.

fileninja_rename Rename items

Gives an item a new name in its folder, or several items their new names in one operation (one undo; names may swap or chain: a to b and b to c). A new name is a name, not a path.

pathstring, optional
One item to rename: its whole path.
new_namestring, optional
Its new name (with its extension).
renameslist of object, optional
Several at once, instead of path and new_name.
wait_secondsinteger, optional
Seconds to wait for the operation to end before answering (default 20). One that takes longer goes on in the app: follow it with fileninja_operations.

fileninja_create_folder Create folders

Makes new folders (each can be undone). The folder a new one is made in must be there.

pathslist of string
The folders to make: whole paths.
wait_secondsinteger, optional
Seconds to wait for the operation to end before answering (default 20). One that takes longer goes on in the app: follow it with fileninja_operations.

fileninja_write Write a text file

Writes a text file (UTF-8): a new one, or with overwrite in place of the file there, which the app keeps aside so that the write can be undone. To change part of a file use fileninja_edit: it keeps the file's encoding and line ends and does not need the whole text.

pathstring
The file: a whole path. Its folder must be there.
textstring
The file's whole text.
overwriteboolean, optional
Replace a file that is there (default: refuse, and say it is there).
wait_secondsinteger, optional
Seconds to wait for the operation to end before answering (default 20). One that takes longer goes on in the app: follow it with fileninja_operations.

fileninja_edit Edit a text file

Replaces a text inside a file on a disk or share: old_text must be in the file exactly once (give enough of what is around it), or every place it is at with replace_all. The file keeps its encoding and line ends, and the file as it was is kept aside: the edit can be undone. Read the file first.

pathstring
The file: a whole path.
old_textstring
The text to replace, exactly as it is in the file.
new_textstring
What takes its place (empty: the text is taken out).
replace_allboolean, optional
Every place old_text is at (default: it must be there once).
wait_secondsinteger, optional
Seconds to wait for the operation to end before answering (default 20). One that takes longer goes on in the app: follow it with fileninja_operations.

fileninja_tag Tag items

Puts the app's tags on files and folders, or takes tags off (they show in the app's Tags column and under tag://NAME; kept with the item itself). Can be undone.

pathslist of string
The items: whole paths.
addlist of string, optional
Tags to put on, e.g. ["WORK", "2026"].
removelist of string, optional
Tags to take off.
wait_secondsinteger, optional
Seconds to wait for the operation to end before answering (default 20). One that takes longer goes on in the app: follow it with fileninja_operations.

fileninja_describe Describe items

Sets the app's description of files and folders (a note kept with the item, shown in the Description column), or takes it off with an empty text. Can be undone.

pathslist of string
The items: whole paths.
textstring
The description (empty: taken off).
wait_secondsinteger, optional
Seconds to wait for the operation to end before answering (default 20). One that takes longer goes on in the app: follow it with fileninja_operations.

fileninja_undo Undo this session's operations

Takes back file operations you did in this session: the ones named, or all of them (the newest first) when none are named. Only your own: an operation whose items the user (or another program) changed afterwards stays, and you are told which; the user can undo those in the app. What an undo finds changed since is asked about in the app.

idslist of integer, optional
The operations to undo (their numbers). Left out: everything this session did.
wait_secondsinteger, optional
Seconds to wait for the operation to end before answering (default 20). One that takes longer goes on in the app: follow it with fileninja_operations.

fileninja_cancel Stop running operations

Stops operations of this session that still run (the ones named, else all). What they did so far stays, and can be undone.

idslist of integer, optional
The operations to stop. Left out: all of this session's that run.

In the window

The assistant shows you things in the panes, and asks you to point. These work at both levels.

fileninja_show Show in a pane

Shows a folder in one of the app's panes, or a file in its folder with the cursor on it: for the user to look at what you found or made. Nothing changes but what the pane shows.

pathstring
The folder or file: a whole path or one of the app's addresses.
paneactive | other | left | right, optional
Which pane (default: the active one).
new_tabboolean, optional
In a new tab (default: the pane's current tab goes there).

fileninja_pick Let the user pick

Asks the user to pick files or folders in the app's pane (the pane becomes a file dialog: a bar says what is asked, Enter picks, Esc gives up) and gives you what they picked. Use it when the request leaves open which file is meant, instead of guessing. The call waits for the user.

promptstring, optional
What to pick, in a few words, shown above the list (e.g. "Pick the invoice to rename").
kindany | file | folder, optional
What may be picked (default any).
multipleboolean, optional
Several items may be picked (the user marks them).
start_instring, optional
The folder the pane goes to first (a whole path).
paneactive | other | left | right, optional
Which pane (default: the active one).
wait_secondsinteger, optional
How long to wait for the user (default 180).

fileninja_show_as_folder Show items as one folder

Shows any list of files and folders, wherever each is, as one folder in a pane (lua://name/) for the user to look through: a search's hits, the files a task touched. The rows are the items themselves (they open, preview and copy as themselves). Nothing is copied or moved. Needs the app's scripting turned on.

namestring
The folder's name: a short word (letters, digits, - and _), e.g. "big-videos".
pathslist of string
The items: whole paths.
showboolean, optional
Show it in the pane now (default true).
paneactive | other | left | right, optional
Which pane (default: the active one).

▶ Asistentes de IA con deshacer · 2 min