{"_id":"@bestfunc-com/argus-file-mcp","_rev":"3-436a8c04194d3ad84de408a6a7d6e5ce","name":"@bestfunc-com/argus-file-mcp","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@bestfunc-com/argus-file-mcp","version":"0.1.0","keywords":["mcp","argus","file-transfer","bestfunc"],"author":{"name":"Bestfunc Technology","email":"Great@bestfunc.com"},"license":"Apache-2.0","_id":"@bestfunc-com/argus-file-mcp@0.1.0","maintainers":[{"name":"bestfunc","email":"xugf@bestfunc.com"}],"homepage":"https://github.com/Lugia123/Argus_Local_MCP/tree/main/argus-file-mcp#readme","bugs":{"url":"https://github.com/Lugia123/Argus_Local_MCP/issues"},"bin":{"argus-file-mcp":"dist/index.js"},"dist":{"shasum":"a234e3087a59f1a5b322dc93da5e65501e789ceb","tarball":"https://registry.npmjs.org/@bestfunc-com/argus-file-mcp/-/argus-file-mcp-0.1.0.tgz","fileCount":7,"integrity":"sha512-w3r/xn7L/VmqZw0FdQktQu67ol/aj5RzfQ8mELi5WeS6Zoe6f4UbjISJY/8kgu58D/Al8O2KB/i5nOHy33z1fQ==","signatures":[{"sig":"MEUCIDoq1UgRhiCZV+LrLjcSv7EHAoOdXEwlBf5NQk3NlFldAiEAk3YgxA15x+BguJrVtJx1bDhEgHa9tE/399+iqTfLgIU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22371},"main":"./dist/index.js","type":"module","engines":{"node":">=18.0.0"},"gitHead":"faf8eaf20134b7ddcacfbba295bcc50271cda782","scripts":{"dev":"tsx src/index.ts","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"bestfunc","email":"xugf@bestfunc.com"},"repository":{"url":"git+https://github.com/Lugia123/Argus_Local_MCP.git","type":"git","directory":"argus-file-mcp"},"_npmVersion":"10.9.4","description":"Argus 本地文件 MCP Server — 通过 HTTP 直连 argus.bestfunc.com/api/transfers/* 实现大文件上传/下载，绕开 MCP base64 内联限制","directories":{},"_nodeVersion":"22.21.1","dependencies":{"zod":"^3.23.8","@modelcontextprotocol/sdk":"^1.0.4"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","typescript":"^5.5.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/argus-file-mcp_0.1.0_1776692288831_0.5719245898220962","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@bestfunc-com/argus-file-mcp","version":"0.1.1","keywords":["mcp","argus","file-transfer","bestfunc"],"author":{"name":"Bestfunc Technology","email":"Great@bestfunc.com"},"license":"Apache-2.0","_id":"@bestfunc-com/argus-file-mcp@0.1.1","maintainers":[{"name":"bestfunc","email":"xugf@bestfunc.com"}],"homepage":"https://github.com/Lugia123/Argus_Local_MCP/tree/main/argus-file-mcp#readme","bugs":{"url":"https://github.com/Lugia123/Argus_Local_MCP/issues"},"bin":{"argus-file-mcp":"dist/index.js"},"dist":{"shasum":"59aaa8433dae9ac1176a22a0910a3c9106c6ca0a","tarball":"https://registry.npmjs.org/@bestfunc-com/argus-file-mcp/-/argus-file-mcp-0.1.1.tgz","fileCount":7,"integrity":"sha512-KUAKRhzgNM9wQbd97AUZ2cfxFJXa0LyBY6tuETNm9RTPMJcrHovAZ1Uxw9FuE23lolBJQHalmWDj0+EpTMWEcQ==","signatures":[{"sig":"MEQCID5Bs4TAFGZQAVEBUi+HB2LlP3m5fERD4aV0IoZyi5NyAiAc/C/+Mliso2Wvcsm7Td72p1egy0rdHIZogg/diBZOIg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22421},"main":"./dist/index.js","type":"module","engines":{"node":">=18.0.0"},"gitHead":"3f6cc6ef0c2d367b3cab822764fca95236b31843","scripts":{"dev":"tsx src/index.ts","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"bestfunc","email":"xugf@bestfunc.com"},"repository":{"url":"git+https://github.com/Lugia123/Argus_Local_MCP.git","type":"git","directory":"argus-file-mcp"},"_npmVersion":"10.9.4","description":"Argus 本地文件 MCP Server — 通过 HTTP 直连 argus.bestfunc.com/api/transfers/* 实现大文件上传/下载，绕开 MCP base64 内联限制","directories":{},"_nodeVersion":"22.21.1","dependencies":{"zod":"^3.23.8","@modelcontextprotocol/sdk":"^1.0.4"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","typescript":"^5.5.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/argus-file-mcp_0.1.1_1776693201042_0.9411919488821912","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@bestfunc-com/argus-file-mcp","version":"0.1.2","description":"Argus 本地文件 MCP Server — 通过 HTTP 直连 argus.bestfunc.com/api/transfers/* 实现大文件上传/下载，绕开 MCP base64 内联限制","keywords":["mcp","argus","file-transfer","bestfunc"],"homepage":"https://github.com/Lugia123/Argus_Local_MCP/tree/main/argus-file-mcp#readme","repository":{"type":"git","url":"git+https://github.com/Lugia123/Argus_Local_MCP.git","directory":"argus-file-mcp"},"bugs":{"url":"https://github.com/Lugia123/Argus_Local_MCP/issues"},"license":"Apache-2.0","author":{"name":"Bestfunc Technology","email":"Great@bestfunc.com"},"type":"module","bin":{"argus-file-mcp":"dist/index.js"},"main":"./dist/index.js","scripts":{"build":"tsc","start":"node dist/index.js","dev":"tsx src/index.ts","prepublishOnly":"npm run build"},"dependencies":{"@modelcontextprotocol/sdk":"^1.0.4","zod":"^3.23.8"},"devDependencies":{"@types/node":"^22.0.0","tsx":"^4.19.0","typescript":"^5.5.0"},"engines":{"node":">=18.0.0"},"_id":"@bestfunc-com/argus-file-mcp@0.1.2","gitHead":"dd6087e7ee4ec4be9536f72a89870b7c88a32b08","_nodeVersion":"22.21.1","_npmVersion":"10.9.4","dist":{"integrity":"sha512-9tTuWJFAiEAlOmCnZ/6tzcuIHIXJdx2851xACHChrCOKDsRVb2w+m4/6kwS0Kbz3HKkzpufK0US1gcAzX/6F6Q==","shasum":"2cf51ce3e62d796a25e56583c0d1d0eb7c25b5fe","tarball":"https://registry.npmjs.org/@bestfunc-com/argus-file-mcp/-/argus-file-mcp-0.1.2.tgz","fileCount":7,"unpackedSize":24254,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDoqpNcOsWdrBEkPD5oy8QWd9KAlxPDwPLdb8g4ieE6OAIgMifSCUdnql24Pwb+R+3AMeMFFzoiYO4vPZeiBHJVHxA="}]},"_npmUser":{"name":"bestfunc","email":"xugf@bestfunc.com"},"directories":{},"maintainers":[{"name":"bestfunc","email":"xugf@bestfunc.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/argus-file-mcp_0.1.2_1776693464854_0.7559914631036186"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-20T13:38:08.724Z","modified":"2026-04-20T13:57:45.185Z","0.1.0":"2026-04-20T13:38:08.984Z","0.1.1":"2026-04-20T13:53:21.183Z","0.1.2":"2026-04-20T13:57:45.050Z"},"bugs":{"url":"https://github.com/Lugia123/Argus_Local_MCP/issues"},"author":{"name":"Bestfunc Technology","email":"Great@bestfunc.com"},"license":"Apache-2.0","homepage":"https://github.com/Lugia123/Argus_Local_MCP/tree/main/argus-file-mcp#readme","keywords":["mcp","argus","file-transfer","bestfunc"],"repository":{"type":"git","url":"git+https://github.com/Lugia123/Argus_Local_MCP.git","directory":"argus-file-mcp"},"description":"Argus 本地文件 MCP Server — 通过 HTTP 直连 argus.bestfunc.com/api/transfers/* 实现大文件上传/下载，绕开 MCP base64 内联限制","maintainers":[{"name":"bestfunc","email":"xugf@bestfunc.com"}],"readme":"# @bestfunc-com/argus-file-mcp\n\nArgus 远程管理代理系统的**本地文件 MCP Server**——为 AI CLI（Claude Code / Qwen Code 等）提供大文件上传/下载能力，绕开 MCP 协议的 base64 内联限制。\n\n## 为什么需要\n\nMCP 协议只认 JSON-RPC over HTTP POST（或 stdio），payload 必须是 JSON 字符串——传二进制只能走 base64 内联，**AI 客户端的 context window 直接成为单文件传输上限**。Argus 远程 MCP 的 `upload_file` 只能处理几 MB 以内的文件，遇到 13 MB 的 exe 就会把 AI 上下文挤爆。\n\n本地 MCP 用**带外 HTTP 直连** Argus Server 的 `/api/transfers/*` 接口，文件流完全不过 MCP 通道：\n\n```\nAI 客户端 ──stdio── argus-file-mcp (本地进程)\n                     ├─ 读本地文件（Node fs）\n                     └─ multipart HTTP → argus.bestfunc.com/api/transfers/upload\n                                         → MinIO → WebSocket 推送 Agent\n```\n\nAI 的 context 只过 `{agent_id, local_path, remote_path}` 这种短 JSON 和返回的 `{status, size, transfer_id}` 短 JSON——与文件大小完全解耦。\n\n## 安装\n\n本 MCP Server 随 [Argus_Plugins](https://github.com/bestfunc/Argus_Plugins) 一起分发，**不需要单独安装**：\n\n```bash\n# Claude Code\n/plugin marketplace add bestfunc/Argus_Plugins\n/plugin install argus@argus-plugins\n# → 会同时装好 argus (remote MCP) + argus-files (本地 MCP, 即本包)\n\n# Qwen Code\nqwen extensions install bestfunc/Argus_Plugins:argus\n```\n\n首次调用 `upload_file` / `download_file` 时会自动开浏览器做 OAuth 授权（RFC 8252 loopback），完成后 30 天有效，自动续期。\n\n## 工具清单\n\n| 工具 | 功能 |\n|---|---|\n| `upload_file(agent_id, local_path, remote_path)` | 上传本地文件到 Agent 宿主机任意路径 |\n| `upload_to_sandbox(agent_id, local_path, filename?)` | 上传到固定沙盒目录（Linux `/tmp/argus-mcp/` / Windows `C:\\argus-mcp\\`） |\n| `download_file(agent_id, remote_path, local_path)` | 从 Agent 宿主机下载到本地 |\n\n## 鉴权与授权\n\n- OAuth 2.1 + PKCE + DCR（RFC 7591 动态客户端注册）\n- access_token 存在 `~/.argus/local-mcp.json`（权限 600）\n- Bearer token 打 `Authorization: Bearer mak-xxx` header，Argus Server 的 `get_current_user` 依赖统一识别（JWT / mak- 前缀 / ak_ 前缀 三种 token 格式共用一套）\n- **不走 MCP dispatcher 的 L2/L3 审批流程**——这些工具的权限边界等价于 Web Console 用户通过 Transfers 页上传下载（工作组成员身份 + menu 级别权限控制）\n\n## 开发\n\n```bash\nnpm install\nnpm run build          # 产出 dist/*.js\nnpm run dev            # tsx 直接跑 src/\nnpm link               # 本地调试，软链到全局 bin\n```\n\nSmoke test（验证 MCP 协议握手）：\n\n```bash\n(echo '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2024-11-05\",\"capabilities\":{},\"clientInfo\":{\"name\":\"test\",\"version\":\"0.0.1\"}}}'; \\\n sleep 0.3; \\\n echo '{\"jsonrpc\":\"2.0\",\"method\":\"notifications/initialized\"}'; \\\n sleep 0.2; \\\n echo '{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/list\",\"params\":{}}'; \\\n sleep 0.3) | node dist/index.js\n```\n\n## 许可\n\nApache-2.0 © Bestfunc (ShangHai) Technology Information System Co.,Ltd.\n","readmeFilename":"README.md"}