ReboFiles文档
开始3
什么是 ReboFiles
快速开始
可运行的演示
集成到你的应用6
React 组件
Headless:你自己的界面
不使用框架
样式与主题
键盘与无障碍
语言
文件9
上传
预览与查看器
搜索
实时更改与大文件夹
评论
星标与字段
版本、回收站与空间
打包下载 .zip
Word 文档
服务器14
路由
框架与登录
谁可以做什么
存储:S3、GCS、Azure 与磁盘
检查上传
元数据:SQLite 与 Postgres
数据库结构
共享与链接
动态与通知
钩子、日志与限制
保留、法律保留与导出
桌面端与其他来源
同步文件夹
上线生产环境
协作1
AI 助手(MCP)
参考5
包
组件与 hooks
客户端 API
HTTP 路由
状态与路线图
↑↓ 移动↵ 打开Esc 关闭38 个页面

协作 AI 助手(MCP)

AI 助手(MCP)

@rebofiles/mcp 把网盘以工具的形式提供给助手:列出、搜索、阅读、写入文字、重命名、移动、设置颜色和移到回收站。每个工具都以用户本人的权限调用网盘的路由,因此助手同样要经过 authorize。
HTTP

在你的应用中,通过 HTTP

放在网盘路由旁边:它会把每个请求的授权信息和 cookie 转发给网盘,因此只需用户的令牌即可。

// app/api/mcp/route.ts, in Next.js
import { createMcpHandler } from '@rebofiles/mcp';

export const POST = createMcpHandler({ base: 'https://acme.com/api/files' });
claude mcp add --transport http rebofiles https://acme.com/api/mcp --header "Authorization: Bearer …"

headers 可以另行指定请求网盘时使用的请求头;fetch 直接传入网盘的处理器,在同一进程中调用;origins 是除自身外允许浏览器调用它的来源。

stdio

在你的电脑上,通过 stdio

适用于 Claude Desktop 以及其他通过启动命令接入的客户端。

{
  "mcpServers": {
    "rebofiles": {
      "command": "npx",
      "args": ["rebofiles-mcp"],
      "env": { "REBOFILES_URL": "https://acme.com/api/files", "REBOFILES_TOKEN": "…" }
    }
  }
}
安全

助手可以触及的范围

  • 仅限其用户本人可以操作的内容:每个工具都要经过网盘的路由、identify 和 authorize。
  • 没有不可撤回的操作:它可以移到回收站,但不能永久删除;也不能共享。它做的一切都可以从回收站或版本中撤回。
  • 服务器拒绝的请求会以文字形式返回给模型,让它改做别的事。
工具

全部工具

每个工具的作用(已译出)。服务器向助手描述时使用英文,所有模型都能读懂。

工具TypeWhat it does
list_folder只读云盘某个文件夹中的内容(文件夹在前),或“我的文件”的最顶层。给出每一项的 id,供其他工具使用。
search_text只读文字包含查询中每个词的文件,并附上找到处周围的一段:上传时读取的文本文件和 Word 文档。
get_info只读单个文件或文件夹:类型、大小、所有者、何时由谁更改、位置、与谁共享,以及各个版本。
read_file只读文件的文字:纯文本、Markdown、CSV、JSON 等,以及服务器装有 Rebodocs 时的 Word 文档(.docx)。可指定版本。不含图片和 PDF。最多一兆字节。
list_recent只读助手所服务的人可读取的、最近更改的文件,最新的在前。
list_shared只读他人与助手所服务的人共享的内容。
get_activity只读谁对某个文件或文件夹做了什么,若是文件夹还包括其中的内容:创建、上传、重命名、移动、移入回收站、共享。最新的在前。
list_comments只读人们对某个文件或文件夹的评论,每个讨论串及其回复,以及是否已解决。
add_comment写入以助手所服务的人的名义,对文件或文件夹发表评论,所有可读取它的人都能看到;或带上 id 回复另一条评论。会通知用 @ 提到的人。
create_folder写入新文件夹;名称已被占用时在后面加 "(2)"。
create_text_file写入包含给定文字的新文件,类型取自名称(.md、.csv、.json、.txt…);名称已被占用时在后面加 "(2)"。
update_text_file写入给定的文字成为文件的当前内容;原内容保留为上一个版本,可以恢复。
restore_version写入将文件的较早版本作为新版本恢复为当前版本:原版本仍保留,因此也可以撤销。
rename写入给文件或文件夹改名;同一文件夹中已有同名项时拒绝。
set_folder_color写入给文件夹设置颜色,便于一眼区分:red、orange、yellow、green、teal、blue、purple、pink、gray;或用 "none" 恢复云盘默认颜色。
move写入将文件或文件夹移到另一个文件夹,或“我的文件”的最顶层;名称已被占用时拒绝。
move_to_trash写入连同其中的内容移入回收站;restore 可将其移出。这里不会永久删除任何内容。
restore写入回到原来的文件夹,若该文件夹已不在则回到最顶层;其间名称被占用时加 "(2)"。
Rebodocs

借助 Rebodocs 处理 Word 文档

