Skip to main content
Glama
xtawa

mcp_file_manager

by xtawa

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
FM_HOSTNoHost address for the HTTP server to listen on.127.0.0.1
FM_PORTNoPort for the HTTP server to listen on.8787
FM_DATA_DIRNoDirectory to store data (files/, tmp/, index.json)../data
FM_API_TOKENNoAuthentication token for write operations. Strongly recommended for non-local deployments.
FM_LOG_LEVELNoLogging level: debug, info, warn, or error.info
FM_TTL_HOURSNoDefault retention duration in hours. Files are automatically deleted after this time.24
FM_MAX_INLINE_MBNoMaximum size in megabytes for inline content returned by MCP tools. Larger files return only a link.4
FM_MAX_TTL_HOURSNoMaximum allowed retention hours for a single upload request (30 days).720
FM_MAX_UPLOAD_MBNoMaximum allowed upload file size in megabytes.100
FM_PUBLIC_BASE_URLNoBase URL used to generate public download links. Must be set when behind a reverse proxy or domain.http://<host>:<port>
FM_ALLOW_LOCAL_PATHNoSet to '1' to allow uploading files from a local server path.1
FM_ALLOW_REMOTE_FETCHNoSet to '1' to allow uploading files from a remote URL.1
FM_SWEEP_INTERVAL_MINUTESNoInterval in minutes for the background expired-file cleanup task.10

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
upload_fileA

上传一个文件并获得标识码与下载链接。 content / text / path / url 四个来源参数只能传其中一个:

  • content:base64 内容(二进制文件用这个)

  • text:纯文本内容

  • path:服务器本地文件路径

  • url:远程文件地址,由服务端抓取 默认保留 24 小时,到期自动删除;如需其他时长用 ttlHours。

download_fileA

根据标识码取回文件内容。 默认自动选择编码:文本类直接返回正文,二进制返回 base64。 传 savePath 可以直接写到服务器本地路径;文件过大时只返回链接。

get_file_infoA

根据标识码查看文件名、大小、校验值、下载链接与剩余保留时间,不返回文件内容。

list_filesA

列出当前未过期的文件,支持关键词、标签过滤与分页。忘记标识码时用它找回文件。

delete_fileA

立即删除指定标识码的文件与元数据,不等到期。操作不可恢复。

extend_expiryA

把文件的到期时间重算为“从现在起再保留 N 小时”,上限 720 小时。

create_upload_linkA

生成一个临时上传页面链接,可以直接发给人类用户在浏览器里上传文件。 用户上传完成后会得到标识码,把标识码告知你即可用 download_file 取用。

sweep_expiredA

手动触发一次到期清理(后台任务已经定时执行,一般无需调用)。

get_storage_statsA

查看当前文件数量、占用空间、保留策略与下一个到期时间。

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

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/xtawa/mcp_file_manager'

If you have feedback or need assistance with the MCP directory API, please join our Discord server