Mcp File Upload Sample — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Mcp File Upload Sample (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
MCP 経由でファイルを MinIO(S3 互換)にアップロードするサンプルです。MCP 実装は公式 TypeScript SDK を使用しています。
サーバーはクライアントがペイロードとして送り込んだデータ(Base64 または multipart)のみを処理し、ローカルディスクのファイルを読み出すことはありません。
packageManager: [email protected])| ソフトウェア | バージョン |
|---|---|
| Claude Desktop | 0.9.5 |
| Claude Code | 2.1.80 |
@modelcontextprotocol/sdk | 1.27.1 |
docker compose up -dhttp://127.0.0.1:9000http://127.0.0.1:9001(認証情報は docker-compose.yml の MINIO_ROOT_*)yarn install
yarn build
# サーバー起動
yarn dev.env.example を参考に .env を作成してください。デフォルト値が設定されているため、MinIO をそのまま使う場合は .env なしでも動作します。
| パス | 用途 |
|---|---|
GET /health | ヘルスチェック |
POST /upload | HTTP マルチパートアップロード(フィールド名 file) |
POST /mcp | MCP(Streamable HTTP) |
| ツール | デフォルト | 用途 |
|---|---|---|
upload_file | 有効 | Base64 エンコードされたファイルを MinIO にアップロード |
upload_via_curl | コメントアウト | HTTP POST /upload への curl コマンドを返す |
upload_via_curl を有効にするには src/mcpServer.ts の registerUploadViaCurl(server, config) のコメントを外してビルドしてください。
claude_desktop_config.json に Stdio 設定を記述します。
{
"mcpServers": {
"file-upload-sample": {
"command": "/Users/YOURNAME/.nvm/versions/node/v22.x.x/bin/node",
"args": [
"/Users/YOURNAME/project/mcp-file-upload-sample/dist/index.js",
"--stdio"
],
"env": {
"MINIO_ENDPOINT": "http://127.0.0.1:9000",
"MINIO_ROOT_USER": "minioadmin",
"MINIO_ROOT_PASSWORD": "minioadmin"
}
}
}
}command には Node.js 20+ のフルパスを指定してください(command -v node で確認)。args のスクリプトパスには `~` を使わない絶対パスを指定してください(Desktop はシェルを経由しないため ~ が展開されません)。echo "$(pwd -P)/dist/index.js" を実行し、出力をそのまま args[0] に使います。claude mcp add file-upload-sample \
-s user \
-e MINIO_ENDPOINT=http://127.0.0.1:9000 \
-e MINIO_ROOT_USER=minioadmin \
-e MINIO_ROOT_PASSWORD=minioadmin \
-- node /Users/YOURNAME/project/mcp-file-upload-sample/dist/index.js --stdioclaude mcp list # 一覧
claude mcp remove file-upload-sample # 削除サンプル用途のコードです。オープンな環境では使わないようにしてください。
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.