安装 @rebodocs/mcp 后,网盘中的 .docx 会通过 Rebodocs 自带的工具阅读和编辑,每次修改都保存为一个版本。

工具What it does
create_documentA new, empty Word document (.docx) in the drive, to write in with insert_paragraphs (after_paragraph 0); with "(2)" after its name when the name is taken there.
get_overviewA summary of the document: how long it is, its headings with the paragraph each is at, its template variables, its notes and its paragraph styles. Start here.
read_documentThe text of the document, one paragraph a line, each with its number in brackets and, in parentheses, its style and its table cell when it has them. A long document comes in parts: ask for the next with "from".
read_formattingHow paragraphs look: for each, its style, alignment, indents, the room before and after it and its line spacing; then each stretch of its text that looks different, with its font, its size and whether it is bold, italic, underlined or coloured. Read it before rewriting or adding text that has to look like what is there.
compare_documentsWhat changed between this document and another version of it: an earlier version of the same file (the one before the current, unless "version" says), or another document ("other"). The paragraphs put in, taken out and changed, of the text and of its headers, footers, notes and text boxes, and the notes on the text, with what was taken out as [-…-] and what was put in as {+…+}. Tracked changes are compared as if accepted, as Word does. By default the other is the earlier one; with "file_is" "later", it is the later one.
find_textEvery place a text is found, with the paragraph it is in and the words around it.
replace_textPuts a text in place of another, in the formatting of what was there: its font, its size and its marks. The text to find has to be inside one paragraph. An empty "replace" deletes it. To write a whole paragraph anew, as in a translation, rewrite_paragraph keeps more of its look.
rewrite_paragraphWrites the whole text of a paragraph anew, as to translate it or say it otherwise, and keeps how it looks: its style, alignment, indents and spacing, and the font, size and colour most of its text has. Words that were set apart (bold, italic…) are kept so by giving the text in "segments". A paragraph with a picture is changed with replace_text instead.
insert_paragraphsWrites new paragraphs after a paragraph. Each has its text and, when wanted, a style (a heading, for one) or a list. With "like_paragraph" a new one looks like a paragraph that is there: its alignment, indents, spacing, list, and the font, size and colour of most of its text. Text between double braces, like {{cliente}}, is a template variable.
delete_paragraphsDeletes whole paragraphs, from one to another. Not for the paragraphs of a table.
edit_documentMakes several changes in one go, each as the tool it names would make it, and all of them or none. Every paragraph number in them is the one read_document showed before the first edit: the numbers do not move as the edits before insert or delete paragraphs, so there is no need to read again between them. A text to find is looked for as the document is when its edit comes. Each edit is an object with "tool" (replace_text, rewrite_paragraph, insert_paragraphs, delete_paragraphs, set_style, set_list, format_text, format_paragraphs, set_link, add_note, insert_page_break, move_section, set_cell_text, renumber_clauses) and the arguments of that tool beside it. The text of the document only: for a header or a footer, use each tool alone with "area".
move_sectionMoves a heading and everything under it, down to the next heading of its level or above (a clause with its text, a chapter with its clauses), to another place, as dragging it in the outline of the editor does. The paragraphs keep their look, their notes and their pictures. After it, renumber_clauses puts the numbers of the headings in order.
renumber_clausesPuts in order the numbers written at the start of the headings of clauses, after one was put in, taken out or moved: "Primera.", "Segunda."… in words, "CLÁUSULA 3.", or "IV.", each kept as it is written (its capitals, "Primera" or "Primero", "Décima Primera" or "Undécima"). The headings of one series are those that begin the same way and have the same style; the longest is renumbered, or the one of "paragraph". It says the places of the text that name a clause by its number ("según la cláusula Tercera"), for you to check: it does not change them.
set_cell_textWrites the text of a cell of a table, by its table, row and cell, as read_document shows them ("table 1, row 2, cell 3"): what the cell had goes, empty or not, and the text takes the look most of it had. A new line in "text" starts another paragraph in the cell. The way to fill the cells of a row just put in.
set_styleGives paragraphs a paragraph style: a heading, a title, the normal text. get_overview lists the styles of the document.
set_listMakes paragraphs the items of a list with bullets or with numbers, or takes them out of the list they are in.
format_textChanges how a text looks: its font, its size, bold, italic, underlined, struck through, its colour or the highlight behind it. The text is one found by "find", or whole paragraphs, from "from" to "to". Give only what is to change.
format_paragraphsChanges how paragraphs sit on the page: their alignment, indents, the room before and after them, their line spacing, their tab stops, and whether they keep with the next one. Give only what is to change.
add_notePuts a note on a text: a comment in the margin, as in Word, that does not change the document. The way to review a document, or to ask about something in it.
list_notesThe notes of the document: the id of each, who wrote it, the text it is about and what it says.
remove_noteTakes a note away; the text it was about stays.
track_changesSwitches tracked changes on or off, as Word's "Track changes". While on, every change made to the text, by any tool, stays marked for a person to accept or reject: what was put in as {+…+} and what was taken out as [-…-] in read_document.
list_changesThe tracked changes of the document, numbered: who made each, whether it put text in, took it out, moved it or changed its formatting, the text, and the paragraph it is in. Text one person put in and another took out is two changes. accept_changes and reject_changes take these numbers.
accept_changesAccepts tracked changes: what was put in stays, unmarked, and what was taken out goes. With "changes", the ones of those numbers in list_changes; with "author", all of that person's; without either, all of them. A move is accepted whole.
reject_changesRejects tracked changes: what was put in goes, and what was taken out comes back. With "changes", the ones of those numbers in list_changes; with "author", all of that person's; without either, all of them. A move is rejected whole.
list_variablesThe template variables of the document, written between double braces: the name of each, how many times it is used and the formats it is given (capitals, a date, money…).
fill_variablesPuts a value in place of each template variable that is given one, everywhere in the document (its headers, footers, notes and text boxes too), in the format the variable asks for, and writes out each block given one: {{#name}} … {{/name}} is repeated for each item of a list (a row of a table, paragraphs, or text), kept for true and taken out for false; {{^name}} … {{/name}} the other way round. Dates go as YYYY-MM-DD and numbers plain (1234.5): the format writes them out. Variables and blocks with no value stay as they are.
insert_tablePuts in a table after a paragraph, with the text of each cell. Every row must have the same number of cells.
insert_signaturesPuts in a block of signatures after a paragraph: side by side, each with its title (such as ASESOR and CLIENTE), a line to sign on and the name under it.
edit_tableChanges the shape or the look of a table that is there. "paragraph" is any paragraph of the cell to act on (read_document says which cell each is in). Actions: insert_row_above, insert_row_below, insert_column_left, insert_column_right, delete_row, delete_column, merge_cells (from "paragraph" to "to_paragraph"), split_cell (undoes a merge), set_column_widths (with "widths_cm", one for each column), set_row_height (with "height_cm", 0 for as tall as it holds, and "exact"), header_row_on and header_row_off (the rows down to this one repeat at the top of each page), align_cells_top, align_cells_center, align_cells_bottom, text_level, text_up and text_down (the text of the cells set level, or vertically to read from the bottom up or from the top down; its lines are as long as the row is tall), shade_cells (with "shade"), cell_lines (with "line_style", "line_width_pt" and "line_color"; "line_style" none takes them away), show_borders, hide_borders (the whole table), keep_together (the whole table on one page, as a block of signatures should be: no row is cut, and each row stays with the next), allow_split (undoes it) and delete_table. The actions on cells take "to_paragraph" for several. The text of a cell is changed with replace_text and insert_paragraphs.
insert_imagePuts a picture from a file (PNG, JPEG or GIF) in a paragraph of its own after a paragraph. It goes at its own size, or as wide as the text when it is wider, unless "width_cm" says otherwise.
edit_imageChanges a picture that is in the document: "resize" it (with "width_cm"; its height follows), "move" it to a paragraph of its own after another (with "after_paragraph"), "align" the paragraph it is in (with "align"), "describe" it for whoever cannot see it (with "description", what a screen reader says; empty takes it away), or "delete" it. read_document shows a picture as [image], or [image: its description].
set_columnsSets text in columns, as a newsletter: one column, two, three, with a line between them or not. With "from" and "to" only those paragraphs go in columns, in a section of their own on the same page; with "paragraph" alone, the whole section that paragraph is in.
insert_column_breakMakes the text from a place start at the top of the next column, in a section set in columns: before a text found with "find", or at the start of a paragraph.
insert_footnotePuts a note at the foot of the page: its number goes in the text right after a text found with "find" (or at the end of paragraph "at_paragraph"), and the note says "text". Notes are numbered by where they are in the text.
insert_endnotePuts a note at the end of the document, after its text (or at the end of its section, when the document puts them there): its number (i, ii, iii) goes in the text right after a text found with "find" (or at the end of paragraph "at_paragraph"), and the note says "text". Notes at the end are numbered by where they are in the text, apart from those at the foot of the page.
insert_text_boxPuts a text box in: a box with a thin black line, anchored to a paragraph (at the end of "after_paragraph"; 1 when left out), at the left of the column, with the text of that paragraph going round it. It is as tall as its text. Its text is "text"; each line of it a paragraph. Change it later with area "textbox".
set_letterheadGives the document a letterhead: a picture from a file (PNG, JPEG or GIF), stretched over the whole page behind the text of every page, in place of the one it had. For a PNG, the top and bottom margins grow to clear what it prints there. With "remove", takes it away; the rest of the header stays. get_overview says whether the document has one.
set_page_setupChanges the size of the paper, its orientation, or its margins; and, for one section of a document of several, whether it has a header and footer of its own and whether its first page has its own. Give only what is to change. Without "section", the page of every section changes.
set_page_numberPuts the number of the page in the header or the footer of every page, moves it, changes how it reads, or takes it away.
insert_page_breakMakes the text after a paragraph start on a new page.

期间他人做出的保存 会在写入前向网盘查询时被发现,不会被覆盖。