File Relay
Temporary file relay for AI agents: upload a generated file, get an expiring download link.
我该使用它吗
质量与安全性
发现(2)
- HIGH
- LOW在 create_upload_link 中
基于对工具定义和协议合规性的自动分析。
上下文开销
这是每次将服务器的工具加载到模型上下文窗口时所消耗的大致 token 数。数值越高,可用于其他任务的注意力就越少。
安装
一键安装
将以下内容添加到你的 `claude_desktop_config.json` 文件中:
{
"mcpServers": {
"file-relay": {
"url": "https://code.easyllms.com/relay/mcp"
}
}
}远程端点
https://code.easyllms.com/relay/mcpstreamable-http它能做什么
工具清单
工具(5)
🟡create_upload_link(content_type, filename, path, ttl_hours)
Relay a file of any size up to 100 MB. Save the file to local disk first, call this with its path, then run the returned curl command in your shell to upload it. The download link works as soon as the upload finishes. Requires outbound network access to code.easyllms.com; if curl is blocked, ask the user to allow that domain in their sandbox network settings (on claude.ai: Settings > Capabilities > Code execution).
输入模式
{
"type": "object",
"properties": {
"content_type": {
"description": "Optional MIME type; guessed from the extension otherwise.",
"type": "string"
},
"filename": {
"description": "Optional name shown to the downloader; defaults to the file name in path.",
"type": "string"
},
"path": {
"description": "Local path of the file you saved, e.g. /tmp/report.pdf. Used to build the curl command.",
"type": "string"
},
"ttl_hours": {
"description": "Hours until the download link expires. Default 24, maximum 168 (7 days).",
"maximum": 168,
"minimum": 0.1,
"type": "number"
}
},
"required": [
"path"
],
"additionalProperties": false
}🟢relay_attached_file(file, filename, ttl_hours)
ChatGPT only: relay a file from the conversation (the host passes it as a file reference) and get a temporary download link.
输入模式
{
"type": "object",
"properties": {
"file": {
"description": "File reference provided by the host.",
"properties": {
"download_url": {
"type": "string"
},
"file_id": {
"type": "string"
},
"file_name": {
"type": "string"
},
"mime_type": {
"type": "string"
}
},
"required": [
"download_url"
],
"type": "object"
},
"filename": {
"description": "Optional file name override.",
"type": "string"
},
"ttl_hours": {
"description": "Hours until the download link expires. Default 24, maximum 168 (7 days).",
"maximum": 168,
"minimum": 0.1,
"type": "number"
}
},
"required": [
"file"
],
"additionalProperties": false
}🟢get_file_info(id)
Look up a relayed file by id or download URL: name, size, type, expiry and download link.
输入模式
{
"type": "object",
"properties": {
"id": {
"description": "File id or download URL returned by an upload tool.",
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}🟢read_file(id)
Read a relayed file's content (up to 1 MB) so an agent can pick up a file someone else relayed. Text comes back as text, images as images, other files as base64.
输入模式
{
"type": "object",
"properties": {
"id": {
"description": "File id or download URL from this relay.",
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}🔴delete_file(delete_token, id)
Delete a relayed file before it expires. Requires the delete_token returned at upload.
输入模式
{
"type": "object",
"properties": {
"delete_token": {
"description": "delete_token returned at upload.",
"type": "string"
},
"id": {
"description": "File id or download URL.",
"type": "string"
}
},
"required": [
"id",
"delete_token"
],
"additionalProperties": false
}社区
证据